Skip to content

test(kas): build the governance-off handle through bare_session_handle - #39262

Merged
buluoray merged 1 commit into
mainfrom
greener/fix-bare-handle-guard
Nov 18, 2026
Merged

buluoray merged 1 commit into
mainfrom
greener/fix-bare-handle-guard

Conversation

@iamwhatever

Copy link
Copy Markdown
Contributor

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_directly fails on main at 12d8a9c27a. It flags test/test_kas_token_refresh_recovery.py:245, which builds an AcpSessionHandle with __new__.

Why it matters

Every open PR's Backend Tests shard that runs the guard goes red, so no PR can reach readiness: passed until main is fixed.

Not a goal

  • No change to the guard or to bare_session_handle.
  • No change to any production code.

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 direct AcpSessionHandle.__new__ in _governance_off_handle. Each passed alone; together they fail. The fix builds that handle with bare_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.py and test/test_bare_session_handle_guard.py pass 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

  • A Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...); PR Hygiene does not count commits
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

#38978 added a direct AcpSessionHandle.__new__ in
test_kas_token_refresh_recovery.py after #38996's guard landed, so
test_bare_session_handle_guard fails on main.
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 5b107fed76169c02e87364db24d949d26148551e ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 5b107fed76169c02e87364db24d949d26148551e touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 5b107fed76169c02e87364db24d949d26148551e — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

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 .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 5b107fed76169c02e87364db24d949d26148551e — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 5b107fe

Verdict parsed from the review's SHA-scoped output markers for commit 5b107fed76169c02e87364db24d949d26148551e.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 5b107fed76169c02e87364db24d949d26148551e false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 5b107fed76169c02e87364db24d949d26148551e and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 5b107fe

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 5b107fed76169c02e87364db24d949d26148551e false-positive: <reason, 20 to 500 characters>

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 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.

@buluoray
buluoray enabled auto-merge (squash) November 18, 2026 21:22
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 18, 2026
@buluoray
buluoray merged commit d032162 into main Nov 18, 2026
100 of 101 checks passed
@buluoray
buluoray deleted the greener/fix-bare-handle-guard branch November 18, 2026 21:51
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

main red: test_bare_session_handle_guard flags test_kas_token_refresh_recovery.py:245

2 participants