Repository navigation
test(kas): build the governance-off handle with bare_session_handle - #39274
bolichen97 wants to merge 1 commit into
Conversation
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. This is a one-fixture, test-only change that builds the handle the way the existing guard already requires. [DESIGN-REVIEWED] cede4b4 Description read[DESCRIPTION-READ] 250835f16b5b2dc32c88193e20440c0cf1dd01062814091113df95d99c61d236 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
|
Superseded by #39262, which landed the same fix on main first. |
Pull request was closed
Problem / Motivation
Goal: Make main's Backend Tests green again by building the governance-off test handle through
bare_session_handle.On main,
test/test_bare_session_handle_guard.py::test_no_test_builds_a_bare_session_handle_directlyfails withtest_kas_token_refresh_recovery.py:245. Every open PR's Linux backend job inherits the red (failing job).Why it matters
Every PR's CI is red on this one test until main is fixed, so nothing can auto-merge.
Not a goal
What changed (motivation → approach → change)
Root cause is a merge-order conflict. The guard (#38996) landed first and moved every existing
AcpSessionHandle.__new__tobare_session_handle. #38978 was branched before it, passed CI on its own base, and added_governance_off_handle()with a directAcpSessionHandle.__new__. Each was green alone; together main is red._governance_off_handle()now callsbare_session_handle(_SID, runtime=None). The old handle had no_runtime, and the MCP wait reads it throughgetattr(..., None), soruntime=Nonekeeps the tests on the same no-connect-progress, no-re-attempt path. The helper'ssettle_kas_model_selectmock is never reached: these tests end at the governance-off error first.Backwards compatibility
Compatible: test-only change.
Removes nothing: only how one test fixture builds its handle changes.
Tests
test/test_kas_token_refresh_recovery.py(21 passed) andtest/test_bare_session_handle_guard.pypass locally; the threeTestAFailClosedStarttests still assert the same errors.Proof: not provable -- test-only change
Manual verification
N/A — unit coverage sufficient: the change is one test fixture and the guard test checks it.
Real-machine verification
Machine: dev desktop, Amazon Linux 2023 (kernel 6.12), aarch64, 32 vCPU / 123 GB
Before (main 640338a):
pytest -n0 test/test_bare_session_handle_guard.py-> 1 failed (test_kas_token_refresh_recovery.py:245), 2 passed; the failure is deterministic, not flakyAfter (head cede4b4):
pytest -n0 test/test_kas_token_refresh_recovery.py test/test_bare_session_handle_guard.py-> 21 passedCleanup: own computer; the temporary base worktree was removed
Related Issues
Follows #38996 and #38978.
Sibling sweep
Swept: git grep -nE "AcpSessionHandle.new|object.new(AcpSessionHandle" -- test/
Sibling: test/session_handle_helpers.py -- not affected -- the one allowed construction site
Sibling: test/test_bare_session_handle_guard.py -- not affected -- docstrings and fixture strings the guard scans, not real builds
Pattern harvest
Not generalizable: the guard already names the fix; the defect is merge order between two PRs, not a code pattern.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits