Skip to content

Commit ab1e67a

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/assistant-error-copy
# Conflicts: # src/agents/embedded-agent-helpers/error-text.ts
2 parents 1f11570 + 145d9ff commit ab1e67a

243 files changed

Lines changed: 8352 additions & 4009 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/opengrep-precise.yml‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,19 @@ jobs:
4949
persist-credentials: false
5050
submodules: false
5151

52+
- name: Resolve PR scan base
53+
id: scan-base
54+
env:
55+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
56+
run: |
57+
# Resolve the scan's merge parent before fetching a stale event-payload base.
58+
base="$(node scripts/lib/merge-head-diff-base.mjs --base "$BASE_SHA" --head HEAD --prefer-first-parent)"
59+
echo "sha=$base" >> "$GITHUB_OUTPUT"
60+
5261
- name: Ensure PR base commit
5362
uses: ./.github/actions/ensure-base-commit
5463
with:
55-
base-sha: ${{ github.event.pull_request.base.sha }}
64+
base-sha: ${{ steps.scan-base.outputs.sha }}
5665
fetch-ref: ${{ github.event.pull_request.base.ref }}
5766

5867
- name: Install opengrep
@@ -81,8 +90,7 @@ jobs:
8190

8291
- name: Run opengrep on PR diff
8392
env:
84-
OPENCLAW_OPENGREP_BASE_REF: ${{ github.event.pull_request.base.sha }}...HEAD
85-
OPENCLAW_OPENGREP_MERGE_HEAD_FIRST_PARENT: "1"
93+
OPENCLAW_OPENGREP_BASE_REF: ${{ steps.scan-base.outputs.sha }}...HEAD
8694
# Findings from precise rules block this workflow. Pull requests scan
8795
# changed first-party source paths only so findings stay attributable to
8896
# the PR diff. Test/fixture/QA path exclusions live in `.semgrepignore`

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Docs: https://docs.openclaw.ai
7171

7272
### Fixes
7373

74+
- Matrix lifecycle: drain in-flight monitor tasks without deadlocking shared-client retirement, and reject late acquisitions after their owning task closes.
7475
- Provider error handling: reuse prepared or already loaded provider hooks instead of cold-loading plugins during error classification, avoiding long stalls in failure reporting and model fallback.
7576
- **Subagent completion:** recognize visible final answers delivered to internal and nested parent sessions, preventing false delivery failures while preserving external channel delivery checks.
7677
- Codex/Linux: wait for a live app-server process to expose its startup command line within the existing inspection deadline, preserving process identity checks and preventing intermittent startup failures.

‎config/assertion-safety-baseline.txt‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1682,7 +1682,7 @@ src/agents/bash-tools.exec-approval-followup.ts 5
16821682
src/agents/bash-tools.exec-approval-request.ts 2
16831683
src/agents/bash-tools.exec-host-node-phases.ts 3
16841684
src/agents/bash-tools.exec-host-node.ts 2
1685-
src/agents/bash-tools.exec-request-preparation.ts 7
1685+
src/agents/bash-tools.exec-request-preparation.ts 6
16861686
src/agents/bash-tools.exec-run.ts 1
16871687
src/agents/bash-tools.exec-runtime.ts 2
16881688
src/agents/bash-tools.exec-script-preflight.ts 2
@@ -1864,7 +1864,7 @@ src/agents/embedded-agent-utils.ts 3
18641864
src/agents/exec-auto-reviewer.ts 1
18651865
src/agents/exec-defaults.ts 2
18661866
src/agents/execution-auth-binding.ts 1
1867-
src/agents/failover-error.ts 15
1867+
src/agents/failover-error.ts 12
18681868
src/agents/failover/retry-evidence.ts 1
18691869
src/agents/failover/signal-details.ts 1
18701870
src/agents/fallback-skip-cache.ts 1
@@ -2219,7 +2219,6 @@ src/bootstrap/node-startup-env.ts 1
22192219
src/canvas/documents.ts 2
22202220
src/canvas/serve.runtime.ts 1
22212221
src/canvas/widget-tool.ts 2
2222-
src/channels/account-inspection.ts 2
22232222
src/channels/account-snapshot-fields.ts 1
22242223
src/channels/allowlist-match.ts 1
22252224
src/channels/allowlists/resolve-utils.ts 3
@@ -2278,7 +2277,6 @@ src/channels/plugins/setup-registry.ts 2
22782277
src/channels/plugins/setup-wizard-helpers.ts 13
22792278
src/channels/plugins/setup-wizard-proxy.ts 1
22802279
src/channels/plugins/setup-wizard.ts 5
2281-
src/channels/plugins/status.ts 2
22822280
src/channels/plugins/threading-helpers.ts 1
22832281
src/channels/read-only-account-inspect.ts 1
22842282
src/channels/registry-lookup.ts 1
@@ -2582,7 +2580,7 @@ src/commands/promos/claim.ts 2
25822580
src/commands/sessions-compact.ts 1
25832581
src/commands/sessions-lifecycle.ts 3
25842582
src/commands/setup.ts 1
2585-
src/commands/status-all/channels.ts 3
2583+
src/commands/status-all/channels.ts 2
25862584
src/commands/status-all/diagnosis.ts 1
25872585
src/commands/status-all/gateway.ts 1
25882586
src/commands/status.command.ts 1
@@ -3073,7 +3071,7 @@ src/infra/backup-volatile-stat-cache.ts 1
30733071
src/infra/bonjour-discovery.ts 5
30743072
src/infra/boundary-file-read.ts 1
30753073
src/infra/channel-runtime-context.ts 1
3076-
src/infra/channel-summary.ts 2
3074+
src/infra/channel-summary.ts 1
30773075
src/infra/channels-status-issues.ts 2
30783076
src/infra/clawhub-client.ts 2
30793077
src/infra/clawhub-install-trust.ts 2
@@ -3733,7 +3731,6 @@ src/state/openclaw-state-ownership.ts 1
37333731
src/state/openclaw-state-snapshot-sanitizer.ts 1
37343732
src/state/user-profiles-tailscale-avatar.ts 2
37353733
src/state/user-profiles.ts 1
3736-
src/status/link-channel.ts 1
37373734
src/status/status-message.ts 3
37383735
src/status/status-text.ts 3
37393736
src/status/summary.runtime.ts 1

