Skip to content

fix(auto-reply): long punctuation runs stall abort-trigger detection - #184433

Merged
obviyus merged 3 commits into
openclaw:mainfrom
LeizhenZhang:fix/abort-trigger-punctuation-scan
Oct 31, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
LeizhenZhang:fix/abort-trigger-punctuation-scan

Conversation

@LeizhenZhang

@LeizhenZhang LeizhenZhang commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Certain ordinary inbound text makes the shared abort-punctuation matcher repeatedly rescan the same run, blocking the Gateway main thread. The message need not be an abort command.

User Impact

The Gateway stays responsive while checking punctuation-heavy text. Existing abort words still abort, and ordinary message text is unchanged.

Why This Change Was Made

Allow a trailing match to start only at the beginning of its punctuation run. The character class, end anchor, normalization outputs and admission rules remain unchanged; the matcher no longer retries from every interior position. No message-size cap, new abort policy, retry behavior, configuration or protocol change.

Merged current main 828b81ad1f94f2a1d47692caf781cf02eb72af78 as requested. Preserve the contributor commits. Consolidate the standalone timing case into the existing admission-semantics coverage, removing duplicate casing examples and helper-output mirrors. Final production +6, test/helper delta 0, two files.

Evidence

Exact head c42ecae972a83d686f5f65042e1b333529f24fe8.

Built Gateway proof, controls and CPU evidence, using the prewritten measurement rule.

Official Node 24.22.1, secretless Docker, real built Gateway and ordinary authenticated chat.send; a task-local streamed provider fixture completes the turns. The private stress input is a long punctuation-heavy non-command message with a non-punctuation terminator. Its exact contents, size and generator are not published.

Warm round Main peak health RPC latency Candidate peak health RPC latency
1 3,037.0 ms 19.9 ms
2 3,065.3 ms 11.0 ms

The main-thread CPU profile attributes about 18,084.7 ms to the shared abort normalizer family on main versus 4.8 ms on candidate. Both refs use identical profiler flags. These two serial warm samples demonstrate this responsiveness regression; they are not a throughput or percentile benchmark.

Controls twice per ref: a normal punctuated Stop word aborts the exact held run and closes its provider stream; ordinary authored text remains unchanged in native history and provider input. Stress messages remain admitted ordinary turns and complete. No mock Gateway, preload, channel-specific or unauthenticated-input claim.

111,811 bounded semantic inputs have identical normalization and abort decisions. Candidate owner suite: 28 tests pass. The consolidated timing regression fails on main at 1,690.0 ms against its 500 ms bound and passes with the fix. Core build, targeted lint, formatting and whitespace pass.

The earlier SQLite conflict belongs to the contributor's prior head. Current-head CI is evaluated separately after the main merge; it is not treated as inherited without matching evidence.

Merge Danger

Two-way door: revert restores the old scan behavior with no state rollback. Blast radius is the shared abort-text matcher used by inbound admission and reply handling. Matching semantics, authorization, stored text, schemas, configuration and public interfaces are unchanged.

Abort detection trims trailing punctuation with a regex that is retried
from every character of a punctuation run that does not end the text.
Channels run it on inbound text before the agent turn, and Slack runs it
before sender checks, so a 40 KB message of `!` followed by one letter
stalled the Gateway event loop for about 5 s and a 60 KB one for about
23 s through a Matrix room in a gateway run from source.

A lookbehind now starts the match only at the first character of a
punctuation run, which removes the same trailing run in one pass.
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 26, 2026
@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Prevent abort-text detection from repeatedly rescanning long punctuation runs.

