Commit Graph

78555 Commits

Author SHA1 Message Date
Chris Allbritton 7d039fb424 fix: gateway restart fails and leaves the macOS LaunchAgent unloaded when the gateway drains active work (#116875)
* fix(daemon): retry launchd bootstrap while a booted-out job tears down

launchctl bootout returns once launchd accepts the request, not once the
job has exited, so the reload path could bootstrap into a label the
outgoing gateway still held and fail with EIO. bootout had already
deregistered the job, leaving KeepAlive with nothing to respawn and the
gateway silently down until a manual bootstrap.

Retry bootstrap while the teardown is still pending, bounded by the
plist ExitTimeOut, and restore the job if bootstrap still fails.

* fix(daemon): report an unrestored LaunchAgent and scope the bootstrap retry

The reload path swallowed a failed restore, so a bootstrap that failed after
bootout surfaced only the original error while the LaunchAgent stayed booted
out. Combine the restore failure into the thrown error and say plainly that
the job is gone and KeepAlive has nothing left to respawn.

The teardown retry also applied to every bootstrapLaunchAgentOrThrow caller.
launchd answers the same EIO for a label that is merely still registered, so
start, install, and recovery paths burned the full teardown deadline on an
already-loaded service before failing anyway. Gate the retry on callers that
just issued bootout, and defer to the existing isLaunchctlAlreadyLoaded model
instead of treating that response as a teardown to wait out.
2026-08-06 20:21:36 -07:00
Jacqueline Henriksen aa21c001f1 fix(clickclack): show native agent progress while replying (#116683)
* fix(clickclack): show native agent progress while replying

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): address native progress review feedback

* fix(clickclack): clear CI failures

* fix(clickclack): bound stalled progress finalization

* test(clickclack): satisfy strict callback typing

* fix(clickclack): clear progress before activity flush

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* fix(clickclack): make native progress explicitly opt-in

* docs(clickclack): document opt-in native progress

* fix(clickclack): guard disabled native progress

* test(clickclack): cover independent progress opt-ins

* docs(clickclack): show native progress opt-in

* fix(clickclack): keep resolved progress setting compatible

* fix(clickclack): identify agent in native progress

* fix(clickclack): retract native commentary progress

* fix(clickclack): harden native progress compatibility

* fix(clickclack): regenerate current-main channel metadata

---------

Co-authored-by: PollyBot13 <pollybot13@gmail.com>
2026-08-06 20:18:19 -07:00
YangManBOBO 38c3ef182c fix: unhandled rejection crashes process when raw stream write fails (#119400)
* fix: prevent unhandled rejection crash when raw stream write fails

The try/catch wrapper around void appendRegularFile() could not catch
async rejections because the void operator evaluates the Promise to
undefined synchronously. If appendRegularFile rejected (disk full,
permission denied, symlink parent rejected), the unhandled rejection
handler classified it as FATAL and exited the process with code 1.

Replace the broken try/catch with a proper .catch() handler that
correctly ignores raw stream write failures as originally intended.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: preserve sync guard alongside async rejection handler

ClawSweeper review feedback: the outer try/catch guards against
synchronous failures before the promise is returned, while the
.catch() handler catches async rejections. Both layers are
necessary for defense-in-depth.

Add fault-injection test coverage verifying:
- Async rejection (ENOSPC) is contained without process crash
- Synchronous throw from the dependency is caught
- Normal write path works correctly
- Disabled stream is a no-op

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(agents): prove raw stream rejection containment

Punchcard-Session: brisk-cedar-brook-w3

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-07 11:16:29 +08:00
Peter Steinberger 802e8c8dfe fix: prevent duplicate outbound delivery during concurrent recovery (#119966)
* fix(delivery): fence live sends across processes

* test(delivery): preserve live-claim fallback semantics

* fix(delivery): release settled producer claims

* fix(delivery): fail closed on lost dispatch claims
2026-08-06 20:03:29 -07:00
Vincent Koc a6b2078962 fix(test): restart shared gateway after migration convergence (#120089)
* fix(test): restart shared gateway after migration convergence

Punchcard-Session: cobalt-valley-meadow-mg

* fix(test): restart shared gateway after migration convergence

Punchcard-Session: cobalt-valley-meadow-mg
2026-08-07 10:51:28 +08:00
Peter Steinberger 48ea08918e fix(ui): make active-run steering reliable (#120083)
* fix(ui): make active-run steering reliable

* chore: leave release notes to release prep

* fix(ui): align steer result typing with main

* fix(gateway): reject stale steering owners
2026-08-06 19:49:48 -07:00
Peter Steinberger c636060f04 fix(telegram): preserve voice fallback text
Preserve visible text when Telegram rejects a voice note for recipient privacy.

Co-authored-by: Peter Steinberger <steipete@macos.shared>
2026-08-07 08:18:31 +05:30
Vincent Koc bc5b29a032 test(swift): preserve queued websocket frames (#120106) 2026-08-07 10:44:41 +08:00
qingminlong 1cf48f15b7 fix: reject missing oxlint shard selectors (#120096)
* fix: reject missing oxlint shard selectors

* fix(lint): reject invalid shard selectors

Punchcard-Session: clear-harbor-river-2k

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-08-07 10:44:18 +08:00
Vincent Koc 0f92db6a5a test(channels): align prerelease fallback catalog spec (#120092) 2026-08-07 10:39:43 +08:00
SunnyShu 21e9634f10 fix(node-cli): warn when systemd user lingering is disabled after install (#118430)
* [AI] fix(node-cli): warn when systemd user lingering is disabled after install

openclaw node install now detects when systemd user lingering is off and
warns the operator (text + JSON) to run 'sudo loginctl enable-linger <user>'.
Without lingering, the user-level node service is torn down when the last SSH
session ends, so the node silently goes offline after logout.

The check is read-only and never auto-enables lingering, matching the
operator-consent policy used elsewhere. It runs only on the verified-success
path: an optional onVerified hook is added to installDaemonServiceAndEmit
that fires after service.isLoaded() confirms the service is loaded and before
the success payload is emitted. The linger diagnostic runs there, so a failed
install or verification failure never carries a linger warning (avoids
misdirecting the operator to fix lingering for a service that was not
successfully installed). The already-installed short-circuit warns separately.
Skipped on non-Linux and when systemd user service is unavailable.

Adds unit tests for both paths, the linger=yes no-op, the install-failure
isolation, the verification-failure no-warn regression, and the
systemd-unavailable skip, plus response.test.ts cases covering onVerified
running on success and failing safely when it throws. The
readSystemdUserLingerStatus mock is typed with the full linger union to
satisfy tsgo. Documents the linger step in docs/cli/node.md and
docs/nodes/troubleshooting.md.

Real-behavior evidence captured on a Linux host by toggling
loginctl disable-linger/enable-linger and running the real install flow:
linger=no emits the warning on successful install (text + JSON) and on the
already-installed path; linger=yes emits nothing; a failed install or
verification failure emits no warning.

Fixes #107033

Co-Authored-By: deepseek-v4-flash <noreply@anthropic.com>

* fix(node-cli): align linger user with service owner

* docs(node): narrow crash-loop claim to gateway units

The duplicate-scope guard that raises on two managers running the same unit
name is enforced for gateway units (two supervisors on the same port SIGTERM
each other in a restart loop); assertNoSystemGatewayOwnership returns early
for node services, so claiming node services crash-loop misattributes gateway
behavior. Qualify the troubleshooting note accordingly.

Addresses ClawSweeper P3 finding on PR #118430.

* fix(systemd): align linger checks with service owner

* test(doctor): align linger status mock contract

* style(doctor): format linger mock

* test(wizard): mock systemd service account

---------

Co-authored-by: deepseek-v4-flash <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 19:28:10 -07:00
clawsweeper[bot] 7ddc65dcc3 fix(diagnostics): preserve CLI turn usage totals (#120100)
Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com>
2026-08-07 10:22:17 +08:00
Peter Steinberger 70abd88e03 fix(gateway): derive lock and coordinator paths from the resolved state dir (#120110) 2026-08-06 19:16:13 -07:00
Vincent Koc 2013123472 fix(release): isolate private Telegram QA harness (#120088) 2026-08-07 10:03:14 +08:00
Vincent Koc 22ae9bd368 test(agents): exercise execution attribution ingress guard 2026-08-07 10:01:18 +08:00
Vincent Koc 8893c93558 fix(gateway): defer attribution until admission succeeds 2026-08-07 10:01:18 +08:00
Vincent Koc e628b42a49 refactor(agents): centralize exact execution attribution 2026-08-07 10:01:18 +08:00
sunlit-deng 83963e5135 fix(google): accept base64url provider media (#116204)
* fix(google): accept base64url in Live audio

* fix(google): normalize base64url in one pass

* fix(google): normalize base64url at every Google media boundary

* fix(google): normalize image media and avoid double music validation

* test(google): exercise URL-safe base64 fixtures

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 19:00:25 -07:00
SunnyShu 4d87263b1b fix(plugins): warn when registerHook uses a typed hook event name (#118601)
* [AI] fix(plugins): warn when registerHook uses a typed hook event name

api.registerHook registers into the legacy internal-hook path, while typed
lifecycle events (before_tool_call, message_received, ...) are dispatched
exclusively by the typed hook runner. Registrations under typed names
silently never fired since #117372 moved the write to legacyInternalHooks.
Emit a registration diagnostic pointing to the public api.on(...) API so
plugin authors see the no-op at load time instead of trusting a false
"loaded".

Related to #116965

Co-Authored-By: deepseek-v4-flash <noreply@anthropic.com>

* [AI] fix(plugins): point registerHook comment at public api.on API

Condense the inline comment in createToolHookRegistrars and replace the
internal registerTypedHook migration reference with the public api.on(...)
API, matching the emitted warning and hooks docs. Behavior and tests
unchanged.

---------

Co-authored-by: deepseek-v4-flash <noreply@anthropic.com>
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 18:59:27 -07:00
zengLingbiao a466958d33 fix(canvas): serve Content-Length on A2UI HEAD responses (#117961)
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 18:58:09 -07:00
tzy-17 e0ec136108 fix(gateway): make doctor dreaming timestamp comparators NaN-safe (#118749)
* fix(gateway): make doctor dreaming timestamp comparators NaN-safe

compareDreamingEntryByRecency and compareDreamingEntryByPromotion used
`Number.isFinite(aMs) || Number.isFinite(bMs)` then `return bMs - aMs`.
When exactly one side parsed to NaN (non-empty malformed timestamp), the
guard still entered the branch and returned NaN - bMs, producing NaN and
leaving Array.sort order undefined for the doctor.memory.status dreaming
entry list. Coerce unparseable timestamps to -Infinity via a shared
parseDreamingTimestampMs helper and return a finite -1/0/1 from the
timestamp branch so the sort stays deterministic.

* fix(memory-core): incorporate producer-side NaN-safe timestamp comparator

ClawSweeper [P1] finding: gateway-only fix is incomplete because Memory Core
has the same mixed-NaN comparator BEFORE the gateway merges lists. A valid
entry discarded upstream cannot be recovered at the gateway boundary.

Incorporate the producer-side fix:
- Export compareStoreTimestampDesc from short-term-promotion-utils.ts
- Replace the buggy raw Date.parse + bMs-aMs pattern in
  short-term-promotion-stats.ts with the NaN-safe compareStoreTimestampDesc

This makes #118749 self-contained: both gateway doctor.ts AND memory-core
stats.ts comparators are NaN-safe. The companion #118750 now only needs to
cover the recency ranking fix (ageDays/recency calculation).

* fix(memory): preserve valid dreaming diagnostics

* style(memory): format dreaming imports

---------

Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 18:56:50 -07:00
metaforismo 89173ea9c2 fix(heartbeat): explain target-none skips (#119689)
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-06 18:51:29 -07:00
Peter Steinberger 804ae7f121 fix(security): stop recommending retired install-policy bypasses (#120011)
* fix(security): align install policy path contract

* test(security): align install policy wording

* style(security): format install policy test

* fix(security): identify failing install policy path

* test(security): track Windows ACL temp dirs
2026-08-06 18:45:18 -07:00
Vincent Koc b8b878ed33 fix(plugins): preserve startup release during repair (#120085)
* fix(plugins): preserve startup compatibility version

* chore(ci): refresh merge context
2026-08-07 09:37:33 +08:00
Peter Steinberger 01281ad9f8 refactor(browser): remove model-backed page extraction (#120101)
* refactor(browser): remove model-backed extraction

* docs(browser): remove stale extract reference
2026-08-06 18:32:14 -07:00
Vincent Koc 53006a289e fix(release): restart gateway after migration convergence (#120091) 2026-08-07 09:25:23 +08:00
wanyongstar 9571ae8c93 fix(doctor): list actual removed ids in stale heartbeat/modelByChannel changes (#119202)
The stale plugin config repair report counted heartbeat and
modelByChannel hits per surface but listed all stale channel ids in
parentheses, so a heartbeat entry could claim channel ids that were
never heartbeat targets. List the deduplicated ids of the hits for
each surface instead, matching the other change entries.
2026-08-07 09:23:31 +08:00
Vincent Koc 9094e10c11 test(file-transfer): cover final symlink write policy (#120082) 2026-08-07 09:17:40 +08:00
Peter Steinberger 00a5db443a refactor: remove obsolete commit helper 2026-08-06 18:10:10 -07:00
Vincent Koc 179f5fa8ce test(qa): keep Control UI parity fixture typed (#120090) 2026-08-07 09:08:12 +08:00
Jason (Json) 25401e4758 fix(tui): avoid repeated runtime rebuilds in local sessions (#120051)
* fix(tui): reuse prepared runtime in local mode

* fix(tui): preserve prepared runtime coalescing

* test(tui): type prepared runtime mock
2026-08-06 19:06:23 -06:00
Patrick Erichsen c245cfc19c test: fix current main CI baselines (#120080)
* test: fix current main CI baselines

* test(qa-lab): preserve provider mode literals
2026-08-06 17:52:37 -07:00
Dallin Romney b5369f8e5d fix(qa): replace false Codex pin compatibility evidence (#118012)
* test(qa): replace synthetic Codex pin evidence

* test(qa): update core runtime-pair count

* test(qa): cover official Codex plugin drift

* test(qa): preserve frozen candidate scenario ids
2026-08-07 08:45:26 +08:00
Vincent Koc 265f43eded test(ui): model dropdown item slot in responsive fixture
Punchcard-Session: clear-lantern-brook-g3
2026-08-07 08:17:16 +08:00
Vincent Koc ec023a4336 docs(protocol): record node attribution envelope 2026-08-07 08:06:01 +08:00
Vincent Koc 735f176b01 fix(protocol): preserve gateway session attribution across node runs 2026-08-07 08:06:01 +08:00
Peter Steinberger c663c39763 refactor(test): table-drive exact-duplicate test blocks, batch 2 (#120071)
* refactor(test): table-drive tooling test cases

* refactor(test): table-drive agent test cases

* refactor(test): table-drive core test cases

* refactor(test): table-drive plugin test cases

* refactor(test): table-drive package test cases

* chore(test): prune max-lines baseline

* fix(test): preserve table row literal types
2026-08-06 17:00:28 -07:00
Peter Steinberger 7c9596b007 refactor(test): adopt codex app-server test harness in worst-preamble suites (#120065)
* refactor(test): share codex app-server client fixtures

* refactor(test): share codex turn identifiers
2026-08-06 16:33:42 -07:00
Peter Steinberger d6540db953 chore(ui): remove stale i18n keys (#120064) 2026-08-06 16:33:18 -07:00
Peter Steinberger bfd47df34d refactor(test): replace logic-bearing vi.mock factories with real modules and boundary fakes (#120063)
* refactor(test): use real Codex search module

* refactor(test): use real Slack slash command runtime

* test: satisfy Slack slash fixture lint
2026-08-06 16:32:33 -07:00
Peter Steinberger 0b849a316d refactor(plugins): single-source interactive dispatch and its auth downgrade via plugin SDK (#120062) 2026-08-06 16:31:04 -07:00
Leon-SK668 d64f5b6a09 fix(googlechat): redact reflected credentials in API errors (#119965)
Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
2026-08-06 18:21:13 -05:00
Peter Steinberger 65d2222a6e refactor(test): compress repetitive fixtures in worst mega-tests with builders (#120055)
* refactor(test): share incomplete-turn assistant fixtures

* refactor(test): share realtime relay transport fixtures

* refactor(test): share subagent registry fixtures

* refactor(test): share CLI reliability fixtures

* refactor(test): extract chat host fixture
2026-08-06 16:11:34 -07:00
Peter Steinberger dc0b995899 fix(ui): adapt read-only prefs e2e test to suite bootstrap 2026-08-06 16:09:01 -07:00
Peter Steinberger a73910dfba fix(agents): resolve authoritative session keys for delegated compaction (#120047)
* fix(agents): resolve authoritative session keys for delegated compaction

* refactor(agents): keep session-target resolution error class module-local
2026-08-06 15:57:52 -07:00
Peter Steinberger d9ffbb3ed6 fix(memory): report persisted vector index state on unprobed status path (#120048) 2026-08-06 15:57:49 -07:00
Peter Steinberger d0fe7bcb3c fix(acp): pass configured agent model to ACP binding sessions (#120046) 2026-08-06 15:57:44 -07:00
Peter Steinberger 7729100775 docs(skills): repair stale file references in bundled skills (#120042) 2026-08-06 15:57:41 -07:00
Peter Steinberger 725f50b883 fix(doctor): recover terminal NUL-only tails in archived session JSONL (#120041)
* fix(doctor): recover terminal NUL-only tails in archived session JSONL

* test(infra): split NUL-tail recovery tests to satisfy max-lines
2026-08-06 15:57:36 -07:00
Peter Steinberger b4a26783f7 refactor(test): consolidate duplicated requireRecord and provider HTTP mock helpers (#119982)
* refactor(test): consolidate duplicated test helpers

* test: remove stale record guard import

* fix(test): remove orphaned record guards

* refactor(test): keep record requirement messages exhaustively typed

* fix(test): keep packages/ai record guard package-local
2026-08-06 14:48:01 -07:00