Commit Graph

71912 Commits

Author SHA1 Message Date
Peter Steinberger
332006bc1f test: consolidate OpenClaw test state fixtures (#113576)
* test: consolidate OpenClaw test state fixtures

* test(plugin-sdk): expose isolated test state

Promote the isolated OpenClaw test-state lifecycle through a narrow published Plugin SDK subpath so extension tests no longer import private core helpers. This intentional SDK surface addition is maintainer-approved.

* test: use SDK test-state seam in extensions

Route bundled extension suites through the focused repo-local Plugin SDK test-state entrypoint and remove the Codex projector harness exports made stale by fixture consolidation. Keep the seam out of production builds and published package artifacts while auditing its real consumers in the full-tree deadcode scan.

* test(plugins): map test-state in package boundaries
2026-07-25 05:30:52 -07:00
Peter Steinberger
3d1369ff4f test(telegram): consolidate bot test harness (#113571)
* test(telegram): consolidate bot test harness

* test(plugin-sdk): expose isolated test state

Promote the isolated OpenClaw test-state lifecycle through a narrow published Plugin SDK subpath so extension tests no longer import private core helpers. This intentional SDK surface addition is maintainer-approved.

* test(telegram): use public test-state seam

* test(plugin-sdk): keep test state local-only

Match the existing channel test-helper boundary: bundled extension tests can import the focused SDK source entrypoint, while ordinary builds and the published npm package exclude it. The earlier public classification existed only on this unmerged PR branch and was never a shipped contract.

* test(plugins): map test-state in package boundaries
2026-07-25 05:28:26 -07:00
Peter Steinberger
d33683a9d8 fix(tui): request approved operator scopes for terminal sessions (#113644)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 05:23:32 -07:00
Masato Hoshino
bdcc5d54a5 fix(agents): honor run abort signal in image and pdf tools (#112644)
* fix(agents): honor run abort signal in image and pdf tools

The image and pdf agent tools declared `execute: async (_toolCallId, args)`
and dropped the run abort signal that `wrapToolWithAbortSignal` supplies as
the third execute argument. The wrapper only races the execute promise, so an
aborted run kept sequentially downloading images/PDFs (up to the per-tool cap,
each up to the byte cap) and still issued a paid vision/PDF-model call for a
dead run.

Thread the signal into the existing `requestInit: { signal }` seam (which the
media fetch layer already merges into the download fetch) and add
`signal.throwIfAborted()` between sequential loop items and before the paid
model call. No new media-options signal field; non-abort behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix(agents): keep the pdf test suite under the lint ceiling; guard model dispatch

Follow-up on the abort-signal change, resolving the check-lint failure and a
review finding on the same seam.

max-lines
---------
Adding the two pdf abort tests pushed src/agents/tools/pdf-tool.test.ts to 1018
effective lines against a ceiling of 1000, failing check-lint. Resolved without
touching config/max-lines-baseline.txt — a suppression there would also have
tripped the max-lines ratchet.

- The new tests declared their own `describe` with `beforeEach`/`afterEach`
  hooks identical to the existing `describe("createPdfTool")`. They exercise
  that same tool, so they now live in it and the duplicated scaffolding is gone.
- `stubPdfToolInfra`, `createPdfModelRegistry` and `FAKE_PDF_MEDIA` moved to
  pdf-tool.test-support.ts, which already exists for exactly this. They go
  through `createPdfToolInfraStub(completeMock)` rather than being exported
  directly, because the stub wires the suite's own `complete` mock into the
  model registry and vi.mock handles are file-scoped. All 21 existing call
  sites are unchanged.

Abort propagation into model dispatch
-------------------------------------
The previous revision stopped cancellation at download boundaries and before
the first model call, but `runImagePrompt`/`runPdfPrompt` never saw the signal.
A run cancelled while the first provider request was in flight could still
issue the remaining ones — the image path dispatches `describeImage` once per
image in a sequential loop, so a dead run kept paying for every later image.

Both now take an optional `signal` and check it immediately before each
provider dispatch (3 sites in image-tool, 4 in pdf-tool).

Forwarding the signal further, into the provider transports themselves, is a
different seam and is deliberately left out of this PR.

Also declares `requestInit` on `ImageToolLoadWebMediaOptions`. The local facade
omitted it while the underlying loader accepts it (web-media.ts declares it and
forwards it to readRemoteMediaBuffer), so the option worked at runtime and only
compiled because spread properties skip excess-property checking. A non-spread
call site would not have.

tsgo core + core-test, oxlint, oxfmt clean; pdf-tool and image-tool suites 266
tests pass.

* test(agents): prove in-flight media aborts

* test(agents): narrow PDF loader options

* test(agents): reject abort mocks with errors

* fix(agents): propagate media cancellation

* test(agents): type PDF abort fixture

* test(agents): type prepared runtime snapshot

* fix(agents): normalize abort rejection errors

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-25 05:17:09 -07:00
Peter Steinberger
b26776fbca feat(ui): syntax-highlight read-only cron script payloads (#113632)
Locked script/command automations rendered their source in a plain textarea. They now render as a resizable, highlighted read-only code block reusing the existing highlight.js path.
2026-07-25 05:14:06 -07:00
Peter Steinberger
3af65a371c fix(gateway): preserve verified owner identity for OpenAI HTTP (#113638)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 05:11:50 -07:00
Peter Steinberger
c8e6adc929 fix(qa): run documented channel message flows on supported drivers (#113642)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 05:09:13 -07:00
Peter Steinberger
fde3cdf27b perf: multi-select archiving no longer stalls a second per row (#113623)
* perf(ui): refresh the session list once per batch action

Batch sidebar actions patched each row and then forced a full sessions.list
replacement per row, so archiving a nine-row multi-select paid nine list
rebuilds on top of nine patches. Measured against the gateway handlers on a
60-session store, sessions.list costs ~2.9s versus ~176ms for sessions.patch.

Batch rows now pass deferListRefresh and each batch helper issues one refresh
per owning agent after its last row; pushed sessions.changed events keep rows
reconciled while the batch runs. Single-row actions are unchanged.

* test(ui): prove batch archive costs one list refresh in the browser

Adds a Control UI e2e case that cmd-clicks three sidebar rows, archives the
selection from the batch menu, and asserts the Gateway saw three sessions.patch
calls in row order plus exactly one sessions.list. It holds past the batch so a
late per-row refresh would still be caught.

Before the batch-refresh change this flow issued one full sessions.list per
archived row.
2026-07-25 05:06:07 -07:00
Peter Steinberger
3890a5efb6 fix(qa): restore current scenario source and documentation references (#113639)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 05:04:05 -07:00
Vincent Koc
001319f1ad Merge pull request #113633 from openclaw/feat/anthropic-opus-5-parity 2026-07-25 20:01:37 +08:00
Peter Steinberger
b6de8d5e15 improve(agents): reduce per-turn conversation metadata tokens (#113616)
* perf(agents): trim per-turn conversation metadata tokens

* test(agents): expect compact supplemental metadata

* test(agents): cover compact persisted sender metadata
2026-07-25 05:01:07 -07:00
Peter Steinberger
7e80f36723 fix(apps): restore live session updates after native reconnects (#113634)
* fix(apps): replay session visibility across native reconnects

* fix(apps): refresh shifted native i18n source lines

---------

Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 04:58:41 -07:00
Peter Steinberger
f43fac21c7 fix(gateway): stop showing retired HEARTBEAT.md in the agent files editor (#113621)
* fix(gateway): drop retired HEARTBEAT.md from agent core files

* fix(ci): stop asserting retired HEARTBEAT.md in docker release smoke

* docs: align HEARTBEAT.md references with cron scratch

* docs(agents): drop retired HEARTBEAT.md from workspace read comment
2026-07-25 04:58:31 -07:00
ooiuuii
591e029095 fix(browser): skip non-executable auto-discovery candidates (#111951)
* fix(browser): skip non-executable candidates

* test(browser): preserve fs constants in mocks

* fix(browser): simplify executable candidate checks

* fix(browser): require regular executable files

* style(browser): format executable candidates

* test(ci): allow sqlite proof on fork runners

* style(test): keep sqlite timeout diff compact

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-25 04:50:40 -07:00
Peter Steinberger
eddd5224ad fix(e2e): expose redacted packaged plugin failures (#113635)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 04:48:08 -07:00
Dallin Romney
26b7bb822b fix(ci): validate frozen release candidates with compatible harnesses (#113628)
* fix(ci): keep release harnesses compatible with frozen candidates

* style: format release Telegram workflow test
2026-07-25 04:45:29 -07:00
Vincent Koc
618f910377 refactor(matrix): share bounded cache insertion (#113636) 2026-07-25 19:43:58 +08:00
Vincent Koc
8879903651 docs: refresh provider map 2026-07-25 19:37:48 +08:00
Peter Steinberger
421e287c45 fix(ui): show Swarm progress in Chat (#113619)
* fix(ui): show Swarm progress in chat

* style(ui): format rebased Swarm integration

* fix(ui): bound inline Swarm progress height
2026-07-25 04:36:50 -07:00
Peter Steinberger
a653741c5b fix(gateway): terminate failed Responses streams (#113629)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 04:35:37 -07:00
Peter Steinberger
825d6f7f1f fix(openai): align Codex discovery client version (#113615)
* fix(openai): align Codex discovery client version

* chore: leave release notes to release workflow
2026-07-25 04:33:12 -07:00
Vincent Koc
e94ece85b6 fix(anthropic): preserve opus fallback pricing 2026-07-25 19:30:49 +08:00
Vincent Koc
4df130d0be fix(anthropic): honor opus 5 aliases 2026-07-25 19:30:49 +08:00
Vincent Koc
85181e9db7 test(anthropic): allow fast capacity overloads 2026-07-25 19:30:49 +08:00
Vincent Koc
8373a55116 fix(anthropic): trust fallback boundary events 2026-07-25 19:30:49 +08:00
Vincent Koc
a69001850b fix(anthropic): canonicalize fallback model identities 2026-07-25 19:30:49 +08:00
Vincent Koc
aaea5c67ab test(anthropic): cover fallback serving transitions 2026-07-25 19:30:49 +08:00
Vincent Koc
604daecafc fix(anthropic): price fallback serving models 2026-07-25 19:30:48 +08:00
Vincent Koc
90b75a1e63 test(anthropic): lock opus 5 provider identities 2026-07-25 19:30:48 +08:00
Vincent Koc
b4348fca42 docs(anthropic): document opus 5 runtime contracts 2026-07-25 19:30:48 +08:00
Vincent Koc
3764d6739e fix(anthropic): use native fast mode for opus 2026-07-25 19:30:48 +08:00
Vincent Koc
18d4128215 fix(anthropic): enable default fallback for opus 5 2026-07-25 19:30:48 +08:00
Vincent Koc
e42401bce7 refactor(anthropic): centralize 1m context capability 2026-07-25 19:30:48 +08:00
Vincent Koc
d4794c90a0 test(sqlite): cover interrupted canonical index repair (#113624) 2026-07-25 19:27:17 +08:00
Vincent Koc
92188c9e5a refactor(matrix): use shared string normalization (#113627) 2026-07-25 19:26:25 +08:00
Peter Steinberger
d2ff17acc3 fix(ui): prevent Zod eval under strict Content Security Policy (#113617)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 04:16:17 -07:00
Peter Steinberger
57e2f220de fix(ci): restore packaged OpenWebUI and update validation (#113614)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 04:14:41 -07:00
Vincent Koc
13126e4bd7 refactor(workboard): share claim token redaction (#113618) 2026-07-25 19:06:18 +08:00
Peter Steinberger
66615987d3 fix(control-ui): keep polling gateway-driven setup progress (#113613) 2026-07-25 04:04:56 -07:00
joshavant
bb47d9f29a test(packaging): cover manifest-declared plugin assets 2026-07-25 06:03:30 -05:00
joshavant
f153858045 fix(onepassword): make SecretRef setup production-safe 2026-07-25 06:03:30 -05:00
joshavant
56bf326371 fix(onepassword): bound SecretRef resolution lifecycle 2026-07-25 06:03:30 -05:00
joshavant
fb8589ebdb fix(onepassword): harden trusted op execution 2026-07-25 06:03:30 -05:00
sallyom
f045f33a62 feat(onepassword): add managed SecretRef integration 2026-07-25 06:03:30 -05:00
Peter Steinberger
5b4df57248 fix(gateway): return 404 for disabled OpenAI API routes (#113609)
Co-authored-by: Peter Steinberger <steipete@golden-gate.local>
2026-07-25 03:57:46 -07:00
Alex Markson
d998a1db84 fix: SQLite WAL file can stay inflated on a running gateway until restart (#112951)
* fix: SQLite WAL file can stay inflated on a running gateway until restart

Since #82366 switched the periodic 30-minute checkpoint to PASSIVE (to keep
WAL maintenance off the event loop), no checkpoint on a running process
truncates the WAL *file* any more -- only close() does, i.e. a restart.
wal_autocheckpoint recycles WAL space in place but never shrinks the file,
and is itself a PASSIVE checkpoint a reader can transiently block. So when a
reader briefly pins frames (e.g. a memory reindex, a backup, a slow query),
the WAL grows past the autocheckpoint size and then stays parked at that
high-water mark for the whole life of the process. Observed in production: a
1.6 GB agent DB left a 1.6 GB -wal that only manual TRUNCATE checkpoints
could reclaim. This affects every SQLite-backed store (task registry, plugin
state, proxy capture, memory host, ...), not just memory.

Set PRAGMA journal_size_limit (default 64 MiB, overridable via
journalSizeLimitBytes) right after wal_autocheckpoint so any completing
checkpoint -- including the PASSIVE periodic/auto ones #82366 now relies on
-- truncates the WAL file back to the ceiling. This restores the bounded
on-disk WAL that TRUNCATE used to give, without reintroducing the blocking
checkpoint #82366 removed: journal_size_limit only changes how far a
completing checkpoint truncates, never checkpoint timing. The 64 MiB ceiling
sits ~16x above the autocheckpoint steady state (~4 MB at 1000 pages), so it
is inert in normal operation and engages only on pathological growth.

Related: #82366, #81715

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: tighten SQLite WAL ceiling proof

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-25 03:52:33 -07:00
Vincent Koc
2b19ae1f00 fix(snapshot): recover complete pending sqlite snapshots (#113607) 2026-07-25 18:50:50 +08:00
Vincent Koc
b8bb08a1ad refactor(gateway): share no-op reload plan check (#113610) 2026-07-25 18:45:12 +08:00
Franck MEYER
1e04925e03 fix: doctor preserves locks owned by exact gateway process title (#112855)
* fix(agents): recognize exact gateway process title

* refactor(agents): reuse gateway argv recognition

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-25 03:44:51 -07:00
Peter Steinberger
64daf8dd23 refactor(slack): split message dispatch (#113602) 2026-07-25 03:43:24 -07:00