Example: An ordinary punctuation-heavy non-command message reaches authenticated chat.send.

  • Before: Reported peak health RPC latencies were 3,037.0 ms and 3,065.3 ms.
  • After: Candidate peaks were 19.9 ms and 11.0 ms, while normal Stop commands still worked.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Focused repair with shipped-entry-point before/after measurements, causal profiling, semantic controls, and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Exact-head built-Gateway proof exercises ordinary authenticated chat.send in secretless Docker on Node 24.22.1, with a streamed provider fixture and separate health driver; candidate responsiveness recovers while ordinary text and exact-run Stop behavior remain intact. The inspected downloaded images belong to the linked context-attachment PR and provide no evidence for this change.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Punctuation-heavy ordinary messages can make the Gateway temporarily unresponsive.
Reason: The small shared-owner repair addresses a measured runtime failure, and collaborator-directed proof confirms recovery without changing admission semantics.

Merge readiness

✅ Ready for maintainer review

This PR fixes a demonstrated Gateway responsiveness bug with a focused, semantics-preserving change; no actionable defects found.

Priority: P1
Reviewed head: c42ecae972a83d686f5f65042e1b333529f24fe8

Before merge

None.

Findings

None.

Agent review details

How this fits together

Inbound command routing, Gateway chat admission, and reply handling share an abort-text normalizer that converts message text into standalone Stop decisions.

flowchart LR
  A[Inbound message] --> B[Command normalization]
  B --> C[Shared abort matcher]
  C --> D[Ordinary turn admission]
  C --> E[Authorized Stop operation]
Loading

Technical review

Best possible solution:

Land the focused shared-matcher repair after the existing current-head checks pass.

Do we have a high-confidence way to reproduce the issue?

Current-main source retains the repeated-rescan path, and supplied built-Gateway evidence reproduces the stall on pinned main; this read-only review ran no target code.

Is this the best way to solve the issue?

The patch removes repeated scanning at the existing shared owner without changing accepted punctuation, Stop phrases, authorization, or authored text.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1a2eb9f0da9f.

