Repository navigation
fix(session): mark /new|/reset acks as status notices - #124633
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review in progressClawSweeper is reviewing this revision. This supersedes any previous blocked status. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 9:45 PM ET / September 5, 2026, 01:45 UTC. ClawSweeper reviewWhat this changesMarks bare session-reset acknowledgements as status notices and preserves that classification through outbound delivery so reply plugins can distinguish them from assistant answers. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: the reset-acknowledgement defect remains on current main, and the merged related work does not replace this repair. No blocking code findings remain; the supplied real Telegram evidence supports the changed behavior. Priority: P2 Review scores
Verification
How this fits togetherNative chat commands and Gateway agent requests produce session-reset acknowledgements. Shared reply normalization and delivery pass those acknowledgements through plugin hooks before sending them to the user. flowchart TD
A[Native chat command] --> C[Reset acknowledgement]
B[Gateway agent request] --> C
C --> D[Existing status classification]
D --> E[Shared outbound projection]
E --> F[Reply plugin hooks]
F --> G[Channel delivery]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +9, Tests +114, Other -1. Total +122 across 11 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Preserve the existing status flag at both reset producers and the canonical transport boundary; the net nine production lines carry that missing contract without a new helper, option, or competing delivery path. Do we have a high-confidence way to reproduce the issue? Yes, from source: a bare native or Gateway reset reaches reply hooks without the existing status marker on current main, allowing answer-only hooks to modify the acknowledgement. The supplied baseline/live comparison supports this path; no local runtime reproduction was executed. Is this the best way to solve the issue? Yes. Classifying acknowledgements at their producers and preserving metadata through the shared projection fixes the owning boundaries; downstream command-text detection or another hook field would duplicate policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3e916e437c6c. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (16 earlier review cycles; latest 8 shown)
|
Fork pull requests were pinned to GitHub-hosted runners while maintainer PRs rode Blacksmith. That split arrived with ci.yml's first commit (f4f990a) and was never a reasoned posture -- no rationale in docs, commit bodies, or the ci-limits skill -- and this week's Blacksmith tranches widened the gap: maintainer walls are ~3:36 while the last fork PR I measured (#124633) took 13m0s. We already paid for it once in #118530, which raised the cross-repo artifact budget to 35 minutes because contributor PR #117992 timed out twice on hosted capacity. Runner choice now follows author_association: OWNER, MEMBER, COLLABORATOR, and CONTRIBUTOR get Blacksmith; FIRST_TIME_CONTRIBUTOR, FIRST_TIMER, NONE, and MANNEQUIN stay on hosted runners, which are free for public repos, so an unreviewed author cannot spend Blacksmith capacity. Earning the fast path requires a landed commit, which requires a maintainer merge. Note for anyone tempted to trim that list: maintainers report CONTRIBUTOR here, not OWNER/MEMBER, because org membership is concealed -- steipete's 74 sampled PRs are all CONTRIBUTOR. Dropping CONTRIBUTOR would move maintainer PRs to hosted. Scope is deliberately runner-only: 27 runs-on clauses. The 34 dependency-cache/use-actions-cache conditions and 6 job ifs stay fork-gated, because cache poisoning is a different risk from runner choice -- a fork run still never writes an archive a trusted run restores. Verified by evaluating all 25 configurable runs-on expressions: maintainer PR 12/25 Blacksmith, returning-contributor fork 12/25 (identical), unknown author 0/25, FIRST_TIME_CONTRIBUTOR 0/25, push to main 12/25 unchanged. Guard tests gained trusted/untrusted fork cases; 119 pass.
54ca31b to
07110c5
Compare
|
Addressed the ClawSweeper P1 and added owner-boundary proof on
67/67 passed (15.98s). Verdict JSON is in the PR body. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
07110c5 to
2335594
Compare
Fork pull requests were pinned to GitHub-hosted runners while maintainer PRs rode Blacksmith. That split arrived with ci.yml's first commit (25270d3) and was never a reasoned posture -- no rationale in docs, commit bodies, or the ci-limits skill -- and this week's Blacksmith tranches widened the gap: maintainer walls are ~3:36 while the last fork PR I measured (openclaw#124633) took 13m0s. We already paid for it once in openclaw#118530, which raised the cross-repo artifact budget to 35 minutes because contributor PR openclaw#117992 timed out twice on hosted capacity. Runner choice now follows author_association: OWNER, MEMBER, COLLABORATOR, and CONTRIBUTOR get Blacksmith; FIRST_TIME_CONTRIBUTOR, FIRST_TIMER, NONE, and MANNEQUIN stay on hosted runners, which are free for public repos, so an unreviewed author cannot spend Blacksmith capacity. Earning the fast path requires a landed commit, which requires a maintainer merge. Note for anyone tempted to trim that list: maintainers report CONTRIBUTOR here, not OWNER/MEMBER, because org membership is concealed -- steipete's 74 sampled PRs are all CONTRIBUTOR. Dropping CONTRIBUTOR would move maintainer PRs to hosted. Scope is deliberately runner-only: 27 runs-on clauses. The 34 dependency-cache/use-actions-cache conditions and 6 job ifs stay fork-gated, because cache poisoning is a different risk from runner choice -- a fork run still never writes an archive a trusted run restores. Verified by evaluating all 25 configurable runs-on expressions: maintainer PR 12/25 Blacksmith, returning-contributor fork 12/25 (identical), unknown author 0/25, FIRST_TIME_CONTRIBUTOR 0/25, push to main 12/25 unchanged. Guard tests gained trusted/untrusted fork cases; 119 pass.
Exact-head mock-transport gateway proof (rebased head
|
2335594 to
05b67df
Compare
…_start.reason Bare /new and /reset acks are system notices, not model prose. Carry the predecessor-boundary reason on every session_start producer so plugins can clear occupancy after chat reset, compaction, and create/send rollovers. Co-authored-by: Cursor <[email protected]>
A succeedsParent=false child keeps the parent active, so plugins must not treat that start as a predecessor-replacing boundary.
Gateway /new and /reset acks already mark isStatusNotice, but deliver:true projected that flag away before reply_payload_sending, so banner plugins still appended to the ack. Co-authored-by: Cursor <[email protected]>
Merge-from-main brought exact-equality session auth assertions that predate the status-notice flag, and the delivery fixture rejects that field without the same extra-payload cast siblings already use. Co-authored-by: Cursor <[email protected]>
Keep the status-notice ack repair. The public hook contract still says session_start has no reason field; session_end.reason stays the owner. Co-authored-by: Cursor <[email protected]>
d9701a3 to
8206ff1
Compare
Isolated ephemeral-Gateway composed proofExact head Isolated Invoked with delivery enabled: Observed on both commands: hook Official Telegram Test Server is still skipped from this fork (no Convex broker for @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review The verified head is The existing status field stays at its producers and canonical outbound projection; net production growth is reduced to +9. Compaction and background-heartbeat limitations remain explicit. Fresh exact-head independent review and CI are in progress. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks @ericcaiwx-star! Landed as 6135e4d from verified head 422eac1, preserving your primary authorship and Ayaan's co-author credit. Proof: Real Telegram Test Server delivery through two normally loaded reply hooks covered native and installed-CLI
683 focused tests and 125 integration tests are retained. The final pinned-formatter correction preserves every assertion. Fresh exact-head independent review completed 34 passes with no P0 findings; CI run 33937874757 passed. Guarded merge dry-run and merge succeeded. |
What Problem This Solves
Bare
/newand/resetacknowledgements are transient status notices, not ordinary assistant answers. Their producers omitted the existingReplyPayload.isStatusNoticeflag, and outbound projection dropped a caller-supplied flag. A normal reply plugin therefore treated the acknowledgement as answer content.This preserves EricCai's (@ericcaiwx-star) contribution and all five original commits.
Why This Change Was Made
isStatusNotice.ReplyPayloadtype at command delivery instead of narrowing away its metadata and adding casts.The changed owners are
src/auto-reply/reply/commands-reset.ts,src/gateway/server-methods/agent-session-reset.ts,src/infra/outbound/payloads.ts, andsrc/agents/command/delivery.ts.No new lifecycle field, schema, protocol, permission, or configuration surface is added.
session_start.reasonremains removed. The header-first prerequisite landed separately in #125336 and is integrated here.User Impact
Reply plugins can leave reset acknowledgements untouched while continuing to modify ordinary answers.
Evidence
Baseline:
26f87a37009bb452afae8523cbaf4063fbca247e.Product-tested head:
4f158c9c8ce21b230e9d2dfa366110ba7e579942.Integration head:
a427e6c352ad10700a1026810dda787e0e0d6e70.Current head:
422eac1ab5a34e97f24b9387bf57c5a92fb0417d.A normally loaded Plugin SDK observer registers two ordered
reply_payload_sendinghooks. The first annotates only ordinary answers; the second records the resulting payload. The scenario uses a real leased Telegram Test Server user and bot, the actual Gateway, an installed CLI package, and a real isolated inference provider. The channel, handlers, delivery, and model answers are not mocked./newisStatusNotice: true; user receives the clean acknowledgement/resetisStatusNotice: true; user receives the clean acknowledgementagent --deliver,/resetagent --deliver,/newThe four bare commands require no model call. All four tested-head acknowledgements returned successful delivery.
Redacted event excerpt from the completed run:
Anti-cheat controls on the same product-tested head:
status: ok,summary: completed,aborted: false, and deliverysent.The CLI follow-up uses the documented per-command
--timeout 1800for slow CPU inference. Bare commands use their normal defaults. Full prompts and tools were retained; measured input was 18,087 tokens for the normal Telegram turn and 23,403 for the CLI turn.Supporting verification:
delivery.test.ts: the local tool was 0.60.0, while CI pins 0.65.0. The current commit contains only the pinned formatter's layout correction. Both isolated formatting and the normal commit hook used 0.65.0; the committed bytes match and pass its check.Review Disposition and Limits
The requested canonical opening heading is now present. The real Telegram trace is supplied above.
ClawSweeper's integration-continuity limitation is addressed with source inspection, not a claim of a new package build. Main's #138332 removed an obsolete JSON-envelope helper and caused one adjacent test conflict. This integration retains main's canonical writer and this PR's status regression:
src/agents/command/delivery.tsruns only whenopts.jsonis set.agent-session-reset.ts,agent-run-execution-phase.ts, and their dispatch/prepare callers) do not set that option.src/commands/agent-via-gateway.tspath.The retained product proof therefore applies to those unchanged paths. No rebuilt package or fresh live run is claimed for either later head. The separately changed local JSON-writer behavior is covered by the 125 focused integration tests.
Production is +17/-8 (net +9); tests/support are +120/-8. The added production lines carry one existing flag through the affected owners. Reusing
ReplyPayloadremoves casts and avoids another payload abstraction. The self-testing banner-hook test and unrelated lifecycle assertion expansion were removed; real hook/delivery proof and owner regressions remain.Post-turn compaction first received a provider EOF, then hit its existing three-minute timeout. The Gateway recorded
continuing final delivery; the requested CLI answer was delivered and its transcript retained. Background heartbeat jobs also recorded timeout/retry during the long CPU run. Those complete failures remain in independent-review evidence; this PR does not claim to fix or validate those separate paths. Earlier failed proof/setup attempts and CI runs are retained.AI-assisted preparation. Fresh exact-head independent review completed all 34 passes with no P0 findings. CI run 33937874757 passed on
422eac1ab5a34e97f24b9387bf57c5a92fb0417d, includingcheck-lintandopenclaw/ci-gate.