fix(kanban): phantom-session test also binds HERMES_SESSION_ID
The phantom-session-False case bound the id only via scoped_current_session_id (a ContextVar), while main's stamping seam read os.environ["HERMES_SESSION_ID"], so the reporter's exact symptom stayed green against main. Setting the env var too makes the case red on main's tools/kanban_tools.py (2 failed / 5 passed) and green on the branch (7 passed).
This commit is contained in:
@@ -86,7 +86,9 @@ def test_tool_create_only_stamps_persisted_ambient_session(tmp_path, monkeypatch
|
||||
state.close()
|
||||
|
||||
# Bound the way agent construction publishes it (ContextVar); a bare os.environ value is
|
||||
# masked once a surface has cleared its session vars, so it is not a stand-in here.
|
||||
# masked once a surface has cleared its session vars, so it is not a stand-in here. The env
|
||||
# var is set too so the reporter's unverified-env path (the pre-fix stamping seam) is exercised.
|
||||
monkeypatch.setenv("HERMES_SESSION_ID", session_id)
|
||||
with scoped_current_session_id(session_id):
|
||||
result = json.loads(kt._handle_create({"title": "child", "assignee": "default"}))
|
||||
with kbc.connect_closing() as conn:
|
||||
|
||||
Reference in New Issue
Block a user