Repository navigation
Conversation
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Opus 5.5, fork) — 🟡 CONCERNSDesign-level review of Design-Verdict: CONCERNS Deferring the OPTIONS expiry for Watch
Suggestions
[DESIGN-REVIEWED] 4296474 Description read[DESCRIPTION-READ] 55c470490dcd832342dbaf718187db2e7ef10b90a001fb756e7a95c97a5ff4d1 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 |
First Principles Review (Opus 5.5, fork) — 🟡 CONCERNSPremise-level review of First-Principles-Verdict: CONCERNS The second Not justified as shipped
What this change shipsInventory (8 items) — 5 justifiedIntent: stop
[FIRST-PRINCIPLES-REVIEWED] 4296474 Description read[DESCRIPTION-READ] deabac8c049471ba406c2a72ff1b29d091ffa717414fae3cf181bcc368069fc6 That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings block this merge. FINDING — src/kiro_crew/dashboard/handlers/agents.py:3080 — [OPUS-REVIEWED] 4296474 |
8205070 to
9e03593
Compare
9e03593 to
21b3289
Compare
21b3289 to
6f63165
Compare
f24e16d to
3a9af80
Compare
3a9af80 to
a58a4b9
Compare
a58a4b9 to
0baca19
Compare
0baca19 to
0df44c7
Compare
0df44c7 to
2a327f1
Compare
Refuse unsupported /todos before acquiring a session, using a live provider or the member-aware backend selector. Confirm support on the acquired provider and preserve OPTIONS and first-turn replay on refusal. Pin the public ACP-only allocation contract: a dormant provider label does not select a harness. Keep migrated consumers on capability answers and liveness-qualify the existing manual compact gate.
|
@iamwhatever thanks, ready for another look at
Also rebased onto |
|
Thank you for this fix, @leonlaiyc. The /todos live-and-allocated capability gate has been re-authored onto main's current layout (the gate moved from chat_runner.py to chat_utils.py, and SessionCapabilities grew new fields since this PR was cut) and opened as #17971, which is now green. Closing this in favour of that replacement; your authorship is preserved via a Co-authored-by trailer. Fixes the capability half of #8939. |
Problem / Motivation
Goal: Ensure harness-specific slash-command decisions use the authority that will actually execute the command, so stale session or config hints cannot incorrectly permit or refuse it.
/todosis valid on the Claude harness and invalid on Kiro. The old pre-dispatch gate read config or a registry row before session allocation, butget_or_createis the operation that probes liveness. It can evict a dead row and instantiate the opposite harness from current config.Why it matters
A stale Claude row could allow
/todos, then be replaced by Kiro and deliver an unsupported command. The inverse could refuse a command that the acquired Claude provider supports. The gate and execution must answer from the same authority.Not a goal
Redesigning slash-command dispatch generally.
Adding native
/todossupport to harnesses that do not already support it.Changing unrelated session-allocation behavior.
What changed (motivation → approach → change)
| Command decision | Authority and behavior |
|---|---|
|
/todosrefusal | A positively live provider's native-todos capability, otherwise the member-aware backend allocation selector ||
/todosexecution | The acquired provider confirms native-todos support before dispatch ||
/todosautocomplete | The configured default backend's capability; this endpoint has no session or member identity || Slack OPTIONS | Local refusals preserve controls; accepted turns expire them once, including early failures |
A stale provider row can describe a harness that will never execute the command. The dashboard runner checks liveness before its local refusal and confirms capability again on the provider returned by acquisition. Unsupported commands create no session or wait on a busy turn. A first-claim refusal preserves member bookkeeping and the existing replay lease for the next ordinary prompt, including speculative resume.
The
agent_sdk/capabilities.pydeclarations and backend cards exposesupports_native_todosthroughacp_backends.py.dashboard/chat_runner.pyuses that answer for dispatch;dashboard/handlers/agents.pyuses the configured global backend for suggestions. Other suggestions retain their behavior. Deferred OPTIONS cleanup belongs to the existing protected turnfinally, so memory preparation, session claim, and spec-hook failures still expire controls, and cancellation cannot skip session release.The harness-parity spec records the capability boundary. The dashboard spec names the liveness-qualified, member-aware
select_provider_backend(session_key, member_acp_backend, acp_backend)fallback for/compact.Backwards compatibility
Compatible: Kiro still refuses unsupported
/todos; Claude ACP accepts it. Universal blocked commands remain local refusals. The public provider axis remains ACP-only, and a dormantclaude_codelabel cannot select a harness. Backend identity ratchets retain their existing exemptions./compactkeeps the current live-provider or member-aware successor gate.Tests
Review response (@iamwhatever, CHANGES_REQUESTED on
f24e16da2): the refusal now runs before acquisition, and the discriminating case the review asked for is pinned in both directions. Each one fails behaviorally against a config-only pre-acquisition gate (negative control: swappingselect_provider_backend(...)foragent.acp_backendturns 6 of 7 rows red; the live-provider row stays green by design):test_todos_member_override_selects_claude_over_default_kiro(alive= dead / unknown / absent): the global default is kiro, the member override selects claude, the preflight must ALLOW/todos, and the acquired claude provider confirms. The old config-only read refused here. The behavioral assertions now come before the selector spy, so a regression fails as a refusal, not only as a missed call.test_todos_member_kiro_refuses_without_acquisition_over_default_claude(new, the mirror): the global default is claude and the member routes to kiro./todosis refused locally withget_or_createnever awaited, no prompt or command streamed, and Slack OPTIONS not expired. The old config-only read admitted this and cold-started kiro-cli only to refuse after the claim.On this head (rebased onto
a60fda266; the only conflict was thelearn-cron-dashboard.mdchat bullet, resolved by keeping main's newchat_handlers.pyandws.pytext and this PR's/todosparagraph):test_chat_runner_coverage.py,test_manual_compact_gate.py,test_api_slash_commands.py,test_agent_sdk_capabilities.py,test_backend_cards.py,test_harness_parity.py,test_chat_runner_composition_contract.py,test_acp_capability_sets_leaf.py,test_acp_session_handle_capabilities.py: 793 passed locally on Windows. One harness-parity test failed only on this box's cp950 locale; it fails the same way on a main-based tree and passes withPYTHONUTF8=1.38d5688d9. That is the shape CI tests, and it now includes main's new member-DM identity refusal.Manual verification
N/A — deterministic runner and endpoint tests cover this backend dispatch change, including tracked OPTIONS records and Slack edits. No live harness or Slack message was sent locally.
Related Issues
Follow-up to #13805.
Closes #8939
Pattern harvest
Not generalizable: This PR aligns one harness-specific slash command with the repository's existing capability and allocation authorities; it does not introduce a new reusable defect pattern beyond those existing boundaries.
Checklist
One logical commit, rebased onto upstream main
a60fda266Deterministic stale/dead and exceptional OPTIONS coverage
Capability/identity ratchet preserved
Documentation updated
No secrets or credentials in the diff
Contribution License Agreement
🤖 Generated with Claude Code