Repository navigation
Conversation
Commit af0f186 (kirodotdev#11425) hoisted the switch handlers' busy refusal into _switch_target_busy, so the enumeration census now attributes the slot.running read to the helper instead of the four switch handlers that call it (agent, model, reasoning effort, workspace). Update the expected reservation set to match: drop those four entries and add the helper. api_chat_slots_model keeps its entry -- it still reads slot.running directly alongside the helper call -- and detail, continue, and interrupt never routed through the helper. Fixes kirodotdev#12713
6089c9b to
7de2b9d
Compare
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
|
Thanks for the quick fix. #12713 is now closed by #12718 (merged as 194f6d5), which keeps the four switch handlers enumerated by crediting callers of |
Opus 4.8 Review (fork) — ✅ no blocking findingsReviewed Review detailsThe source is already refactored: the four switch handlers ( No findings. [OPUS-REVIEWED] 7de2b9d |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify shard 4 goes green on a fresh-main merge ref; the author's validation was a local 3.12 run, not the red CI lane itself. [DESIGN-REVIEWED] 7de2b9d |
Problem / Motivation
test/test_pending_boundary_consumer_semantics.py::test_running_and_turn_running_slot_readers_are_enumeratedfails on pristine current main, reddening Backend Tests shard 4 (3.12 and Windows) and the downstream Coverage Gate on every PR whose merge ref includes the current main tip.Why it matters
Every open PR against main is blocked: shard 4 + Coverage Gate are red repo-wide until the census is updated (e.g. #12708 is currently wearing exactly this red).
What changed (motivation → approach → change)
Symptom: the enumeration census (an AST scan of
src/kiro_crew/dashboardfor directslot.running/turn_runningreads) disagrees with its expected table. Root cause: commit af0f186 (#11425) hoisted the switch handlers' busy refusal into a new_switch_target_busyhelper, so theslot.runningread the census used to attribute to the four switch handlers —api_chat_slot_agent,api_chat_slot_model,api_chat_slot_reasoning_effort,api_chat_slot_workspace— is now attributed to the helper. The census test itself landed via #11454 from a base cut before #11425 merged, so its last CI verdict never saw the refactor (per @pepmach's attribution on the issue: a stale merge ref, not a refactor that skipped a test). Change: in the expected reservation set, drop those four switch-handler entries and add("chat_handlers.py", "_switch_target_busy").Verified against the code, not just the assertion diff (an AST probe over
chat_handlers.py): the four dropped handlers call_switch_target_busyand retain no directslot.runningread;api_chat_slots_model(bulk model) keeps its entry because it still readsslot.runningdirectly alongside its helper call;api_chat_slot_detail/continue/interruptnever routed through the helper and keep their entries. Note the issue body names detail/continue/interrupt among the four to remove — that reading came from pytest's unordered set-diff display; the shard-4 log delta and the code agree on agent/model/reasoning_effort/workspace.Backwards compatibility
Compatible: test-only change to an expected table; no runtime code touched.
Tests
The fixed test is the test:
test_running_and_turn_running_slot_readers_are_enumeratednow locks in_switch_target_busyas the single census-visible busy reader for the four switch handlers. Full file (9 tests) run locally on a 3.12 venv: failed before the change with exactly the reported delta, all green after.Manual verification
N/A — unit coverage sufficient: the failing census test is deterministic (pure AST scan of the source tree).
Related Issues
Fixes #12713
Pattern harvest
Rule candidate: review-prompt
Pattern: a refactor that moves a state read into a helper must update the reader-enumeration census in the same commit — and a PR whose merge-ref CI predates a just-merged census/refactor pair can land already-broken; anyone touching
slot.running/turn_runningreads should re-run the census test on fresh main before merge.Checklist
feat|fix|docs|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement