From c619a145f111c488886ae70ce684238527231b60 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 18 Sep 2026 04:03:07 -0700 Subject: [PATCH] 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). --- tests/tools/test_kanban_provenance.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_kanban_provenance.py b/tests/tools/test_kanban_provenance.py index cd3d2d9097..e3c66095be 100644 --- a/tests/tools/test_kanban_provenance.py +++ b/tests/tools/test_kanban_provenance.py @@ -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: