Skip to content

fix(session): mark /new|/reset acks as status notices - #124633

Merged
obviyus merged 9 commits into
openclaw:mainfrom
ericcaiwx-star:fix/new-reset-ack-status-notice
Sep 5, 2026
Merged

obviyus merged 9 commits into
openclaw:mainfrom
ericcaiwx-star:fix/new-reset-ack-status-notice

Conversation

@ericcaiwx-star

@ericcaiwx-star ericcaiwx-star commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Bare /new and /reset acknowledgements are transient status notices, not ordinary assistant answers. Their producers omitted the existing ReplyPayload.isStatusNotice flag, 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

  • Mark the existing native and Gateway reset acknowledgements with isStatusNotice.
  • Preserve the flag in the canonical outbound projection.
  • Use the existing ReplyPayload type at command delivery instead of narrowing away its metadata and adding casts.
  • Keep ordinary answers unmarked and preserve reset failure, authorization, cancellation, and hook order.

The changed owners are src/auto-reply/reply/commands-reset.ts, src/gateway/server-methods/agent-session-reset.ts, src/infra/outbound/payloads.ts, and src/agents/command/delivery.ts.

No new lifecycle field, schema, protocol, permission, or configuration surface is added. session_start.reason remains 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_sending hooks. 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.

Path Baseline Tested head
Telegram /new Flag missing; answer hook changes acknowledgement Both hooks see isStatusNotice: true; user receives the clean acknowledgement
Telegram /reset Flag missing; answer hook changes acknowledgement Both hooks see isStatusNotice: true; user receives the clean acknowledgement
Installed agent --deliver, /reset Flag lost before the hook; acknowledgement annotated Both hooks retain the flag; actual Telegram delivery is clean
Installed agent --deliver, /new Flag lost before the hook; acknowledgement annotated Both hooks retain the flag; actual Telegram delivery is clean

The four bare commands require no model call. All four tested-head acknowledgements returned successful delivery.

Redacted event excerpt from the completed run:

native /new:   first hook status=true; second hook status=true
user received: ✅ New session started.
native /reset: first hook status=true; second hook status=true
user received: ✅ Session reset.
CLI /reset:    first hook status=true; second hook status=true
user received: ✅ Session reset.
CLI /new:      first hook status=true; second hook status=true
user received: ✅ New session started.

Anti-cheat controls on the same product-tested head:

  • Normal follow-up completed with “2 plus 3 equals 5.” and the ordinary-answer annotation.
  • After an actual Gateway restart, reset-with-tail completed with “6 plus 7 equals 13.” as ordinary answer content.
  • The installed CLI created a physically empty transcript, then reset it. The captured state has the existing v3 header at sequence zero and reset at sequence one.
  • The installed CLI normal follow-up completed with “9 plus 10 equals 19.”; both hooks kept it ordinary, the user received the annotated answer, and the CLI returned exit 0, status: ok, summary: completed, aborted: false, and delivery sent.
  • The final database backup retains schema 19, both session headers, and the completed exchanges. Temporary group cleanup and lease release succeeded.

The CLI follow-up uses the documented per-command --timeout 1800 for 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:

  • 683 tests pass across ten files and six shards, including reset authorization/failure behavior, pending resets, durable delivery, hook order/cancellation, and ordinary-answer controls.
  • Focused lint, runtime/UI builds, package integrity, and installation pass at the product-tested head.
  • All 37,841 tracked source blobs match that head before and after build.
  • The integration passes 125 focused delivery/payload tests and the assertion ratchet; all 37,878 tracked source blobs matched its isolated source copy. Stale assertion allowances were tightened after the removed casts.
  • The first two primary CI runs found a formatting mismatch in 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.
  • Failed-ACP behavior is covered by owner tests; no live ACP or Codex-backend reset coverage is claimed.

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:

  • The local JSON writer at src/agents/command/delivery.ts runs only when opts.json is set.
  • The tested Gateway bare-reset producer and normal ingress (agent-session-reset.ts, agent-run-execution-phase.ts, and their dispatch/prepare callers) do not set that option.
  • The tested non-local CLI writes its returned Gateway response through the unchanged src/commands/agent-via-gateway.ts path.
  • Reset producers, canonical transport projection, reply hooks, header owner and provider code used by the seven outcomes are unchanged. The complete before/after owner code, removed helper, callers and full product evidence are included in independent review.
  • The current revision changes only test layout; assertions, production code, runtime dependencies and scenario inputs are unchanged from the integration head.

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 ReplyPayload removes 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, including check-lint and openclaw/ci-gate.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Aug 16, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 4, 2026, 9:45 PM ET / September 5, 2026, 01:45 UTC.

ClawSweeper review

What this changes

Marks 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
Reviewed head: a427e6c352ad10700a1026810dda787e0e0d6e70

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with useful regression coverage and strong real-channel evidence; no blocking implementation defect was found.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The supplied Telegram Test Server observations exercise native and installed-CLI reset producers through actual Gateway delivery and two ordered plugin hooks: all four acknowledgements remain clean, while ordinary and reset-tail answers remain ordinary content. Proof is retained from 4f158c9 with the integration-continuity limitation recorded separately.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The supplied Telegram Test Server observations exercise native and installed-CLI reset producers through actual Gateway delivery and two ordered plugin hooks: all four acknowledgements remain clean, while ordinary and reset-tail answers remain ordinary content. Proof is retained from 4f158c9 with the integration-continuity limitation recorded separately.
Evidence reviewed 14 items Verified review boundary: Origin identifies openclaw/openclaw, and HEAD matches the pinned original PR head. The locally inspected base-to-head delta matches the host's introduced-file list. The stale test merge was not used to infer removal of current-main behavior.
Existing classification contract: ReplyPayload already defines isStatusNotice as transient status rather than assistant answer content. The existing status predicate, compaction replies, inline notices, TTS handling, and reply-threading policy use this distinction; a new option or parallel hook API is unnecessary.
Native producer repair: The complete reset handler was inspected. It marks ordinary bare acknowledgements and ACP success/failure notices without changing authorization, reset execution, routed-hook suppression, or reset-tail continuation. commands-core preserves the flag when normalizing the returned reply.
Findings None None.
Security None None.

How this fits together

Native 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]
Loading

Before merge

  • Resolve merge risk (P1) - Live proof targets the product-tested head rather than a rebuilt integration-head package; unavailable historical delivery/payload blobs limited independent verification of the intervening refactor. This is a reviewer-side continuity limitation, not missing contributor proof.
  • Complete next step (P2) - Rename 'What this fixes' to 'What Problem This Solves' in the PR body, preserving its explanation and Evidence section, to satisfy the failing context gate.
Agent review details

Security

None.

PR surface

Source +9, Tests +114, Other -1. Total +122 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 4 17 8 +9
Tests 6 127 13 +114
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 2 -1
Total 11 145 23 +122

Review metrics

Metric Value Why it matters
Production versus regression coverage Production +17/-8 (net +9); tests/support +127/-13 (net +114); assertion baseline net -1 Production growth carries an existing classification through its owners, while three obsolete assertion allowances are removed; no parallel abstraction or configuration surface is added.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    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.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best 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.

Labels

Label justifications:

  • P2: This repairs a current, bounded acknowledgement-classification defect affecting reply-hook behavior without evidence of an urgent core outage or data loss.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (logs): The supplied Telegram Test Server observations exercise native and installed-CLI reset producers through actual Gateway delivery and two ordered plugin hooks: all four acknowledgements remain clean, while ordinary and reset-tail answers remain ordinary content. Proof is retained from 4f158c9 with the integration-continuity limitation recorded separately.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied Telegram Test Server observations exercise native and installed-CLI reset producers through actual Gateway delivery and two ordered plugin hooks: all four acknowledgements remain clean, while ordinary and reset-tail answers remain ordinary content. Proof is retained from 4f158c9 with the integration-continuity limitation recorded separately.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The change affects Telegram-visible reset acknowledgements when reply hooks are installed; the supplied Test Server evidence covers that behavior.

Evidence

