Repository navigation
fix(monitor): preserve member directive self-arm provenance - #20169
KiroCrewCaptain merged 1 commit into
Conversation
984953d to
cdd8743
Compare
cdd8743 to
f46f947
Compare
|
Rebased onto main at 10e53cc. Kept the new GatewayOrchestrator composition and relocated the work-ledger wake actor stamp to |
UX Review (Opus 5.5, fork) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix is at mechanism level: the steered tail threw away records that What this change shipsInventory (6 items) — 6 justifiedIntent: when a member conductor gets a person's steer and its turn ends before using it, its own
[FIRST-PRINCIPLES-REVIEWED] e007f9d Description read[DESCRIPTION-READ] fec77ba24e9d1024802cbe57aac5f447c8317aa6a6e209cae7551e2e52f48310 That sha256 names the PR description this verdict read. Recompute it with |
Design Review (Opus 5.5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The steer's provenance now lives exactly as long as its attachments do, and every place a pending steer leaves (settle, requeue, force-stop, failed RPC) releases it. [DESIGN-REVIEWED] e007f9d Description read[DESCRIPTION-READ] e51df70bbdd2d2452eee098d6d593b6732db595283d221e9bbca00a74332cd28 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 |
GPT 6.1 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5.5 Review (fork) — ✅ no blocking findingsReviewed |
f46f947 to
3fcfd24
Compare
|
|
|
|
|
mbriones98
left a comment
There was a problem hiding this comment.
Checks green and readiness passed at 9d4c74d; no behavior change.
A steer the turn ends before consuming is requeued from its held admission and origin marks, so a member conductor's own human steer keeps the user origin that vouches for its monitor_start self-arm.
9d4c74d to
e007f9d
Compare
|
self-added: no
|
|
self-added: no
|
|
Rebased onto main at 3d6cda4 to clear the merge conflict (head |
|
Requesting a maintainer re-run of Fork Security Scope Review run 39717435924. |
|
Holding for a human reviewer on head e007f9d. This PR changes which requeued turns carry the authenticated-human mark that authorizes a member's I found no defect. The hold lasts exactly as long as the text is in What clears it: a maintainer review of the self-arm provenance change. — crew-pr-reviewer (r133) |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved on behalf of the watch holder (bolichen). Design and First Principles pass on this head (or skipped / author override), UX skipped or pass, no conflict, no open change request.
Problem / Motivation
Goal: A crew/member session can self-arm from positively attributed human or own-wake turns while restored, untagged, and injected turns remain refused.
A member conductor can receive a human-authored steer, bind a worker, and call
monitor_start. If its running turn ends before consuming the steer, the message is requeued. The requeued turn previously lost its human-origin mark, so the existing authorization gate treated the monitor request as an outside arm and returned 409 after the tool had reported that the request was accepted.Why it matters
A conductor can end its turn believing its patrol is armed while worker reports remain unread because no loop exists. A restored or untagged turn must not solve that symptom by gaining authority it never had.
Not a goal
What changed (motivation → approach → change)
A person's steer that the turn ends before consuming now keeps the human-origin mark, so the member conductor's own
monitor_startis admitted as a self-arm instead of answering 409.The root cause was lost positive provenance, not a missing grant. A steer RPC that accepts the write has not consumed the text, yet
steer_into_running_turnindashboard/chat_delivery.pydropped the steer's admission and origin records as soon as the RPC returned. A turn that ended before thesteering_consumedecho then requeued an entry with no_directive_user_origin. The records are now held while the steer is still registered._settle_consumed_steersindashboard/chat_turn/steer_queue.pyreleases them on consumption, the turn-end requeue copies and releases them, and a hard kill drops them with the text. A channel steer also keeps its narrowing, and a peer steer keeps its containment baseline and still carries no positive mark.Turn-actor attribution is unchanged, so
session_sendturns keep the Jev routing #12871 gives conductor-delivered turns. Attribution gaps already on main are tracked in #21379.The monitor-architecture spec states the positive-provenance rule and the steer hold, and the shielded-steer comment in
session_control_parts/session_messaging.pynow lists what the settle releases. Theautonudge_authztrust record, SEL audit, stopped-loop, stale-wake and fire-time checks are unchanged. This replaces the withdrawn gateway-arm approach in #18592.Backwards compatibility
Compatible: existing human-origin and own-monitor-wake self-arms keep their behavior, and requeued human messages retain the provenance they had when admitted.
Removes nothing: no route, monitor kind, trust record, refusal, or public capability is removed.
Tests
monitor_watch. The composer's directive reaches the applier user-facing, the Discord one keeps its channel narrowing, and the peer one carries no mark. Restoring the old unconditional pops fails the composer and Discord variants and both hold tests below.chat_api/turn_stop.pyfails the extendedtest_steer_requeue_entry_meta.pypin.test_session_control*module 1542, session-directive 207, Slack gateway 1044, Issue Radar 2976, Jev model-route and decisions 481, contract and spec checks 6956, backend related set 2018.prove.pyreports PROVEN.test_steer_requeue_entry_meta.pyrequeue tests aftertest_session_broadcast.py::TestATargetThatNeverAnswers::test_a_consumed_steer_timing_out_in_containment_stop_is_not_safe_to_resend. The same order fails identically on main at 3d6cda4, so that order dependency is on main and not in this diff.test_flake_pattern_ratchet.pypassed all 60 tests.website/file.Manual verification
N/A — unit coverage drives the steer hold across accept, consume and requeue, the directive producer flags, authorization, trust records, and SEL events.
Screenshots / video
N/A — backend-only authorization and queue-provenance change; no rendered surface changes.
Related Issues
Closes #17603
Withdrawn predecessor: #18592.
Pattern harvest
Rule candidate: review-prompt
Pattern: authorization requires a positive producer mark, while actor fallback and restored text remain non-authoritative attribution data.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.