Skip to content

fix(test): update slot-reader enumeration for _switch_target_busy centralization - #12715

Closed
NicholasRBowers wants to merge 1 commit into
mainfrom
fix/12713-switch-target-busy-enumeration
Closed

NicholasRBowers wants to merge 1 commit into
mainfrom
fix/12713-switch-target-busy-enumeration

Conversation

@NicholasRBowers

@NicholasRBowers NicholasRBowers commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The switch-handler refactor centralized the slot.running pre-commit refusal from four switch handlers (api_chat_slot_agent, api_chat_slot_model, api_chat_slot_reasoning_effort, api_chat_slot_workspace) into the shared _switch_target_busy helper, but test_running_and_turn_running_slot_readers_are_enumerated still pins the old reader set — Backend Tests shard 4 fails on both platforms for every PR in the repo since the merge landed on main.

This updates the pin to match: the four migrated handler entries are removed and _switch_target_busy is added as a reservation-semantics reader — its own docstring pins exactly that reading (slot.running is set at dispatch, before provider.start() registers a session), so the helper belongs in the same class its callers vacated.

Delta verified by re-running the test's own AST scan: 4 sites out, 1 site in, no semantics changes anywhere else.

Testing

  • test/test_pending_boundary_consumer_semantics.py — 9 passed on main + this fix (the enumeration test fails on pristine main tip 0a8005093)
  • black and flake8 clean on the touched file

Fixes #12713

Pattern harvest

Rule candidate: review-prompt
Pattern: A refactor that moves a pinned read (an enumeration test asserts every reader site) must update the pin in the same commit; centralizing four handler reads into one helper without touching the pin breaks every PR's CI, not just the refactor's.

@NicholasRBowers
NicholasRBowers requested review from a team and iamwhatever September 22, 2026 05:24
@NicholasRBowers
NicholasRBowers enabled auto-merge (squash) September 22, 2026 05:25
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of 300bd3bbb979ce9f638b1c35753873d3207f8837 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 300bd3b

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 300bd3bbb979ce9f638b1c35753873d3207f8837: <one-sentence reason>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 328f5ec29076b1189600351fbdd7a1cc8d0674de; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 328f5ec29076b1189600351fbdd7a1cc8d0674de: <one-sentence reason>

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ⚠️ review incomplete

GPT 5.6 did not produce a complete verdict for 328f5ec29076b1189600351fbdd7a1cc8d0674de; inspect the workflow logs and re-run it.

This comment is updated in place on each push.

See the GPT 5.6 Review job logs; this commit has no completed GPT verdict.

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 328f5ec29076b1189600351fbdd7a1cc8d0674de: <one-sentence reason>

@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of 300bd3bbb979ce9f638b1c35753873d3207f8837 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Confirm Backend Tests shard 4 goes green on this PR's CI run — I verified the new pin against HEAD by AST reading, not execution.

[DESIGN-REVIEWED] 300bd3b

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed 300bd3bbb979ce9f638b1c35753873d3207f8837 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 300bd3b

Verdict parsed from the review's SHA-scoped output markers for commit 300bd3bbb979ce9f638b1c35753873d3207f8837.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 300bd3bbb979ce9f638b1c35753873d3207f8837: <one-sentence reason>

… centralization

The switch-handler refactor moved the slot.running pre-commit refusal out
of the four switch handlers (api_chat_slot_agent/model/reasoning_effort/
workspace) into the shared _switch_target_busy helper, but the enumeration
pin in test_running_and_turn_running_slot_readers_are_enumerated was not
updated, so Backend Tests shard 4 fails on both platforms for every PR in
the repo.

Remove the four migrated handler entries and add _switch_target_busy as a
reservation-semantics reader -- its docstring pins exactly that reading
(slot.running is set at dispatch, before provider.start() registers a
session), so the helper belongs in the same class its callers vacated.

Fixes #12713

Co-authored-by: Kiro Crew <noreply@kirodotdev.github.io>
@NicholasRBowers
NicholasRBowers force-pushed the fix/12713-switch-target-busy-enumeration branch from 328f5ec to 300bd3b Compare September 22, 2026 05:43
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 22, 2026
@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 22, 2026
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Sep 22, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

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 _switch_target_busy the same way the test already credits _destructive_history_busy. This PR removed those handlers from the table, which would let a new handler wired through the helper go unenumerated. Closing as superseded.

@bolichen97 bolichen97 closed this Sep 22, 2026
auto-merge was automatically disabled September 22, 2026 06:05

Pull request was closed

@github-actions github-actions Bot removed the readiness: checking Automated validation is still running label Sep 22, 2026
@NicholasRBowers
NicholasRBowers deleted the fix/12713-switch-target-busy-enumeration branch September 22, 2026 23:27
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: slot-reader enumeration test not updated by the _switch_target_busy refactor (af0f18678) — Backend shard 4 red on every merge ref

2 participants