Commit Graph

52388 Commits

Author SHA1 Message Date
Vincent Koc
2a6b4ed3e2 test(ollama): support cloud api live smoke 2026-05-26 01:43:03 +02:00
Peter Steinberger
978a2d01da test: serialize agents tools vitest files 2026-05-26 00:42:46 +01:00
tanshanshan
3a4f2b17fc fix(auto-reply): use context-aware overflow reserve hints (#84399)
Use the effective runtime/model context when computing overflow recovery reserveTokensFloor hints, including uncataloged runtime refs, stale session windows, and heartbeat fallback cases.

Verification:
- pnpm test src/auto-reply/reply/agent-runner-execution.test.ts
- autoreview clean on final focused fixup; prior accepted findings addressed before push.
- CI passed on head e25b3e84f4 after rerunning cancelled jobs: preflight, critical quality network-runtime-boundary, security high, checks, Real behavior proof.

Co-authored-by: tanshanshan <tanshanshan@users.noreply.github.com>
2026-05-26 00:33:56 +01:00
Lellansin Huang
6c7b3f3f23 feat(gateway): forward OpenAI sampling params (#84094)
Forward OpenAI-compatible frequency_penalty, presence_penalty, and seed params through the gateway/chat-completions path while keeping Responses untouched.

Verification:
- pnpm test src/gateway/openai-http.test.ts src/agents/pi-embedded-runner/extra-params.sampling.test.ts src/agents/openai-transport-stream.test.ts
- CI passed on head 9abb9466d9 after rerunning cancelled jobs: preflight, critical quality network-runtime-boundary, security high, checks, docs, Real behavior proof.

Co-authored-by: lellansin <lellansin@gmail.com>
2026-05-26 00:33:26 +01:00
Peter Steinberger
068924e2d4 perf: cache model cost indexes
Cache configured model cost indexes for repeated session usage cost lookups while preserving in-place config mutation behavior via value-fingerprint invalidation. Raw pricing lookups now skip manifest model-id normalization as well as runtime/plugin normalization, keeping direct cost lookup off plugin metadata hot paths.

Verification:
- node scripts/run-vitest.mjs src/utils/usage-format.test.ts
- pnpm exec oxfmt --check src/utils/usage-format.ts src/utils/usage-format.test.ts
- pnpm lint --threads=8
- pnpm tsgo:core
- autoreview --mode local
- PR CI green on head 15c1e25d95
2026-05-26 00:29:55 +01:00
Peter Steinberger
5dc704361f fix: hide unsupported best effort message option 2026-05-26 00:27:57 +01:00
Peter Steinberger
bef0ba8f5a refactor: reuse realtime output activity in google meet (#86665) 2026-05-26 00:19:35 +01:00
Vincent Koc
84929e4265 fix(test): harden bundled plugin install sweep 2026-05-26 01:17:12 +02:00
Peter Steinberger
c87957db5e fix: prefer source public artifacts in source checkouts 2026-05-26 00:17:04 +01:00
Peter Steinberger
65a210553b test: type child process spawn mock 2026-05-26 00:11:40 +01:00
Vincent Koc
fe3374789f test(installer): cover rocky cli installs 2026-05-26 01:07:39 +02:00
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