Provenance checked

  • Shared abort-text normalization keeps the original intent (unknown: Auto-reply: normalize stop matching and add multilingual triggers #25103 documents punctuation-tolerant multilingual standalone matching; fix(ui): keep attached context out of message text #152539 carried the current module. Local follow and content searches reached unavailable historical objects, preventing verification of the matcher’s original introduction.)
  • Abort admission-semantics coverage keeps the original intent (36e277d: The session-controller refactor retained standalone, multilingual, targeted-command, and authorization contracts; this patch consolidates the responsiveness regression into that existing coverage.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +6. Total +6 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 2 11 5 +6
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 11 5 +6

Labels

Label changes:

  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P1: Ordinary admitted message text can block the shared Gateway main thread for multiple seconds.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-26T09:20:59.889Z sha c977058 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-27T00:27:06.859Z sha c977058 :: needs maintainer review before merge. :: none

Reviewed October 31, 2026, 6:37 PM ET / 22:37 UTC (Revision 3).

@LeizhenZhang

Copy link
Copy Markdown
Contributor Author

Added the requested raw Gateway output to the PR body (Evidence, "Real Gateway, per-message timing"), on the unchanged head c977058f11c.

I ran the Matrix Gateway harness again on this branch and on its merge base 17eea1b0042, one 60 KB ! message per Gateway, with OPENCLAW_DIAGNOSTICS=reply.profiler so the Gateway logs its own per-stage reply timing. The reply.handle_inline_actions stage for that message took 16,769 ms on main and 4 ms on this branch. On main the event-loop monitor attributed a 16,769 ms main-thread stall to that stage, and the slowest /healthz probe (17,551 ms) overlapped it. The body has the raw resolver-timing line, stall line and probe summary for both sides. The host was busy with unrelated jobs, so both Gateways also show unattributed stalls. The body says which numbers those affect.

On the failed checks-node-changed-1 job: src/auto-reply/reply/abort.target-owner.test.ts passed 12 of 12 local runs (3 on this branch and 3 on the merge base, each under Node and Bun 1.4.3). The PR changes only the trailing-punctuation regex, and the failing cases fail on a SQLite session-entry conflict. I read it as an intermittent failure in that test and do not have rights to re-run the job.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. 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: 🧂 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. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Oct 27, 2026
@LeizhenZhang

Copy link
Copy Markdown
Contributor Author

@steipete could you rerun the failed checks-node-changed-1 job on head c977058f11c (job 121485150792)? I do not have permission to rerun it, and it is what keeps openclaw/ci-gate red.

The 3 failures are all in src/auto-reply/reply/abort.target-owner.test.ts and concern session ownership at the Stop effect:

  • fast Stop current owner > checks the published conversation at the Stop effect (rebound=false): expected undefined to be true at abort.handoff.cases.ts:431
  • command Stop current owner > checks the published conversation at the Stop effect (rebound=false): result shape mismatch at abort.handoff.cases.ts:417
  • command Stop current owner > does not reclaim a conversation reassigned after abort preparation: SqliteSessionMutationConflictError at abort.target-owner.test.ts:872

This PR only changes the trailing-punctuation regex in abort-trigger-text.ts. Old and new isAbortTrigger return the same result on the abort words with and without trailing punctuation, and the new abort-trigger-text.test.ts passed in the same CI job. The file also passed 12 times locally on this branch and on its merge base with Node and Bun 1.4.3, as noted above. A rerun would show whether these ownership assertions are timing-dependent. Thanks!

@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Responsiveness proof rule

Before the new built-artifact replay: use a secretless isolated Gateway and the ordinary chat.send entry point. Warm the Gateway with an ordinary completed turn and cached health RPCs. Send a long punctuation-heavy non-command message, with a non-punctuation terminator, and measure monotonic health RPC latency from a separate driver process while it is handled. Run two rounds on pinned current main and two on the candidate, serially on the same fixture setup.

Acceptance: reproduce a multi-second responsiveness stall on main and remove that stall on the candidate (target: each measured candidate round below one second). Normal standalone abort words must still stop an active held turn, and ordinary user text must remain unchanged at the local provider boundary. Report individual samples and controls, not a general throughput or percentile claim. The exact stress input and its generator remain private; only its shape and measured latency will be published.

Current main is being merged as requested before candidate proof. The contributor's older SQLite CI failure is prior-head evidence, not a reason to skip reproduction or a claim that the new head is green.

@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Built Gateway responsiveness proof

Exact candidate c42ecae972a83d686f5f65042e1b333529f24fe8; pinned main 828b81ad1f94f2a1d47692caf781cf02eb72af78, merged into the contributor branch before candidate proof.

Pre-run measurement rule. Official Node 24.22.1, secretless Docker, real built Gateway, ordinary authenticated chat.send, native health RPCs measured with a monotonic clock in a separate driver process. Both refs use the same task-local streamed provider fixture and CPU-profiler flags. Warm an ordinary completed turn and health calls first, then run two serial inbound-text rounds per ref.

The stress input is a long punctuation-heavy non-command message with a non-punctuation terminator. Its exact contents, size and generator are intentionally not published. No runtime preload, mocked Gateway, admission bypass or message-size policy change.

Warm inbound round Main peak health RPC latency Candidate peak health RPC latency
1 3,037.0 ms 19.9 ms
2 3,065.3 ms 11.0 ms

Subsequent health calls returned in 0.6–1.2 ms on both refs. Initial warm health samples were approximately 23–26 ms, followed by approximately 1 ms cached calls. Candidate meets the prewritten below-one-second criterion in both rounds. These are individual warm, serial, CPU-profiled samples—not a general throughput or percentile claim.

Causal signal: the Gateway main-thread CPU profile attributes approximately 18,084.7 ms to the shared abort normalizer family on main, versus 4.8 ms on the candidate. Main's trailing matcher accounts for 76.6% of sampled on-CPU time. The sampled stacks include ordinary chat admission and downstream reply abort checks in built dist modules, tying the responsiveness delay to this owner rather than provider wait time.

Controls, twice per ref: an ordinary message reaches native history and the provider with its authored text unchanged. A normal standalone punctuated Stop word stops an active held turn: the response identifies that exact run, and its provider stream closes. Stress messages remain ordinary admitted turns and complete successfully. Both Gateways shut down cleanly. No channel-specific or unauthenticated-input claim.

Matching equivalence: 111,811 bounded short inputs produce identical normalization and standalone-abort decisions on main and candidate. All 28 existing abort-owner tests pass on the candidate. The consolidated regression fails on main at 1,690.0 ms versus its 500 ms bound and passes with the fix. Build, targeted lint, formatting and whitespace checks pass.

The standalone duplicate test file was removed; its long-run positive/negative timing guard now lives in the existing admission-semantics case, replacing redundant casing examples while keeping multilingual, targeted-command and authorization coverage. Test-line delta 0; production +6, two files. Matching characters, outputs and admission policy are unchanged. Current-head CI and review are requested separately; the contributor's earlier SQLite conflict is not being presented as current-head evidence.

@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@obviyus
obviyus merged commit 0a171b4 into openclaw:main Oct 31, 2026
135 checks passed
@obviyus

obviyus commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Landed in 0a171b4. Thanks @LeizhenZhang. Long messages no longer stall the Gateway during the abort-word check.

github-actions Bot pushed a commit to u12ebauer/openclaw that referenced this pull request Oct 31, 2026
…(#184433)

fix(chat): keep the Gateway responsive while checking long messages for abort words

The shared normalizer that strips punctuation before checking for abort words such as "stop" used a regular expression that backtracked heavily on some long inbound messages. One `chat.send` could block the Gateway's event loop for about three seconds. The normalizer now uses a linear scan with the same results. Abort words still abort the run, and ordinary messages are unchanged.

Evidence: built Gateway with ordinary `chat.send`. Main's peak health RPC delay was 3,037 ms and 3,065 ms; with this change it was 19.9 ms and 11.0 ms. CPU profiles attribute the stall to the shared abort normalizer. Normal stop words still aborted the held run and closed its provider stream, and ordinary text was unchanged, twice per ref. 111,811 old-versus-new comparisons showed no differences. Details: openclaw/openclaw#184433 (comment).

Thanks @LeizhenZhang.

Co-authored-by: Ayaan Zaidi <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
…penclaw#184433)

fix(chat): keep the Gateway responsive while checking long messages for abort words

The shared normalizer that strips punctuation before checking for abort words such as "stop" used a regular expression that backtracked heavily on some long inbound messages. One `chat.send` could block the Gateway's event loop for about three seconds. The normalizer now uses a linear scan with the same results. Abort words still abort the run, and ordinary messages are unchanged.

Evidence: built Gateway with ordinary `chat.send`. Main's peak health RPC delay was 3,037 ms and 3,065 ms; with this change it was 19.9 ms and 11.0 ms. CPU profiles attribute the stall to the shared abort normalizer. Normal stop words still aborted the held run and closed its provider stream, and ordinary text was unchanged, twice per ref. 111,811 old-versus-new comparisons showed no differences. Details: openclaw#184433 (comment).

Thanks @LeizhenZhang.

Co-authored-by: Ayaan Zaidi <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 9, 2026
Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: 0a171b4 — Leizhen Zhang — fix(auto-reply): long punctuation runs stall abort-trigger detection (#184433)
Backport-of: 49600b5 — Long Jin — fix(memory): preserve inline notes during MEMORY.md compaction (#164089)
Backport-of: 982f3b1 — RoboClaw — fix(imessage): report Automation failures after Gateway updates (#186117)
Backport-of: 3f7ee38 — art22s — fix: require approval for dynamic shell predicates (#187884)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 9, 2026
* fix(gateway): publish node reapproval with committed pairing facts

Adapt main commit 94f180d to the extended-stable worker dispatcher, retaining cleanup admission and stale-session fencing.

Co-authored-by: RomneyDa <[email protected]>

* test(gateway): clarify CLI announcement tool-only phase

Keep exact token, barrier, and completion ordering assertions intact while explicitly excluding narration before the barrier.

Co-authored-by: RomneyDa <[email protected]>

* style(gateway): format node reapproval regression

Reflow the spy chain reported by hosted CI; no behavioral changes.

Co-authored-by: RomneyDa <[email protected]>

* test(secrets): decouple Telegram fixture from plugin discovery

Import the real public Telegram secret collector directly so collection does not depend on Gateway discovery environment. Exercise collection with bundled plugins disabled while retaining existing token assertions. Gateway timeout attribution remains unresolved; no production behavior or timeout changes.

Co-authored-by: RomneyDa <[email protected]>

* test(secrets): load Telegram fixture through public resolver

Replace the static extension import rejected by core type and boundary checks with the existing test public-artifact resolver. Keep the real collector in the Vitest module graph and preserve the disabled-discovery regression.

Independent source review accepted; local test, typecheck, build, install, and performance execution remain excluded by operator instruction. Hosted CI must validate the correction.

Co-authored-by: RomneyDa <[email protected]>

* style(secrets): format Telegram fixture import

Co-authored-by: RomneyDa <[email protected]>

* fix(ui): honor recovery holds before initial chat history

Keep drafting available while the existing send owner holds recovery or a retained initial turn. Restore Send when that hold clears without waiting for initial history or submitting the draft automatically.

Add renderer regressions for both holds and clarify the pre-history outbox contract. Controlled real-Gateway red/green evidence: 42523861169 / 42526889715. Diagnostic branch is not merged.

Co-authored-by: RomneyDa <[email protected]>

* fix(ui): preserve startup status presentation while holding send

Restore the existing connected startup/history status suppression without reopening Send admission. Extend both durable hold regressions to reject the duplicate composer status band. Existing cloud E2E assertions remain unchanged.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): backport installer, service, path and telemetry repairs

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: eb5d0cb — Javier MV — fix(install): keep the installed runtime private under umask 0002 (#186782)
Backport-of: b079019 — Sukhdeep — fix(daemon): Gateway repair stops the Gateway and fails when macOS denies the Trash (#189321)
Backport-of: 558e2f3 — YangManBOBO — fix(cli): compare gateway state dirs case-insensitively on Windows (#185917)
Backport-of: b7ce1c3 — Peter Steinberger — test(windows): keep ordinary CLI coverage in one partition
Backport-of: ba75cf7 — Juan Buhagiar Duijst — fix(diagnostics-otel): gateway stalls after model calls on large sessions with content capture on (#186666)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): preserve notes and harden messaging and exec approval

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: 0a171b4 — Leizhen Zhang — fix(auto-reply): long punctuation runs stall abort-trigger detection (#184433)
Backport-of: 49600b5 — Long Jin — fix(memory): preserve inline notes during MEMORY.md compaction (#164089)
Backport-of: 982f3b1 — RoboClaw — fix(imessage): report Automation failures after Gateway updates (#186117)
Backport-of: 3f7ee38 — art22s — fix: require approval for dynamic shell predicates (#187884)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): retain sandbox, recovery lease and Matrix boundaries

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: a19f1bf — Agustin Rivera — fix(agents): fail closed when sandboxed spawned children resolve CLI-backed models (#178742)
Backport-of: c9f3f82 — Peter Steinberger — fix(agents): release restart-recovery fences for killed runs (#181992)
Backport-of: dfb6454 — Leizhen Zhang — fix(matrix): crafted formatted_body stalls the Gateway in the mention check (#184432)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(config): preserve last-good state through writes and rollback

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: 99418fc — weiqinl — fix(config): keep last-known-good when the observer flags the config as truncated (#152565)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(sessions): preserve history when relocating relative stores

Adapt approved source fixes to the September extended-stable owners. Preserve original APIs and custody; include review-driven regressions.

Backport-of: a64daf7 — Peter Steinberger — fix(sessions): resolve relative session stores against the state dir, not the working directory (#182444)

Validation: independent source review, exact patch/file identity and git diff --check. Runtime tests, types and builds deferred to authorized remote CI; not run locally.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): repair September backport type contracts

Split terminal recovery actions into distinct discriminants without changing behavior. Use the branch-native Doctor import signature, checking held maintenance authority before and after the awaited import.

Validation: independent exact-diff source review, formatter and git diff --check passed. Local tests, typechecks and builds not run per operator restriction; fresh exact-head remote qualification required. Repairs CI 42643973970 attempt 1.

Co-authored-by: RomneyDa <[email protected]>

* fix(release): align backport regressions with September contracts

Preserve uncertain config-write outcomes while correcting branch-native fixture APIs and lint errors found by hosted CI.

Co-authored-by: RomneyDa <[email protected]>

* test(ci): separate Windows capacity from growing inventory

Keep package coverage and the five-job limit independent of a historical timing snapshot. Preserve the rounded capacity boundary and exercise the documented bounded-growth fallback with fixed estimates.

Co-authored-by: RomneyDa <[email protected]>

* test(node-host): keep launcher cleanup with its invoke owner

Wait for a positive launcher PID before probing liveness, and cancel through the existing invocation owner on every exit path. Never send SIGKILL to file-derived PID zero.

Co-authored-by: RomneyDa <[email protected]>

* test(release): observe owned Gateway reservation cleanup

Verify the real reservation closes before relaunch instead of rebinding an already-released port that another socket can acquire. Preserve all seven packaged startup recovery scenarios.

Co-authored-by: RomneyDa <[email protected]>

* test(release): capture native compiler busy-executable evidence

Preserve real API execution and errors while recording failure-only executable inode and writable descriptor metadata. Add a Linux kernel-path diagnostic regression; no retry or copy change.

Co-authored-by: RomneyDa <[email protected]>

* test(release): repair stability regression fixtures

Register CLI admission metadata through the runtime registry, observe the rollback health baseline, and preserve exact SQLite byte expectations.

Co-authored-by: RomneyDa <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 11, 2026
…penclaw#184433)

fix(chat): keep the Gateway responsive while checking long messages for abort words

The shared normalizer that strips punctuation before checking for abort words such as "stop" used a regular expression that backtracked heavily on some long inbound messages. One `chat.send` could block the Gateway's event loop for about three seconds. The normalizer now uses a linear scan with the same results. Abort words still abort the run, and ordinary messages are unchanged.

Evidence: built Gateway with ordinary `chat.send`. Main's peak health RPC delay was 3,037 ms and 3,065 ms; with this change it was 19.9 ms and 11.0 ms. CPU profiles attribute the stall to the shared abort normalizer. Normal stop words still aborted the held run and closed its provider stream, and ordinary text was unchanged, twice per ref. 111,811 old-versus-new comparisons showed no differences. Details: openclaw#184433 (comment).

Thanks @LeizhenZhang.

Co-authored-by: Ayaan Zaidi <[email protected]>

Release adaptation: Extend existing abort-entrypoint regression. Baseline RED; 15 GREEN (48.36s wrapper).
Exact production patch retained. Independent P0-P2 source and boundary review found no actionable findings. Targeted typed lint: zero warnings/errors; formatting and diff checks pass. Integrated release push gate and stable FRV remain required.

(cherry picked from commit 0a171b4)
Co-authored-by: RomneyDa <[email protected]>
RomneyDa added a commit that referenced this pull request Nov 17, 2026
Backport #184433 to the signed v2026.11.5 baseline. Preserve shared
abort-trigger semantics while restricting trailing matches to run starts.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS 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