What I checked:

  • Verified review boundary: Origin identifies openclaw/openclaw, and HEAD matches the pinned original PR head. The locally inspected base-to-head delta matches the host's introduced-file list. The stale test merge was not used to infer removal of current-main behavior. (a427e6c352ad)
  • Existing classification contract: ReplyPayload already defines isStatusNotice as transient status rather than assistant answer content. The existing status predicate, compaction replies, inline notices, TTS handling, and reply-threading policy use this distinction; a new option or parallel hook API is unnecessary. (src/auto-reply/reply-payload.ts:108, a427e6c352ad)
  • Native producer repair: The complete reset handler was inspected. It marks ordinary bare acknowledgements and ACP success/failure notices without changing authorization, reset execution, routed-hook suppression, or reset-tail continuation. commands-core preserves the flag when normalizing the returned reply. (src/auto-reply/reply/commands-reset.ts:167, a427e6c352ad)
  • Gateway entry point and delivery owner: agent-reset-phase calls the bare-result owner only after successful reset and excludes reset-with-tail from that acknowledgement path. The result builder adds the existing flag, and command delivery carries ReplyPayload through normalization to the canonical outbound projection and durable-send boundary. (src/gateway/server-methods/agent-session-reset.ts:68, a427e6c352ad)
  • Projection and hook contract: Both transport projections now preserve true status markers while leaving ordinary answers unmarked. Delivery preparation still invokes modifying hooks before queue custody; the hook runner passes updated payloads sequentially and retains its existing cancellation and media-trust protections. (src/infra/outbound/payloads.ts:324, a427e6c352ad)
  • Current main still needs the repair: At the fetched main revision, native reset acknowledgements and the Gateway bare-result builder omit isStatusNotice, and the outbound transport projection omits a caller-supplied marker. This establishes the remaining defect independently of the PR title. (src/auto-reply/reply/commands-reset.ts:200, 3e916e437c6c)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • wangmiao0668000666: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rename the opening PR-body heading to 'What Problem This Solves' so the existing explanation satisfies the repository's context parser.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (16 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-29T23:01:10.837Z sha 05b67df13af55b7af8873a4ac97211e01f8693a2 :: needs real behavior proof before merge. :: [P2] Preserve the status flag through Gateway reset delivery
  • reviewed 2026-08-29T23:52:21.425Z sha ccf8b647673af971804be7c5906a7d62eab31185 :: needs real behavior proof before merge. :: [P1] Resolve the public session-start contract before adding reason
  • reviewed 2026-08-30T00:09:42.931Z sha d9701a3d0d59cda7cf754925f6de16e5947f95e9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T15:06:50.852Z sha 8206ff1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-01T15:23:32.159Z sha 8206ff1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-02T05:45:20.777Z sha 8206ff1 :: needs maintainer review before merge. :: none
  • reviewed September 3, 2026, 3:05 AM ET / 07:05 UTC sha unknown :: blocked before merge. :: none
  • reviewed 2026-09-05T01:21:39.389Z sha 4f158c9 :: needs maintainer review before merge. :: none

steipete added a commit that referenced this pull request Aug 16, 2026
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.
@ericcaiwx-star
ericcaiwx-star force-pushed the fix/new-reset-ack-status-notice branch from 54ca31b to 07110c5 Compare August 16, 2026 16:28
@ericcaiwx-star

Copy link
Copy Markdown
Contributor Author

Addressed the ClawSweeper P1 and added owner-boundary proof on 07110c51a2d2344d7811473d353b03a607099ac2.

session_start.reason is now forwarded from every predecessor-replacing producer, not only Gateway reset:

  • chat /new / /reset / idle / daily in src/auto-reply/reply/session.ts
  • compaction in src/auto-reply/reply/session-updates.ts
  • sessions.create successor starts in src/gateway/session-create-service.ts
  • agent-send rollovers in src/gateway/agent-turn/agent-handler-helpers.ts

/new and /reset acks stay isStatusNotice: true. A reply_payload_sending banner plugin now sees that flag and leaves ✅ New session started. unchanged, while still appending onto ordinary model text.

node scripts/run-vitest.mjs \
  src/auto-reply/reply/session-hooks-context.test.ts \
  src/auto-reply/reply/session-updates.lifecycle.test.ts \
  src/auto-reply/reply/commands-reset-hooks.test.ts \
  src/gateway/server.sessions.reset-hooks.test.ts \
  src/plugins/wired-hooks-reply-payload-sending.test.ts

67/67 passed (15.98s). Verdict JSON is in the PR body.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 16, 2026
@ericcaiwx-star
ericcaiwx-star force-pushed the fix/new-reset-ack-status-notice branch from 07110c5 to 2335594 Compare August 17, 2026 01:06
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 17, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
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.
@ericcaiwx-star