‎config/knip.all-exports.config.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const ROOT_TEST_ENTRY_GLOBS = [
3939
"src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts}!",
4040
"scripts/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts}!",
4141
"test/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts}!",
42+
// The worker-artifact fixture compiles and launches this native child by path.
43+
"test/scripts/anthropic-preparation-probe.ts!",
4244
// ExecHostTransportProofTests.swift launches this isolated native client by path.
4345
"src/infra/exec-host.native.test-support.ts!",
4446
// Vitest loads these by configuration or module alias rather than imports.

‎docs/cli/config.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,16 @@ Within a batch, a submitted list keeps its order across subsequent keyed edits,
6363
including when agent IDs are numeric strings. Existing roster-deletion and
6464
`$include` ownership protections still apply.
6565

66+
When a legacy roster expands a single-agent installation in the root config file,
67+
writes retire its `default` marker and preserve the existing agent's responsibilities
68+
with explicit owners. An explicitly authored `ownership: "explicit"` cannot be
69+
combined with a legacy `default: true` marker.
70+
71+
For root-file writes, changing `session.store` clears a copied
72+
`agents.defaults.sessionStore.agentId` because that owner belongs to the previous
73+
store. To assign the destination store's owner, set that owner path explicitly in
74+
the same batch.
75+
6676
### `config get`
6777

6878
Reads a value from the redacted config snapshot (secrets never print). `--json` prints the same redacted value as JSON; otherwise strings/numbers/booleans print bare and objects/arrays print as formatted JSON.

‎docs/concepts/memory.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ OpenClaw runs a silent turn that reminds the agent to save important context
219219
to memory files. This is on by default; set
220220
`agents.defaults.compaction.memoryFlush.enabled: false` to turn it off.
221221

222+
Memory flushing requires writable workspace access. Sessions whose sandbox
223+
requires read-only or no workspace access skip the flush, including sessions
224+
with a persisted sandbox requirement that overrides the agent's configuration.
225+
222226
To keep that housekeeping turn on a local model, set an exact override that
223227
applies only to the memory-flush turn (it does not inherit the active
224228
session's model fallback chain):

‎docs/gateway/doctor.md‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,12 @@ That stages grounded durable candidates into the short-term dreaming store while
348348
| Runtime and channel tuning knobs retired in 2026.7 | removed (built-in production defaults apply) |
349349

350350
<Note>
351-
The `plugins.entries.voice-call.config.*` rows above are normalized by
352-
the Voice Call plugin itself on every config load, not by `openclaw
353-
doctor`. The plugin also logs a startup warning pointing at `openclaw
354-
doctor --fix`, but doctor does not currently rewrite
355-
`openclaw.json` for these keys; the plugin's own normalization is what
356-
applies the change at runtime.
351+
The Voice Call plugin supplies the migration for its legacy config keys.
352+
`openclaw doctor --fix` invokes it and persists the canonical shape in
353+
`openclaw.json`; runtime config parsing accepts only current keys.
354+
Existing canonical settings win over legacy values, including streaming
355+
provider credentials, models, and timing. Doctor reports retained
356+
destinations instead of claiming those legacy values were moved.
357357
</Note>
358358

359359
Account-default guidance for multi-account channels:
@@ -427,6 +427,8 @@ That stages grounded durable candidates into the short-term dreaming store while
427427

428428
Legacy session-file import and repair belong to explicit Doctor runs. Gateway and local CLI startup use SQLite; they do not import, restore, or rewrite session JSON/JSONL files. When startup finds a legacy session store, it refuses readiness and prints the Doctor command for the active profile instead of serving empty history. Stop the Gateway, back up its state, and run `openclaw doctor --fix` before restarting it to upgrade old session history. The [targeted migration sequence](/cli/doctor#session-sqlite-migration) provides inspection and validation evidence. Current SQLite maintenance does not require legacy files to remain on disk.
429429

430+
Doctor reports individual channel migration-plan failures while continuing plans for unrelated sources, including those from the same plugin. Plans sharing the failed source are deferred, and source cleanup waits for its last consumer to finish without reported failures or incomplete imports. A startup migration warning still blocks Gateway readiness; resolve the reported failure and run `openclaw doctor --fix` before retrying startup.
431+
430432
Doctor emits warnings when migrations leave legacy folders behind as backups. WhatsApp auth is intentionally only migrated via `openclaw doctor`. Talk provider/provider-map normalization compares by structural equality, so key-order-only diffs no longer trigger repeat no-op `doctor --fix` changes.
431433

432434
When an explicit roster no longer contains `main`, OpenClaw migrates durable `agent:main:*` SQLite rows only if the replacement owner is unambiguous: the sole roster member or the configured upgrade owner in `agents.defaults.sessionStore.agentId`. The explicit owner works for both per-agent and fixed session stores; fixed-store runtime ownership remains scoped to that physical store. Conflicting canonical or alias rows are preserved during startup and reported with a Doctor hint. `openclaw doctor --fix` first imports any legacy JSON session store, then keeps the winning canonical claim and renames each losing claim to `agent:<owner>:legacy-main-conflict-<n>` in its original database. Quarantine changes only the key; the entry and full transcript remain available for inspection or archival.

‎docs/gateway/secrets.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ Behavior:
786786
- A strict startup failure never emits a degraded event, because runtime never became active. A successful startup with cold owners logs the owner degradation but does not emit a reloader event.
787787
- Ref-scoped startup and reload failures emit a structured `SECRETS_DEGRADED` warning for each affected owner. Provider-scoped outages emit one `SECRETS_PROVIDER_DEGRADED` warning with the provider and complete affected-owner list instead of repeating the provider failure per owner. Warnings include a redacted reason, `cold` or `stale` owner state, and the `openclaw secrets reload` retry hint. They never include resolved values or SecretRef ids.
788788
- `openclaw doctor` lists cold and stale owners with their affected config paths, redacted reason, and retry guidance.
789+
- Channel health and status keep cold accounts visible as configured but unavailable, alongside healthy accounts. Read-only inspection does not resolve inactive credentials or probe cold accounts. `/healthz` still reports Gateway liveness; `/readyz` may report the affected channel as failing until it recovers. Restore the secret, then run `openclaw secrets reload`.
789790

790791
## Command-path resolution
791792

‎docs/plugins/sdk-channel-plugins.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,18 @@ unrelated inbound runtime helpers.
917917
the minimum - `id`, `config`, and `setup` - and add adapters as you need
918918
them.
919919

920+
`config.inspectAccount` is synchronous and returns metadata
921+
for read-only diagnostics, including disabled or configured-but-unavailable
922+
accounts. Return `enabled`, `configured`, and applicable credential status
923+
fields without requiring secret resolution. Its result is not a resolved
924+
account: operational hooks such as probes and account status builders receive
925+
`config.resolveAccount` results instead.
926+
Diagnostics expose only status-safe fields from the inspection result.
927+
Include the same account enablement and configuration decisions used by the
928+
runtime, including duplicate-account suppression. If `configured` is omitted,
929+
diagnostics use a recorded Gateway value when available; otherwise they report
930+
that configuration status is unavailable.
931+
920932
Create `src/channel.ts`:
921933

922934
```typescript src/channel.ts

‎docs/plugins/voice-call.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,11 @@ that Region. See
220220

221221
</Accordion>
222222
<Accordion title="Legacy config migrations">
223-
Config parsing normalizes these legacy keys automatically and logs a
224-
warning naming the replacement path; the shim is removed in a future
225-
release (`2026.6.0`), so run `openclaw doctor --fix` to rewrite committed
226-
config to the canonical shape:
223+
Run `openclaw doctor --fix` to rewrite these legacy keys to the canonical
224+
shape. The Voice Call plugin owns the migration; runtime config parsing
225+
accepts only the current keys. When both old and current settings exist,
226+
Doctor keeps the current setting, removes the legacy key, and reports which
227+
destination it retained. Legacy values fill only missing current fields:
227228

228229
- `provider: "log"` → `provider: "mock"`
229230
- `twilio.from` → `fromNumber`

0 commit comments

Comments
 (0)