Repository navigation
fix(mcp): list session_queue as a redaction sink and name its manager-chain reach - #36081
Conversation
Sensitive Change ReviewSensitive files changed:
|
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS No design-level concerns. The new direct call returns the same text as the wrapper, the sink row and its contract pin are added together, and the doc edits match the manager-chain reach the code applies. Notes
[DESIGN-REVIEWED] 018cec8 Description read[DESCRIPTION-READ] 19b9830b0a186b0e0979602c559d0a3ec04aa02869ca9c308ecbf691a8ebc9ce 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) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The fix swaps the call to suit a regex instead of fixing the regex. The redaction sink check still misses every route that redacts only through Notes
What this change shipsInventory (8 items) — 7 justifiedIntent: let a maintainer see the agent-facing queue route among the Security panel's redaction sinks, and make the docs state the reach the code already gives. This is a FIX.
[FIRST-PRINCIPLES-REVIEWED] 018cec8 Description read[DESCRIPTION-READ] d98288e779be2dcb91acbcce4da168b4057a82cbdbecef47f5af2d04a642ece2 That sha256 names the PR description this verdict read. 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: |
Sensitive change review
|
Code change approver recommendation: ApproveWhy: the decider estimates a 7% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. Approved. The excerpt now calls An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
0a0b5a1 to
7323c9f
Compare
Sensitive change review
|
|
Rebased: main moved in docs/feature-map/README.md, docs/system-specs/modules/history.md, docs/system-specs/modules/metrics.md, docs/system-specs/modules/shared-crew.md, src/kiro_crew/dashboard/chat_utils.py, src/kiro_crew/dashboard/chat_utils_display.py, src/kiro_crew/dashboard/mcp_oauth_expiry_watch.py, test/test_mcp_oauth_expiry_watch.py, test/test_restore_large_session_fixture.py, test/test_shared_crew_access_set.py, test/test_slack_title_text.py since this head went green (4de745e -> 0feaa8b); CI re-running. |
bolichen97
left a comment
There was a problem hiding this comment.
Thanks. I read the whole diff on this head, and all checks are green. Several parts are good to keep as they are:
- The docs and tool description now name the
agent.session_manager_chainreach, which matches what the code already applies. - The new "Session control queue" posture row.
- The renderer's one-line guard, now covering the entry id too.
- The cron twin-row id test.
I am requesting changes on one part: what list returns.
On main, session_queue list gives the calling agent a redacted, 200-character excerpt for every entry, and the target's title and running state. This head drops the excerpt for a person's entry and another session's, and drops title and running from the reply. No call fails, but the same caller on the same manager line now gets less than main gives it. That is a new restriction on an existing reader, and this repo does not take added strictness by default.
Please keep main's behavior as the default:
- Keep
excerpton every listed row, redacted withuser_origin=Falseas on main (queued_text_for_display). - Keep
titleandrunningin the reply and in_render_session_queue's header.
If you want the own-entries-only view, put it behind an opt-in setting that is off by default, and leave main's listing unchanged when it is off. The parts listed above can stay as they are. I will approve once the listing matches main by default.
7323c9f to
c324d63
Compare
Sensitive change review
|
|
note (non-blocking): the At this head, The PR keeps the parts you named. The tool description, the user doc and the spec row name the manager-chain reach. The Security panel has a The head is c324d63. |
…-chain reach The session_queue route sends queued text to the calling agent, but the Security panel listed no redaction sink for it. The queue excerpt now calls the display redactor directly, which gives the same text as queued_text_for_display(user_origin=False), and the route has its own "Session control queue" sink row. The tool description, the user doc and the spec now say that, with agent.session_manager_chain on, a manager further up the line can reach the queue too. The feature map names session_control_queue.py. A test pins the cron twin row to one id in both its cls and meta spellings. The listing is unchanged: every row keeps its redacted excerpt, and the reply keeps the target's title and running state.
c324d63 to
018cec8
Compare
Sensitive change review
|
|
Rebased: main moved in docs/system-specs/modules/instances.md, docs/system-specs/modules/session.md, src/kiro_crew/dashboard/chat_regenerate.py, src/kiro_crew/dashboard/chat_rewind.py, src/kiro_crew/dashboard/handlers/sessions.py, src/kiro_crew/dashboard/handlers_instances_crew_reads.py, src/kiro_crew/ui_prefs.py, test/test_instances_crew_reads.py, test/test_reply_format_once.py since this head went green (4e4bba3 -> 27e9359); CI re-running. |
bolichen97
left a comment
There was a problem hiding this comment.
RC point fixed. I read the whole diff on this head, and all checks are green.
The point from my earlier change request (review on 7323c9f) is addressed. session_queue list now matches main:
- Every listed row keeps its
excerpt._queue_excerptcalls_redact_for_displaydirectly. On main,queued_text_for_display(text, user_origin=False)returns exactly_redact_for_display(text)(dashboard/chat_delivery.py), so the output is the same. The direct call is what lets the new posture row name this module as its own redaction sink. titleandrunningare no longer removed. Neither the reply nor_render_session_queue's header changes against main.
The parts I said could stay are unchanged: the agent.session_manager_chain wording in the docs and tool description, the "Session control queue" posture row and its contract test, the renderer's one-line guard comment for the entry id, and the cron twin-row id test. No regex, and no new refusal.
Approving. This approval replaces my earlier change request.
Problem / Motivation
Goal: the Security panel lists the
session_queueroute as a redaction sink, and thesession_queuedocs name every session that can reach a queue.The
session_queueroute sends queued text to the calling agent as a redacted excerpt. The Security panel's sink list insrc/kiro_crew/security_posture_sinks_gateway.pyhas no row for that route, because the module callsqueued_text_for_display, and the sink check does not see that name as a redactor. The tool description and the user doc say the target is "one you created, or one handed to you". Withagent.session_manager_chainon, the caller can also reach a session that one of its managed sessions manages, and so on down the chain. Review on #15423 found these points, and that PR left them to this one, together with a missing test for the cron row's two id spellings.Why it matters
The Security panel is where a maintainer checks which routes send text out and how each one redacts it. A route that is missing from that list is not checked when the redaction rules change. An agent that reads the docs should learn the same reach that the code applies.
A cron notification's queued transcript row carries its id twice. If the two ids ever differed, a move would leave that row out of order in the transcript. Nothing tested that the one writer keeps them equal.
Not a goal
listreturns. Every row keeps its redacted excerpt, and the reply keepstitleandrunning.What changed (motivation → approach → change)
The queue route now has its own row on the Security panel, so a change to its redaction shows up in the same place as every other output path.
The excerpt in
src/kiro_crew/dashboard/session_control_queue.pynow calls_redact_for_displaydirectly. Before, it calledqueued_text_for_display(user_origin=False), which reaches the same function and gives the same text. The sink check looks for a redactor call in the module that a row names, so the direct call is what lets the newSession control queuerow insrc/kiro_crew/security_posture_sinks_gateway.pypass that check.The
session_queuetool description insrc/kiro_crew/mcp_dashboard_session_tools.py, the user docsrc/kiro_crew/docs/session-control.mdand the spec row indocs/system-specs/modules/session-control.mdnow name the manager-chain reach. The feature map's Session control row indocs/feature-map/README.mdnamessession_control_queue.py. A comment in_render_session_queueinsrc/kiro_crew/mcp_dashboard_session_runs.pynow says that the entry id is collapsed to one line for the same reason as the excerpt.The cron row keeps its id in the JSON
clsand inmeta.queueId. Remove matches either one, and the reorder readsmeta.queueIdfirst. A new test pinsqueue_cron_notification, the one writer of both, to the same id in each.Backwards compatibility
Compatible: the route accepts the same request body, applies the same gates and returns the same reply. The excerpt text is the same, because both calls reach the same redactor.
Tests
test_session_control_parts_contract.pycompares the session-control sink rows with a fixed set, and that set holds the newSession control queuerow.test/test_security_posture.pychecks that every redactor call site is a registered sink and that each listed sink module calls a redactor.test_a_cron_twin_row_names_one_id_in_both_spellingsreadsclsandmeta.queueIddirectly, checks that each holds the idqueue_cron_notificationreturns, and checks that remove finds the row by that id.session_queuetests pass unchanged, includingtest_list_redacts_and_cuts_every_excerpt.Proof: PROVEN test/test_session_control_parts_contract.py::test_the_drop_notice_is_its_own_output_path_beside_the_session_control_read (head c324d63)
The proof test is the sink-set check above. It fails when the
Session control queuerow is taken out.Determinism: the 2 changed tests passed 15 times at
-n0. The 91 tests intest/test_mcp_dashboard_session_queue.py,test/test_session_control_parts_contract.pyandtest/test_session_control.pypassed at-n 4 --dist loadgroup.The backend related set from
scripts/run_scoped_tests.py --surface backendpasses, 550 tests. flake8, isort, black and mypy are clean on the changed modules.Manual verification
N/A: unit coverage is sufficient. The change is a redactor call with the same output, a sink row, doc text and one test.
Related Issues
Fixes #36080
Follow-up to #15423.
Sibling sweep
Swept: git grep -n "_redact_for_display(|queued_text_for_display(" -- src/kiro_crew/dashboard/session_control_queue.py src/kiro_crew/dashboard/session_control_parts/ src/kiro_crew/dashboard/session_control.py
Siblings: none -- the only other session-control module that calls a redactor is
session_control_parts/delivery_containment.py, which already has its own sink row. Outside session control, four modules redact only throughqueued_text_for_display, as the Pattern harvest says.Pattern harvest
Rule candidate: the sink check in
test/test_security_posture.pyfinds redactor calls with_REDACTOR_CALL_RE, which matches\w*redact\w*(and notqueued_text_for_display(. So a module that redacts only through that wrapper is never classified. Four modules do that today:dashboard/card_send.py,dashboard/chat_api/prompt_queue.py,dashboard/chat_rewind.pyanddashboard/chat_turn/steer_queue.py. Adding the wrapper's name to the pattern would make each one take a sink row or aNON_EGRESS_REDACTION_MODULESentry. This PR does not make that change, because it would classify four routes outside the session-control queue.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)