Commit Graph

52377 Commits

Author SHA1 Message Date
Peter Steinberger
da831e2b8a docs: update changelog for landed fixes 2026-05-26 00:04:56 +01:00
Fermin Quant
399c692895 fix: dampen repeated device-required probes 2026-05-26 00:04:37 +01:00
Bryan Tegomoh
fc2d2d595c fix(ui): keep local file markdown links inert 2026-05-26 00:04:32 +01:00
Fermin Quant
342bde2af6 fix(update): avoid duplicate plugin smoke failures 2026-05-26 00:04:27 +01:00
Galin Iliev
d7361eff66 fix(gateway): cap retained compaction checkpoint bytes
Cap retained compaction checkpoint snapshots by total bytes per session while preserving the existing count cap.

The gateway now stats retained checkpoint snapshots inside the session-store writer before trimming, deletes older trimmed checkpoint files, and keeps the newest checkpoint available. Regression coverage uses real sparse checkpoint files to prove byte-budget cleanup.

Closes #84822.
2026-05-25 16:04:04 -07:00
Peter Steinberger
c1a026a976 fix: stabilize tests and reduce plugin memory churn 2026-05-26 00:01:30 +01:00
Peter Steinberger
1d21224de3 perf: reduce runtime metadata hotpath churn
Reduce runtime metadata hotpath churn by freezing loaded plugin metadata snapshots once and returning the memoized object without clone-on-hit. Reuse persisted package file signatures while preserving realpath containment, cache normalized Jiti alias maps by identity, and defer Discord realtime turn retention/logging until audio starts.