Copy link
Copy Markdown
Contributor Author

Exact-head mock-transport gateway proof (rebased head 23355948)

Ran the full PR test set on the current head (rebased onto latest main) with an ephemeral gateway / mock transport:

pnpm test src/gateway/server.sessions.reset-hooks.test.ts \
  src/plugins/wired-hooks-reply-payload-sending.test.ts \
  src/auto-reply/reply/session-hooks-context.test.ts \
  src/auto-reply/reply/session-updates.lifecycle.test.ts \
  src/auto-reply/reply/commands-reset-hooks.test.ts
{
  "ok": true,
  "head": "2335594874c11dec277759a9951c88fa071b6afe",
  "totals": { "files": 5, "tests": 67, "passed": 67, "failed": 0 },
  "observed": [
    "sessions.reset emits session_start.reason = \"new\" (server.sessions.reset-hooks.test.ts:606)",
    "sessions.create successor starts forward reason = \"new\" (same file :744, :879)",
    "/new ack isStatusNotice=true; reply_payload_sending banner plugin leaves the ack unchanged and still banners ordinary model text (wired-hooks-reply-payload-sending.test.ts)",
    "chat /new|/reset|/fresh/idle/daily session_start.reason matches session_end.reason"
  ]
}

The gateway tests run against the ephemeral mock-transport gateway harness (vitest.gateway.config.ts); the plugin test asserts the /new ack is a single status notice that hook-augmented delivery leaves untouched.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. clawsweeper-recovery-stuck and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. clawsweeper-recovery-stuck labels Aug 17, 2026
@ericcaiwx-star
ericcaiwx-star force-pushed the fix/new-reset-ack-status-notice branch from 2335594 to 05b67df Compare August 21, 2026 05:59
ericcaiwx-star and others added 5 commits September 1, 2026 21:38
…_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]>
@ericcaiwx-star
ericcaiwx-star force-pushed the fix/new-reset-ack-status-notice branch from d9701a3 to 8206ff1 Compare September 1, 2026 13:42
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 1, 2026
@ericcaiwx-star

Copy link
Copy Markdown
Contributor Author

Isolated ephemeral-Gateway composed proof

Exact head 8206ff15cf537c87db9360b62f96b01a7e1539de.

Isolated OPENCLAW_STATE_DIR under /tmp (not the operator ~/.openclaw). Loopback Gateway on port 57796, not 18789. A load-path channel plugin recorded the real sendText. A live reply_payload_sending banner hook would append \n⏳ session too long, try /new unless isStatusNotice.

Invoked with delivery enabled:

openclaw agent --message /reset --session-key agent:main:main --deliver --reply-channel proof-reset-ack --reply-to proof-peer --json
openclaw agent --message /new --session-key agent:main:main --deliver --reply-channel proof-reset-ack --reply-to proof-peer --json

Observed on both commands: hook isStatusNotice: true, wouldRewrite: false, channel send stayed the single status line (✅ Session reset. / ✅ New session started.), deliveryStatus.status: "sent". Verdict JSON is in the PR Evidence section.

Official Telegram Test Server is still skipped from this fork (no Convex broker for $telegram-e2e-userbot). This is the Rank-up ephemeral-Gateway alternative.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 2, 2026
@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

The verified head is 4f158c9c8ce21b230e9d2dfa366110ba7e579942, preserving all five contributor commits. The PR body now includes real Telegram event evidence for native and installed-CLI /new and /reset, ordinary follow-up and reset-tail controls, actual Gateway restart, and the final database capture. All 683 focused tests and package checks pass. The header prerequisite landed separately in #125336.

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.

@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 5, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Sep 5, 2026
@obviyus

obviyus commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

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 /new and /reset. Normal follow-up, Gateway restart, reset-with-tail and CLI answer delivery also completed. The PR body records the tested-package identity, unchanged-path proof reuse, and compaction/heartbeat limitations.

  • Bug: Reply hooks could treat reset acknowledgements as ordinary answers.
  • Fix: The reset producers set the existing status flag, and canonical outbound projection preserves it.
Before After
Answer-only hooks annotate bare reset acknowledgements All four acknowledgements remain clean through both hooks and real delivery
Ordinary replies must remain answer content All three normal/tail answers retain ordinary-answer handling

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling gateway Gateway runtime P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants