Say why triage acknowledge writes nothing, instead of promising it will - #5410
Say why triage acknowledge writes nothing, instead of promising it will#5410yh928 wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
yh928 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe escalation logic updates drop and acknowledge logs with trigger source and task-card linkage. Acknowledge handling reports source-specific input retention, performs no memory write, and records evaluation through ChangesTriage decision logging
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/openhuman/agent/triage/escalation.rs`:
- Around line 69-88: Update the acknowledge logging in apply_decision to
describe durable retention based on envelope.source. Keep the trigger-history
retention statement only for composio sources, and provide source-appropriate
wording for webhook, cron, and external envelopes while preserving the existing
structured fields and no-action behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 156d8dd5-d34c-48e4-86d9-b1f0e17a86a0
📒 Files selected for processing (1)
src/openhuman/agent/triage/escalation.rs
The log claimed "input retained in trigger history" for every acknowledged trigger. Only the composio path has that archive — `trigger_history` is written by `ComposioTriggerSubscriber` before the triage gates. A webhook, cron, webview, or external acknowledge leaves nothing but the `TriggerEvaluated` event, so the line pointed an operator at a record that was never written for four of the five sources. The retention claim is now a `retained` field derived from `envelope.source`: the composio archive, or "none — verdict only". Regression pins that only composio names an archive. agent::triage 71 pass. Reported by CodeRabbit on tinyhumansai#5410. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRSNnqQsokuGmkbpLoLCGy
e0cd845 to
a994ca3
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
tinysweeper found nothing blocking. Approving.
$0.0021 · 16,131 in / 5,221 out · 3,567 cached (22%) · z-ai/glm-5.2
critique: $0.0010 · 5,484 in / 3,168 out · 896 cached (16%) · z-ai/glm-5.2
security: $0.0001 · 3,338 in / 24 out · 2,671 cached (80%) · z-ai/glm-5.2
tests: $0.0005 · 3,253 in / 1,044 out · 0 cached (0%) · z-ai/glm-5.2
description: $0.0005 · 4,056 in / 985 out · 0 cached (0%) · z-ai/glm-5.2
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/openhuman/agent/triage/escalation.rs (1)
799-813: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover
TriggerSource::Externalin this regression test.
TriggerSourcesupportsExternal, but this loop covers only Composio, webhook, cron, and webview. Add anExternalcase and assertnone — verdict only. The current wildcard returns the expected value, but the test does not protect this supported source from a future regression.Proposed test addition
TriggerSource::WebviewIntegration { provider: "gmail".into(), account_id: "a".into(), }, + TriggerSource::External { + caller_id: "caller".into(), + reason: "reason".into(), + },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/openhuman/agent/triage/escalation.rs` around lines 799 - 813, Add a TriggerSource::External case to the regression-test loop alongside the existing source variants, using the appropriate External fields, and assert that it produces no action (“none”) with only the verdict. Keep the existing assertions and wildcard behavior unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/openhuman/agent/triage/escalation.rs`:
- Around line 799-813: Add a TriggerSource::External case to the regression-test
loop alongside the existing source variants, using the appropriate External
fields, and assert that it produces no action (“none”) with only the verdict.
Keep the existing assertions and wildcard behavior unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 141361fd-33d2-4dc7-bada-666e850eb122
📒 Files selected for processing (1)
src/openhuman/agent/triage/escalation.rs
…e day The arm logged `memory-write is a future addition`, which described an unimplemented plan rather than the behaviour — and the plan was wrong. Writing a summary here would duplicate a document the connector sync has already ingested: the same mail, a second copy, competing with extracted memories for the same recall slots. That is tinyhumansai#5312, and tinyhumansai#5315 is the fix; this arm should not reopen it. Acknowledge is a classification, not a write, and the two things worth keeping are already kept. What the trigger *was* is durable in the composio trigger-history JSONL, written before the triage gates so it survives even with triage disabled. What it was *judged to be* went out as `TriggerEvaluated` a few lines above, for every action. What is actually missing is a record of what happened *after* the verdict — for every action, not just this one — which belongs in its own surface rather than bolted onto one branch. Filed as tinyhumansai#5408, and referenced from the comment so the next reader finds the work instead of re-deriving the note. The log line now states what happened and where to look, and carries `source` and `card_linked`. The sibling DROP arm gets the same two fields: both are "no downstream work" verdicts, and a dashboard filtering on `source=` would otherwise silently see only half of them. agent::triage 70 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRSNnqQsokuGmkbpLoLCGy
The log claimed "input retained in trigger history" for every acknowledged trigger. Only the composio path has that archive — `trigger_history` is written by `ComposioTriggerSubscriber` before the triage gates. A webhook, cron, webview, or external acknowledge leaves nothing but the `TriggerEvaluated` event, so the line pointed an operator at a record that was never written for four of the five sources. The retention claim is now a `retained` field derived from `envelope.source`: the composio archive, or "none — verdict only". Regression pins that only composio names an archive. agent::triage 71 pass. Reported by CodeRabbit on tinyhumansai#5410. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SRSNnqQsokuGmkbpLoLCGy
a994ca3 to
14028cf
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
The
Acknowledgearm oftriage::escalation::apply_decisionloggedmemory-write is a future addition. That described an unimplemented plan rather than the behaviour — and the plan was wrong. Replaces it with the reason the arm writes nothing, improves the log line, and files the work that note was actually pointing at.Problem
Three things, in order of how much they matter.
The planned write would have been a bug. Copying an acknowledged trigger's summary into the memory store duplicates a document the connector sync has already ingested — the same mail, a second copy, competing with extracted memories for the same recall slots. That is #5312; #5315 is the fix for the copies that already exist. A note inviting the next contributor to add another one is worse than no note.
The arm's real behaviour was undocumented. Acknowledge is a classification, and the two things worth keeping are already kept elsewhere:
trigger_historydaily JSONLDomainEvent::TriggerEvaluatedNeither is obvious from the arm, so "writes nothing" read as an omission rather than a decision.
The log said what was missing instead of what happened. A reader tailing logs for an acknowledged trigger got a parenthetical about future work and no statement of the outcome.
Solution
sourceandcard_linkedalongside the existing fields.DROParm gets the same two fields. Both are "no downstream work" verdicts; a dashboard filtering onsource=would otherwise silently see only half of them.No behaviour change: the arm wrote nothing before and writes nothing now.
Acceptance criteria
trigger_historyandTriggerEvaluated, both verifiable in the same file's call path.DROPandACKNOWLEDGEcarry the same field set.agent::triage70 tests;cargo check --lib --all-featuresclean.Related
Summary by CodeRabbit