Verification:
- node scripts/run-vitest.mjs src/talk/turn-context-tracker.test.ts src/plugins/plugin-metadata-snapshot.memo.test.ts src/plugins/manifest-registry-installed.test.ts src/plugins/sdk-alias.test.ts src/plugins/installed-plugin-index-records.test.ts
- node scripts/run-vitest.mjs src/plugins/plugin-metadata-snapshot.memo.test.ts
- pnpm test extensions/discord/src/voice/manager.e2e.test.ts --testNamePattern "keeps realtime playback alive|interrupts realtime playback|does not interrupt realtime provider state"
- pnpm lint --threads=8
- pnpm exec oxfmt --check src/plugins/plugin-metadata-snapshot.ts src/plugins/plugin-metadata-snapshot.memo.test.ts src/plugins/manifest-registry-installed.ts src/plugins/installed-plugin-index-record-builder.ts src/plugins/sdk-alias.ts extensions/discord/src/voice/realtime.ts
- pnpm tsgo:core
- pnpm tsgo:extensions
- pnpm build
- autoreview --mode commit --commit HEAD
- PR CI green on head 7dd3e44a78
2026-05-25 23:59:45 +01:00
Peter Steinberger
a4f12699cf refactor: share realtime output activity tracking (#86661) 2026-05-25 23:51:34 +01:00
Peter Steinberger
acbdb8c373 fix(memory-wiki): bound compile page reads (#86660)
Summary
- Bound Memory Wiki compile-time page summary reads through the existing concurrency helper.
- Preserve deterministic result ordering before title sort and keep the helper in stop-on-error mode.
- Replaces #84458 because the fork branch does not allow maintainer edits and the contributor changelog entry needed removal.

Behavior addressed: Memory Wiki compile no longer starts one page-summary read per page without a bound.
Real environment tested: Local macOS source checkout, Node/pnpm repo environment.
Exact steps or command run after this patch: pnpm test extensions/memory-wiki/src/compile.test.ts; pnpm exec oxfmt --check --threads=1 extensions/memory-wiki/src/compile.ts extensions/memory-wiki/src/compile.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main --no-web-search --prompt "Review PR #84458 after maintainer fixup. Focus on memory-wiki compile page summary read concurrency, runTasksWithConcurrency result/error handling, ordering preservation, and test reliability."
Evidence after fix: compile.test.ts passed 10 tests; oxfmt reported clean; autoreview reported no accepted/actionable findings.
Observed result after fix: Page reads are executed through runTasksWithConcurrency with errorMode stop, successful results are consumed in input-index order, and the existing summary title sort remains deterministic.
What was not tested: Full repository suite.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
2026-05-25 23:49:43 +01:00
Vincent Koc
00f9809531 test(qa-matrix): use larger media coverage jpeg 2026-05-25 23:45:04 +01:00
YBoy
bec7d56b73 fix(cli): reject unknown command help roots (#81083) (thanks @YB0y)
Behavior addressed: Unknown CLI command roots now error consistently even when --help or --version is appended, while legitimate built-in help fast paths still render normally.

Real environment tested: Local OpenClaw source checkout plus GitHub workflow run-level status.

Exact steps or command run after this patch: pnpm test src/cli/run-main.exit.test.ts src/cli/argv.test.ts src/cli/argv-invocation.test.ts; pnpm exec oxfmt --check --threads=1 src/cli/run-main.ts src/cli/run-main.exit.test.ts; autoreview --mode branch --base origin/main --no-web-search.

Evidence after fix: Focused CLI test shards passed 178 tests; formatter clean; autoreview reported no accepted/actionable findings; GitHub CI run 26422344121 and CodeQL Critical Quality run 26422344090 completed successfully.

Observed result after fix: `openclaw foo --help` and `openclaw foo --version` reject before proxy/program startup, while known help fast paths remain ahead of the unknown-root guard.

What was not tested: Full local build; contributor PR body already supplied build/CLI command proof before rebase.

Co-authored-by: YB0y <brianandez6@gmail.com>
2026-05-25 23:38:43 +01:00
Peter Steinberger
68ab48b179 test: improve test profiling helpers 2026-05-25 23:36:34 +01:00
Peter Steinberger
ec7ad3b4ac perf: reduce fuzzy matching allocations 2026-05-25 23:36:07 +01:00
Peter Steinberger
1531fe2525 perf: reduce runtime cache churn 2026-05-25 23:35:06 +01:00
Peter Steinberger
0164fd5e99 refactor: reuse forced consult coordinator in discord voice (#86656) 2026-05-25 23:34:17 +01:00
Iftekhar Uddin
5e8a9a905d fix(scripts): drain codex-cli metadata stdout (#84239) (thanks @IftekharUddin)
Behavior addressed: The codex-cli metadata branch no longer calls process.exit(0) immediately after writing stdout, and it still emits exactly one unsupported-backend JSON object.

Real environment tested: Local OpenClaw source checkout on macOS with Node/tsx.

Exact steps or command run after this patch: pnpm test test/scripts/print-cli-backend-live-metadata.test.ts test/scripts/docker-build-helper.test.ts; node --import tsx scripts/print-cli-backend-live-metadata.ts codex-cli | python3 -c 'import sys,json; print(json.load(sys.stdin)["provider"])'; autoreview --mode branch --base origin/main --no-web-search.

Evidence after fix: Focused tooling test shard passed 2 files / 23 tests; direct pipe parse printed codex-cli; autoreview reported no accepted/actionable findings; PR status rollup was clean.

Observed result after fix: stdout is parseable as a single JSON payload and the normal metadata path is skipped for codex-cli.

What was not tested: Live provider metadata paths beyond the focused existing test coverage.

Co-authored-by: Iftekhar Uddin <ifuddin3@gmail.com>
2026-05-25 23:27:13 +01:00
Vincent Koc
75ac0b5ed9 fix(test): avoid discord voice tts activation tax 2026-05-26 00:19:17 +02:00
Dmitry Golubev
0f35ec29d3 fix(codex): disable native thread personality (#85891) (thanks @lastguru-net)
Behavior addressed: Native Codex app-server threads now disable Codex's built-in personality on thread/start, thread/resume, turn/start, bound conversation turns, and /btw side-thread forks so OpenClaw agent workspace identity stays authoritative.

Real environment tested: Local OpenClaw source checkout plus GitHub CI on PR #85891.

Exact steps or command run after this patch: pnpm test extensions/codex/src/app-server/thread-lifecycle.test.ts extensions/codex/src/app-server/side-question.test.ts extensions/codex/src/conversation-binding.test.ts extensions/codex/src/app-server/schema-normalization-runtime-contract.test.ts; pnpm check:docs; pnpm prompt:snapshots:check; OPENCLAW_ADDITIONAL_BOUNDARY_SHARD=1/4 OPENCLAW_ADDITIONAL_BOUNDARY_CONCURRENCY=4 node scripts/run-additional-boundary-checks.mjs.

Evidence after fix: Focused Codex test shard passed 4 files / 79 tests; docs check passed; prompt snapshots are current; CI passed all code/quality checks, with only Real behavior proof failing as unrelated proof-bot gating for this non-channel change.

Observed result after fix: App-server request snapshots and unit tests include personality: "none" on native Codex start/resume/turn/fork paths.

What was not tested: A live Codex app-server model run was not executed.

Co-authored-by: Beru <beru@lastguru.lv>
2026-05-25 23:15:03 +01:00
Peter Steinberger
fda0141a01 Refactor realtime voice turn context tracking (#86650)
* refactor: share realtime turn context tracking

* chore: track realtime voice sdk api baseline

* fix: preserve pruned realtime turn handle state
2026-05-25 23:13:27 +01:00
UB
48adcb162c test(discord): cover deliver-lambda abort-skip path via processDiscordMessage integration 2026-05-25 23:11:54 +01:00
UB
3a48366f3e fix(discord): surface silent reply-delivery skips and remove runtime.error optional-chain 2026-05-25 23:11:54 +01:00
Peter Steinberger
75c6cf2966 docs: update changelog for landed bug fixes 2026-05-25 23:08:05 +01:00
Vincent Koc
0f54221f86 test(qa-matrix): use valid media coverage jpeg 2026-05-25 23:07:11 +01:00
Sebastien Tardif
0a38932ed9 fix(gmail-watcher): strip listeners from old process after settleProcess to prevent late-exit respawn 2026-05-25 23:07:06 +01:00
Sebastien Tardif
94968c83c6 fix(gmail-watcher): prevent TDZ in settleProcess and guard exit handler against stale child respawn 2026-05-25 23:07:06 +01:00
Sebastien Tardif
2ffd7a7172 fix(hooks): stop existing Gmail watcher before re-entry to prevent leaks
renewInterval is not cleared on re-entry to startGmailWatcher,
leaking the previous timer. Each config reload adds another
interval that fires independently.

Clear existing watcher state before starting a new one.

Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
2026-05-25 23:07:06 +01:00
Earl Co
7b30291cc4 fix(codex): honor yolo app-server approval policy 2026-05-25 23:06:54 +01:00
Peter Steinberger
116c600f60 fix: treat zero-rate usage cost as unknown 2026-05-25 23:06:44 +01:00
Michael Zelbel
9c79a0f8f4 fix(usage-cost): invalidate durable cache on missing-cost semantics change
Bump USAGE_COST_CACHE_VERSION 3->4 so a warm .usage-cost-cache.json written by a
pre-change build is rebuilt instead of serving stale complete-$0 totals after
upgrade (the new missing-cost branch otherwise only runs when a file is rescanned).
Add a regression test asserting an older-version cache is treated as stale for an
unpriced session.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 23:06:44 +01:00
Michael Zelbel
16702496c6 fix(usage-cost): only flag catalog-default zeros, preserve operator-configured $0
Address review: distinguish unknown pricing from an intentional free price. A
turn's all-zero cost is treated as unknown (counted toward missingCostEntries)
only when the operator did NOT explicitly configure the model's price under
models.providers -- i.e. the zero is a generated-catalog default (codex/gpt-5.x),
not a deliberate $0. Operator-configured zero-cost models keep reporting a
complete $0.

Adds resolveConfiguredModelCost() to read config-only pricing, and regression
tests for both paths (unconfigured unknown -> missing; configured free -> $0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 23:06:44 +01:00
Michael Zelbel
6e85869161 fix(usage-cost): preserve transport-recorded positive cost for unpriced models
Only treat an unpriced (all-zero) model's turn as missing when it has no
trustworthy recorded cost (recorded cost is 0 or absent). A turn carrying a
real positive recorded cost is preserved, fixing a regression where priced
fixtures without explicit pricing config lost their recorded cost.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 23:06:44 +01:00
Michael Zelbel
1cc0a96df1 fix(usage-cost): surface unpriced-model spend as missingCostEntries instead of $0
Models that ship an all-zero cost block (e.g. codex gpt-5.5, whose Codex
backend exposes no per-token price) made usage-cost report totalCost: 0 with
missingCostEntries: 0 -- a confident, complete $0 -- so every budget/spike
safeguard keyed off totalCost was silently blind to real pay-per-token spend.

scanTranscriptFile now treats a resolved cost config with no positive per-token
rate (and no tiered pricing) as "pricing unknown": for turns that burned tokens
it drops the transport's fabricated $0 and surfaces the turn as a missing-cost
entry, mirroring the existing tiered-pricing override. Models with positive or
tiered pricing and zero-token entries are unaffected.

Verified on a real OpenClaw 2026.5.20 host (default openai/gpt-5.5, api_key):
1,780,235 tokens that previously reported missingCostEntries 0 now report 32.

Related: #85858

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 23:06:44 +01:00
Peter Steinberger
c4c80cea35 test(irc): cover transient channel join 2026-05-25 23:06:35 +01:00
Peter Steinberger
9cb1e4799c fix(irc): normalize channel route ids 2026-05-25 23:06:35 +01:00
Kaili
63dee51dfb fix(irc): store inbound channel routes as channel:#name and join before send 2026-05-25 23:06:35 +01:00
Vincent Koc
cd96542d37 fix(test): harden macos onboarding e2e 2026-05-26 00:02:41 +02:00
clawsweeper[bot]
55c9a6beea fix(agents): strip markdown code spans from IDENTITY.md values and labels (#86647)
Summary:
- The PR updates `src/agents/identity-file.ts` to normalize backtick-wrapped IDENTITY.md labels and values, and adds parser/merge regression tests in `src/agents/identity-file.test.ts`.
- PR surface: Source +8, Tests +28. Total +36 across 2 files.
- Reproducibility: yes. source-reproducible with high confidence: current main strips `*` and `_` but not back ... e unnormalized string. I did not run tests because this review was required to keep the checkout read-only.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(agents): strip markdown code spans from IDENTITY.md values and la…

Validation:
- ClawSweeper review passed for head 30c43defd6.
- Required merge gates passed before the squash merge.

Prepared head SHA: 30c43defd6
Review: https://github.com/openclaw/openclaw/pull/86647#issuecomment-4537456646

Co-authored-by: nayrosk <105997554+nayrosk@users.noreply.github.com>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
Approved-by: takhoffman
Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
2026-05-25 22:00:36 +00:00
Vincent Koc
9be760fb37 test(qa): add collector-backed otel smoke 2026-05-25 23:51:17 +02:00
clawsweeper[bot]
99d96c1ff2 fix(memory-core): use CJK-aware tokenizer for dreaming dedupe (#80613) (#86645)
Summary:
- The PR extracts the CJK-aware memory tokenizer into a shared helper, routes dreaming dedupe through it, preserves MMR re-exports, and adds regression coverage for CJK and empty-token cases.
- PR surface: Source +15, Tests +96. Total +111 across 5 files.
- Reproducibility: yes. Current main has an ASCII-only tokenizeSnippet path in dreaming dedupe, and the source ... ction source bytes for the CJK failure modes; I did not run tests locally because this review is read-only.

Automerge notes:
- PR branch already contained follow-up commit before automerge: fix(memory-core): use Array.toSorted for #80613 lint fix
- PR branch already contained follow-up commit before automerge: fix(memory-core): preserve dedupe identity when both snippets tokeniz…
- PR branch already contained follow-up commit before automerge: fix(memory-core): rename __testing to testing in CJK regression tests…
- PR branch already contained follow-up commit before automerge: fix(memory-core): use CJK-aware tokenizer for dreaming dedupe (#80613)

Validation:
- ClawSweeper review passed for head ca9c02734c.
- Required merge gates passed before the squash merge.

Prepared head SHA: ca9c02734c
Review: https://github.com/openclaw/openclaw/pull/86645#issuecomment-4537414471

Co-authored-by: MoerAI <friendnt@g.skku.edu>
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-05-25 21:50:55 +00:00
Peter Steinberger
3b0805414e ci: report memory metrics 2026-05-25 22:49:23 +01:00
Peter Steinberger
5b6d03e3e2 perf: reduce runtime cache churn
Reduce hot-path cache churn by reusing the active plugin metadata snapshot for manifest model-id normalization when safe, and by avoiding repeated JSON reparses for cached session stores while preserving clone semantics.

Verification:
- pnpm exec oxfmt --check src/plugins/manifest-model-id-normalization.ts src/plugins/manifest-model-id-normalization.test.ts src/config/sessions/store-cache.ts src/config/sessions.cache.test.ts
- node scripts/run-vitest.mjs src/config/sessions.cache.test.ts src/plugins/manifest-model-id-normalization.test.ts src/gateway/session-utils.subagent.test.ts
- pnpm tsgo:core
- autoreview clean
- PR CI green
2026-05-25 22:40:46 +01:00
Zee Zheng
0d4575a241 fix(pi-runner): flush blocks after compaction retry (#85288) (thanks @spacegeologist)
Behavior addressed: Embedded PI compaction retry now drains block replies again after the retry wait resolves, so retry-generated replies are not left behind while preserving aggregate-timeout fallback behavior.
Real environment tested: local OpenClaw focused Pi runner test shard plus contributor local live-output proof in the PR body.
Exact steps or command run after this patch: pnpm test src/agents/pi-embedded-runner/run/attempt.spawn-workspace.context-engine.test.ts src/agents/pi-embedded-runner/run/compaction-retry-aggregate-timeout.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 55 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: the runner flushes before the compaction wait, waits for compaction retry, then performs a second idempotent flush when the wait resolves without timing out.
What was not tested: fresh external-channel live retry by this agent; PR retains contributor live-output proof for the delayed channel adapter path.

Thanks @spacegeologist.

Co-authored-by: zhengzuo0-ai <zheng.zuo0@gmail.com>
2026-05-25 22:27:29 +01:00
Vincent Koc
a122d804dd fix(gateway): abort stale agent runs on restart 2026-05-25 23:26:10 +02:00
Vincent Koc
4424dafe64 fix(ui): harden control e2e browser setup 2026-05-25 23:19:55 +02:00
Neerav Makwana
0f67dfd074 fix(telegram): keep overlapping DM replies deliverable (#85361) (thanks @neeravmakwana)
Behavior addressed: Telegram direct-message turns no longer drop an earlier overlapping normal reply, while authorized aborts and explicit/native/plugin/skill command turns still supersede active reply work.
Real environment tested: local OpenClaw focused Telegram test shard plus existing contributor Telegram screenshot/log proof in the PR body.
Exact steps or command run after this patch: pnpm test extensions/telegram/src/telegram-reply-fence.test.ts extensions/telegram/src/bot-message-dispatch.test.ts; .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main
Evidence after fix: 2 test files passed, 93 tests passed; final autoreview clean with no accepted/actionable findings.
Observed result after fix: overlapping normal Telegram DMs use non-interrupting reply fences and both final replies remain deliverable; direct /stop, authorized built-in commands, and explicit text/native command turns still supersede.
What was not tested: fresh live Telegram Desktop rerun by this agent; PR retains contributor screenshot/log proof and the Real behavior proof bot remains red despite proof labels.

Thanks @neeravmakwana.

Co-authored-by: Neerav Makwana <261249544+neeravmakwana@users.noreply.github.com>
2026-05-25 22:17:39 +01:00
Merlin
f4cfa012e1 fix(openai): route compaction through Codex auth provider (#86408)
* fix(openai): route compaction through codex auth provider

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>

* fix(openai): honor default responses compaction threshold

Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>

* fix(openai): preserve codex runtime routing

* docs(changelog): note Codex routing fix

---------

Co-authored-by: Merlin <258679497+funmerlin@users.noreply.github.com>
Co-authored-by: VACInc <3279061+VACInc@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-05-25 22:13:08 +01:00
Peter Steinberger
5dccba7405 refactor: share realtime forced consult coordination 2026-05-25 22:02:19 +01:00
Vincent Koc
f6a49a4e8a test(qa-lab): add runtime confidence reports 2026-05-25 22:00:21 +01:00
Peter Steinberger
cda7c30150 build: refresh dependency pins (#86628)
* build: refresh dependencies

* build: align pi fallback version
2026-05-25 21:55:46 +01:00
Peter Steinberger
9f7485e182 test: port release validation stabilizers 2026-05-25 21:50:49 +01:00