Repository navigation
fix: the Chat tab notice of a finished gated run quotes the run's reply (#3654) - #3658
Conversation
…he run's reply (#3654) A person sends a gated request in an agent's Chat tab, the approver approves, and the run ends `success` while the agent declined the work. The Chat tab notice ended "...ran as execution E. success." and quoted nothing, so a run that did nothing read as done. The Inbox note and the agent requester's notice for the same run already quoted the reply (#3520). `request_status`, the conversation read, passed the record's `state_detail` (the bare execution status) as the notice detail. It now builds the detail and headline through `_completion_parts`, the helper `report_completion_on_terminal` uses, so the Chat text is the Inbox text word for word. The status comes from `state_detail`; the reply or error is quoted from the execution row while that row still shows the same status. A pruned row, or one that moved since the report, gives the status line with no quote. A cancelled or skipped run now reads "Cancelled" / "Skipped" in the Chat tab, where it read "Failed". Fixes #3654 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the Chat notice; cso diff report (#3654) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt (10 of 10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/review + /validate-prVerdict: APPROVE. No critical findings; one test to tighten (informational 1). /review (structural)Scope: clean. For #3654, the Chat-tab notice of a finished gated run now quotes the run's reply, word for word as the Inbox notice does.
Execution coverage
Informational
Interaction with #3657
/validate-prLane B (no schema), 4 files (+190/−6), 3 commits, head
Testing note: the author of this PR also owns the release-test row that re-tests it (A2 on abilityai/trinity-enterprise#847). That re-test needs a different tester for these legs. |
webmixgamer
left a comment
There was a problem hiding this comment.
Approving: no critical findings; the report is in the comment above. If you push again, please add the one-line assertion from informational 1 (assert "no output" not in text). It isn't blocking.
|
merge-train (2026-10-14): pushed one merge commit to this branch — |
Summary
successwhile the agent declined the work looked the same as one that did it.skill_gate_service.request_status(the conversation read) passed the record'sstate_detail, the bare execution status, as the notice detail. It now builds detail and headline through_completion_parts, the helperreport_completion_on_terminaluses for the Inbox and agent notices (Gated skill: the requesting agent is told the approved run started and gets no notice when it ends #3520). The Chat text equals the Inbox text word for word.state_detail. The reply or error is quoted from the execution row while that row still shows the same status. A pruned row, or one whose status moved since the report, gives the status line with no quote.Changes
src/backend/services/skill_gate_service.py—_completion_parts;request_statusandreport_completion_on_terminalcall ittests/unit/test_3654_chat_gate_run_reply.py— new, 9 testsdocs/memory/feature-flows/skill-gate.md— the Chat notice of a finished run; test table rowNo route, schema, frontend or submodule change.
Test Plan
cd tests && pytest unit/test_3654_chat_gate_run_reply.py -v(9 passed; all 9 fail ondev, with the issue's own string)test_3526_held_chat_trace.py,test_3520_gate_completion_notice.py,test_ent755_gate_card_view.py,test_3274_gate_notice.py(100 passed with the new file)Its reply (the run's output, not an instruction): "…"Known follow-up
A long reply (up to 1000 characters) renders in the Chat tab's centred muted system line. Readable; left-aligning long system lines is a separate frontend change.
Fixes #3654
🤖 Generated with Claude Code