Repository navigation
test(kas): build the governance-off handle through bare_session_handle - #39262
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 blocks: this is a test-only change that builds the helper through the factory the guard requires. [DESIGN-REVIEWED] 5b107fe Description read[DESCRIPTION-READ] 8ef5dee50541f61a4008879989a0fd5d4bcec199e3a88055a0743c66c8b93b97 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: |
buluoray
left a comment
There was a problem hiding this comment.
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Approving at 5b107fe. main is red on test_bare_session_handle_guard.py because test_kas_token_refresh_recovery.py:245 builds a handle with new. This swaps it for bare_session_handle(_SID), which sets the same _session_id. On origin/main with this diff, the guard test and test_kas_token_refresh_recovery.py pass (21 passed). The one red check, Analyze (javascript-typescript), cannot be affected by a Python test change.
Problem / Motivation
Goal: Main's backend tests pass again, so PRs stop failing on a test they did not touch.
test/test_bare_session_handle_guard.py::test_no_test_builds_a_bare_session_handle_directlyfails on main at12d8a9c27a. It flagstest/test_kas_token_refresh_recovery.py:245, which builds anAcpSessionHandlewith__new__.Why it matters
Every open PR's Backend Tests shard that runs the guard goes red, so no PR can reach
readiness: passeduntil main is fixed.Not a goal
bare_session_handle.What changed (motivation → approach → change)
#38996 added the guard and moved every bare handle onto
bare_session_handle. #38978 merged after it with one new directAcpSessionHandle.__new__in_governance_off_handle. Each passed alone; together they fail. The fix builds that handle withbare_session_handle(_SID), the factory the guard asks for. The test sets the same fields on the handle as before.Backwards compatibility
Compatible: test-only change.
Removes nothing: only a test helper's construction call changes.
Tests
test/test_kas_token_refresh_recovery.pyandtest/test_bare_session_handle_guard.pypass locally (21 passed). On main the guard test fails (CI log on PR #36630, Backend Tests (3.12, 8)).Proof: not provable -- test-only change
Manual verification
N/A — unit coverage sufficient: the change is one test helper, and the guard test checks it.
Real-machine verification
N/A -- test-only change; it runs nothing outside the test suite.
Related Issues
Closes #39261
Sibling sweep
Swept: git grep -nE "AcpSessionHandle.new|object.new(AcpSessionHandle" -- test
Siblings: none -- the only other hits are the guard's own fixtures, docstrings and the factory itself
Pattern harvest
Not generalizable: two PRs passed alone and clashed on merge; the guard already catches the class, and it caught this one.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commitsContribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.