Repository navigation
improve: speed up streaming text with inline brackets - #154398
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 12:21 AM ET / 04:21 UTC. ClawSweeper reviewWhat this changesAvoid unnecessary tool-call scanning for ordinary inline brackets while preserving standalone tool-call removal, with tests for prose, Unicode indentation, and line endings. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, focused optimization absent from the inspected main and release revisions. No actionable correctness or security findings were identified. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw filters assistant text before streaming and delivery to remove serialized tool-call blocks. This change lets ordinary bracket-containing prose bypass deeper parsing and Markdown code-region discovery. flowchart TD
A[Assistant text] --> B[Visible text filters]
B --> C{Possible standalone tool call?}
C -->|No| F[Preserved visible text]
C -->|Yes| D[Find protected code regions]
D --> E[Scan and remove tool-call blocks]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource 0, Tests +26. Total +26 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the optimization in the existing scanner owner and retain the established parsing and literal-text contracts. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the repeated-work path: ordinary inline brackets pass the existing prefilter and trigger deeper scanning despite lacking a valid line-start opener. Runtime timings were supplied by the author and were not rerun. Is this the best way to solve the issue? Yes. Aligning the cheap prefilter with the existing scanner grammar removes unnecessary work without introducing another parser, changing public APIs, or migrating user state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c198a55ceb7. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (49 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119) docs: reserve Team live updates for Night Watch (openclaw#154425) test(meeting-bot): control browser retry fixture clocks (openclaw#149174) fix(ui): use remote defaults for manual worktree creation (openclaw#154364) fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013) fix(pr): revalidate head reads and reuse repository locators (openclaw#154212) fix(browser): start control when the Gateway has activated the plugin (openclaw#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156) improve: speed up streaming text with inline brackets (openclaw#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636) ci: use four Windows workers on the 16 class (openclaw#154261) feat: verify GitHub credit from trusted OIDC claims (openclaw#153940) feat(sessions): support explicit local placement for child sessions (openclaw#153912) fix(ui): prevent stale copies after text changes (openclaw#154259) perf(gateway): reuse session list candidates across viewers (openclaw#154003) perf(codex): bound progressive local catalog waits (openclaw#154362) docs: keep update requests owned through acceptance (openclaw#154111) perf(state): reduce main-thread coordinator waits (openclaw#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (#154119) docs: reserve Team live updates for Night Watch (#154425) test(meeting-bot): control browser retry fixture clocks (#149174) fix(ui): use remote defaults for manual worktree creation (#154364) fix(proxy): keep WebChat and Codex loopback calls direct (#154013) fix(pr): revalidate head reads and reuse repository locators (#154212) fix(browser): start control when the Gateway has activated the plugin (#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156) improve: speed up streaming text with inline brackets (#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636) ci: use four Windows workers on the 16 class (#154261) feat: verify GitHub credit from trusted OIDC claims (#153940) feat(sessions): support explicit local placement for child sessions (#153912) fix(ui): prevent stale copies after text changes (#154259) perf(gateway): reuse session list candidates across viewers (#154003) perf(codex): bound progressive local catalog waits (#154362) docs: keep update requests owned through acceptance (#154111) perf(state): reduce main-thread coordinator waits (#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (58 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (#154119) docs: reserve Team live updates for Night Watch (#154425) test(meeting-bot): control browser retry fixture clocks (#149174) fix(ui): use remote defaults for manual worktree creation (#154364) fix(proxy): keep WebChat and Codex loopback calls direct (#154013) fix(pr): revalidate head reads and reuse repository locators (#154212) fix(browser): start control when the Gateway has activated the plugin (#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (#154156) improve: speed up streaming text with inline brackets (#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (#153636) ci: use four Windows workers on the 16 class (#154261) feat: verify GitHub credit from trusted OIDC claims (#153940) feat(sessions): support explicit local placement for child sessions (#153912) fix(ui): prevent stale copies after text changes (#154259) perf(gateway): reuse session list candidates across viewers (#154003) perf(codex): bound progressive local catalog waits (#154362) docs: keep update requests owned through acceptance (#154111) perf(state): reduce main-thread coordinator waits (#154244) ...
* commit 'f76d38a4ac5e5f4e6c5a5320436db169e33d5c8a': (44 commits) fix(ci): remove duplicate database worker test entry fix(voice): keep audio flowing while the Gateway is busy (openclaw#154119) docs: reserve Team live updates for Night Watch (openclaw#154425) test(meeting-bot): control browser retry fixture clocks (openclaw#149174) fix(ui): use remote defaults for manual worktree creation (openclaw#154364) fix(proxy): keep WebChat and Codex loopback calls direct (openclaw#154013) fix(pr): revalidate head reads and reuse repository locators (openclaw#154212) fix(browser): start control when the Gateway has activated the plugin (openclaw#154255) improve: publish CI dependencies promptly and warm hosted JavaScript caches (openclaw#154156) improve: speed up streaming text with inline brackets (openclaw#154398) test: isolate historical Node runner policy from CI fix: refresh stale Gateway shutdown budgets during updates and Doctor (openclaw#153636) ci: use four Windows workers on the 16 class (openclaw#154261) feat: verify GitHub credit from trusted OIDC claims (openclaw#153940) feat(sessions): support explicit local placement for child sessions (openclaw#153912) fix(ui): prevent stale copies after text changes (openclaw#154259) perf(gateway): reuse session list candidates across viewers (openclaw#154003) perf(codex): bound progressive local catalog waits (openclaw#154362) docs: keep update requests owned through acceptance (openclaw#154111) perf(state): reduce main-thread coordinator waits (openclaw#154244) ...
Related: #145679
What Problem This Solves
Streaming assistant text containing ordinary inline brackets repeatedly triggers tool-call scanning and Markdown code-region discovery.
User Impact
Bracket-heavy prose takes less processing time while preserving visible text and the handling of actual tool-call blocks. No configuration or migration is required.
Why This Change Was Made
Require the same line start and indentation that the existing full-line tool-call scanner already requires before doing the deeper scan. Parser grammar, protected code regions, adjacent calls, and Harmony/XML alternatives remain with their existing owners.
Evidence
7d14778dependency installation and include the landed lazy snapshots; only this predicate differs. The candidate owner and caller bytes match the new branch; current-head CI covers integration.pnpm test packages/tool-call-repair/src/payload.test.ts --maxWorkers=1: 30/30 passed, 1.962 seconds wall time on the isolated Node 26 Linux install (default and JSON reporters). Independent review passed with no P0-P2 findings; CI seconds remain pending.Formatting passed. The changed-check plan selects core production and core tests; full lint/type/guard execution is delegated to the published-head CI. The final formatter change only reflows an
it.eachcall and adds an optional trailing comma.