Repository navigation
fix(test): give the Slack code-channel fake slot the real approval lookup - #34669
kyleseaman wants to merge 1 commit into
Conversation
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. This is a test-only fix: the fake slot now calls the real [DESIGN-REVIEWED] 97e6eef Description read[DESCRIPTION-READ] 554d201bd10571ffae8d022a825bd183e9702439bb5e9991095b360806ac59bb 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: |
|
🤖 Kiro Crew Auto-Pipeline [operator: buluoray]: Thanks for jumping on this. The Slack code-channel break this PR targets is now fixed on main by #34646 (merged as 4477b72). That PR gave the shared Main CI has passed since then (4431fa7 and 4febed4, both containing the fix), so this PR is no longer needed to turn main green. #34666 is already closed for the same reason. Feel free to close this one too, unless it carries something beyond that fix that you still want. |
|
Closing as superseded by #34646, which is on main and fixes the same Slack code-channel tests. |
Problem / Motivation
Goal: Main's Backend Tests pass again: the Slack code-channel trust and approval tests stop failing on a test fake that predates the approval-instance lookup.
Twelve Slack code-channel tests fail on main at every commit since about 15:25 UTC on 2026-11-10, on Linux and Windows. Their cards come back
refusedinstead ofset, futures raiseInvalidStateError: Result is not set, and a channel card is never rewritten. The log behind each one readsAttributeError: 'types.SimpleNamespace' object has no attribute 'approval_instance', logged asapproval mode change failed.Why it matters
Every open PR inherits these reds in Backend Tests shards 5, 6 and 7 and the Coverage Gate, so none of them can reach
readiness: passeduntil main is green.Not a goal
test_session_markdown.pylong-scase some shards also showed; it passes on main locally.What changed (motivation → approach → change)
#27511 made the trust/yolo sweep (
_sweep_pending_approvals) read each pending card's row throughslot.approval_instance(...)before approving it. #21991 landed fifteen minutes later with tests whose fake slot,_slot()intest/test_slack_code_channel_trust_from_slack.py, was written before that lookup existed. Each branch was green on its own; together the sweep raises on the fake, the grant reports failure, and the tests see refused cards.The fake slot now carries
_approval_instancesand binds the realslot_turns.approval_instanceto itself, so the sweep reads a card the way a dashboard slot answers it. The three other test files share this fake through imports, so one change covers all twelve tests. No product code changes.Backwards compatibility
Compatible: test-only change; no product contract is touched.
Removes nothing: the fake slot only gains the attribute and method the real slot already has.
Tests
test_slack_code_channel_worker_approvals.py,test_slack_code_channel_mode_reaches_workers.py,test_slack_code_channel_trust_from_slack.pyandtest_slack_code_channel_approval_prepush.pypass; all 911 tests intest/test_slack_code_channel_*.pypass.Proof: not provable -- test-only change
Manual verification
N/A — unit coverage sufficient: the change is to a test fake, and the affected tests run end to end through the real trust sweep.
Related Issues
Part of #16389 (the owner-bound approval decide that added the
approval_instancelookup); the tests were added by #21991.Sibling sweep
Swept: git grep -l -E "_approval_futures\s*=\s*{" -- test, then kept files that never mention approval_instance
Sibling: test/test_slack_code_channel_trust_from_slack.py -- changed here
Sibling: test/test_slack_code_channel_approval_select.py -- not affected -- sets only the state-level futures map and never reaches the per-slot sweep; passes on main
Sibling: test/test_chat_resume_all.py -- not affected -- its fake slots never receive a trust or yolo grant; passes on main
Sibling: test/test_conductor_context_cap.py -- not affected -- no trust or yolo grant reaches its fakes; passes on main
Sibling: test/test_conductor_wake_reset.py -- not affected -- no trust or yolo grant reaches its fakes; passes on main
Sibling: test/test_finish_queue_cycle_terminal_order.py -- not affected -- no trust or yolo grant reaches its fakes; passes on main
Sibling: test/test_session_health.py -- not affected -- no trust or yolo grant reaches its fakes; passes on main
Sibling: test/test_subagent_stop_refuses_permission.py -- not affected -- no trust or yolo grant reaches its fakes; passes on main
Pattern harvest
Rule candidate: review-prompt
Pattern: a hand-built SimpleNamespace stand-in for a production class drifts when the class gains a method a shared helper calls; prefer binding the real method or building from the real class.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)