* fix(daemon): explain service publication authority failures
Replace free-form definition mutation details with typed, redacted reasons
and shared recovery guidance for install and start/restart repair. Keep all
ownership checks and stable update-recovery denial prefixes unchanged.
Cover unsafe directory failure and permission-repair recovery without
config or service publication before denial or SecretRef bypass afterward.
Fixes#132278.
* test(daemon): assert typed system ownership diagnostics
* feat(gateway): auto-apply safe doctor config migrations at startup
Gateway startup now runs the same deterministic, prompt-free legacy
config-key migrations as "openclaw doctor --fix" when an otherwise
invalid single-file config can be fully migrated, instead of refusing
readiness with a doctor hint. The write happens under the existing
startup migration lease, after state migrations consume retired
locators, only when the complete result validates including plugins,
and keeps the previous config in the .bak ring. Configs using
$include, Nix mode, newer-version configs, update-in-progress runs,
and configs that stay invalid keep the current fail-closed refusal.
This replaces the narrow two-key stable-upgrade repair with the full
migration set (which subsumes it), so headless service gateways just
work across upgrades instead of stopping on retired config keys.
* fix(doctor): keep startup repair preview off the shared state database
resolveStartupConfigSnapshot serves gateway pre-bootstrap selection and
backup discovery, which run before state-database admission. The full
planner resolves plugin doctor contracts through the installed-plugin
registry, which opens the shared SQLite store — a broken store (or
backup's pre-validation guarantee) must not break those callers. The
preview tier now applies only state-free migrations with raw validation;
the preflight committer and canonical-write matcher stay authoritative.
* test(doctor): avoid shadowing the path module in repair fixtures
* test(doctor): pin checkpoint build provenance for unbuilt test environments
CI unit shards and unbuilt checkouts have no dist/build-info.json, so the
checkpoint layer fails open by design and the startup-repair checkpoint
assertions could never hold there. Wrap the real module with a pinned
build identity so recording and needs-checks stay meaningful.
* fix(doctor): reach plugin-owned migrations from the startup trust check
The pre-bootstrap trust check admitted only state-free core migrations,
so a config whose sole repair belongs to a plugin doctor contract was
refused before the plugin-aware preflight could migrate it. The resolver
now runs the full planner first and falls back to the state-free preview
only when the installed-plugin registry store is unreachable, keeping
backup discovery and broken-store startups fail-closed.
* build: migrate tooling and source installs to pnpm 12
Pin the verified native toolchain without changing application dependency
versions. Preserve the existing release-age policy explicitly and separate
package-manager lock metadata from the application dependency graph.
Use exact checkout pins for bootstrap and rollback, approve only the native
pnpm installer where npm requires it, and retain global install ownership
without equating the CLI major to the storage layout. Verify the Docker
runtime toolchain offline as its non-root user.
Remove duplicate bootstrap paths and obsolete prune input, update native
CLI flags and regression fixtures, and preserve UTF-8 in macOS Bash
installer NDJSON output.
* fix(build): isolate production dependency installs for pnpm 12
Build production dependencies from the same frozen manifest inputs instead
of pruning the inherited development tree. pnpm 12's native hoisted
importer cannot rename lower-layer OverlayFS directories during pruning.
Preserve native addon outputs, workspace builds, and offline non-root
Corepack use while deleting the obsolete production-store seeder.
Exercise runtime assembly and explicitly consent to the local agent-plugin
E2E fixture under the current plugin capability contract.
Validated full Matrix image and offline non-root runtime, focused Docker
regressions, full checks with test types and architecture, docs, real
agent-plugin gateway E2E, and isolated Codex autoreview.
* test: align package smoke with pnpm 12 global installs
* test: follow native pnpm artifact approval in distribution guard
* test: modernize pnpm fixtures for v12
* test: align rebased update fixtures with pnpm 12
* test: retain sanitized upgrade restart diagnostics
* test: expose CI navigation failures and register diagnostics
* test: retain post-core outcomes and plugin artifact identity
* chore(tooling): group upgrade diagnostic entrypoints
* fix(update): support native pnpm global installs and source links
Qualify local source and archive specs, carry verified global ownership through pnpm configuration, and verify intentional checkout links with shared runtime-readiness checks. Preserve strict packaged-install verification and manager ownership safeguards.
Verified the production updater with pnpm 11.22 and 12 using default and custom roots, source links, and tarball updates.
* test: preserve survivor diagnostics after service sealing
Promote incomplete exit-zero runs before failure capture and exercise the sealed-service manager fixture without inventing successful child exits.
* fix(update): preserve legacy pnpm global ownership
Carry the verified root and bin through both pnpm and npm configuration dialects after original-environment probes. Real pnpm 10 custom-root updates and pnpm 11/12 source and tarball matrices pass without redirecting the caller or weakening ownership checks.
* test(update): verify wizard consent through checkout handoff
Use the prepared checkout and fresh-process finalization boundary introduced by the updater repair. Preserve explicit consent forwarding before and after the wizard subcommand without assuming plugin callbacks run in the old process.
* refactor(update): validate checkout build metadata records
Use the canonical record coercer instead of carrying an unchecked assertion into the shared runtime verifier. Remove the now-unused grandfathered assertion entry; no allowance is added.
* docs(sandbox): document standalone common-image inputs
* test(packaging): account for required native prebuilds
Align installer and release size budgets at 235 MiB for the required native payload added on main. Keep both loader layouts, upstream binaries, explicit overrides, and missing-data rejection intact. Exercise actual defaults and the one-byte boundary. Retain bounded stderr diagnostics for the intermittent Bun signal test without claiming a production signal fix.
* test: align refreshed installer fixtures with pnpm 12
* fix(test): share Bun smoke force-kill ownership
Record the successful force-kill once across the timer and post-close drain. Native Darwin traces reproduced both duplicate-signal orders; genuine permission failures and uncleared groups still fail without extending deadlines.
Keep skill readiness and agent-exclusion diagnostics independent without changing model or command access. Cover overlapping states with real descriptor discovery and formatter regressions. Fixes#132022.
* fix(onboard): probe remote gateways with saved TLS pins
Honor the configured remote certificate pin in onboarding and configure readiness probes while keeping trust scoped to the exact saved endpoint. Retain explicit-pin precedence and exercise the real self-signed TLS handshake, rejection before credentials, and wizard config propagation. Follow up on #131042.
* fix(configure): validate trusted proxy addresses with the runtime parser
Share exact-IP and CIDR parsing between the trusted-proxy wizard and runtime matching. Reject malformed and empty list entries with expected-form guidance, preserve runtime matcher behavior, and recognize loopback CIDR aliases for the existing explicit consent prompt. Follow up on #131132; the diagnostic correction in #131196 did not validate this input.
* fix(configure): align readiness and loopback consent with runtime
Keep remote TLS pins and edge-auth inputs through health readiness polling by reusing the existing probe parameters. Keep remote config out of local health probes and cover polling through a real TLS socket.
Check loopback consent against runtime proxy matching for both parsed bases and containing ranges, preserving mapped IPv4 and exact IPv6 zone semantics. Extend consent and URL-binding coverage without changing runtime authorization or config schemas.
* fix(msteams): retain legacy SSO store until migration proves survivors
Verify normalized legacy and pre-existing SSO keys after import before reporting completion or archiving the source. Preserve existing token precedence, malformed-row handling, and storage policies. Cover zero and partial writes, real capacity eviction, full imports, and idempotent reruns.
* fix(msteams): verify conversation and poll migration survivors
Extend the SSO archival safeguard to conversations and both poll namespaces. Share the post-import key verification and completion path while preserving selection, canonical value precedence, malformed-row reporting, and empty-source behavior. Cover real eviction failures, bucket collisions, reruns, and selection boundaries without changing schemas, formats, or runtime storage policy.
* fix(daemon): stop reporting failed runtime probes as unsupported runtimes
The daemon runtime probe wrapped its exec in a bare catch that returned
`supported: false`, so any failure to *run* the probe was laundered into a
verdict that the runtime itself was unsupported. Operators on a perfectly
good Node install were told to install a Node version they already had.
Observed on Ubuntu 26.04 with Node 26.8.1: `openclaw node install` failed
with "No supported Node runtime was selected for the daemon" whenever the
process cwd was not readable by the service user (e.g. `runuser -u openclaw`
inheriting root's 0700 home over SSH), because every child spawn then fails
EACCES. The version logic was never wrong -- resolveSystemNodeInfo returned
supported:true and resolvePreferredNodePath returned /usr/bin/node when
probed directly on the affected host.
Node and Bun probes now share one resolver returning a closed
supported | unsupported | probe-failed union. A failed probe retains its
cause, executable, and cwd, and selection propagates that instead of falling
through to Node-upgrade advice.
Also:
- Derive the supported-version wording from NODE_RELEASE_FLOORS via a new
exported SUPPORTED_NODE_VERSIONS, replacing six hand-copied spellings that
omitted the >=25.9.0 line and told operators to downgrade.
- Forward OPENCLAW_WRAPPER through the node-host install path; the documented
escape hatch was previously gateway-daemon-only.
Production LOC net +6 (+156/-150); consolidating the duplicated Node/Bun
probes paid for the new failure handling.
* docs(cli): drop machine-local path from node probe-failure guidance
ClawSweeper P3: docs/AGENTS.md requires generic docs content with no local
paths. The probe-failure recovery example prescribed a specific directory;
state the readability requirement instead.
* fix(transcripts): keep raw IDs and dated selectors unambiguous
Preserve full raw-ID lookup and canonical CLI selector precedence. Give stop and summarize one explicit selector path without rebinding active capture authority or switching targets after retirement.
Refs #131720
* chore(transcripts): ratchet removed accessor debt
* fix(update): preserve explicit plugin capability consent
* fix(update): bind plugin consent to staged artifacts
Use the canonical artifact consent adapter for channel migrations and preserve
explicit consent through the update wizard. Keep prior usable payloads on denial
and record the exact accepted surface through the existing install-record owner.
Cover parser boundaries, staged artifact changes, and packaged update/repair
handoffs without treating --yes as consent or granting future permission.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* test(update): register consent scenario with probe
Route the packaged consent scenario through the existing plugin-update probe
so Knip discovers the implementation through its normal entry graph. Initialize
scenario state only when the consent command runs, preserving other probe modes.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(update): retain consent with compatible finalizers
Inspect the installed update command before forwarding explicit consent so
older and same-version target CLIs keep finalization in the existing parent
path when they lack the option. Preserve the installed compatibility host
through plugin convergence and reuse the update step timeout for inspection.
Use built-in streaming SHA256 for the packaged proof rather than requiring
an undeclared checksum binary.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(update): keep convergence code loaded across replacement
Link the mandatory registry repair before the core package swap removes the
old updater's chunks. This keeps current-process finalization runnable when
the installed target cannot receive explicit capability consent, without
retaining old runtime files or changing plugin policy.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* test(cli): await MCP Doctor batch readiness
Synchronize the concurrency test at the fourth credential check instead of
polling command startup with a wall-clock deadline. Release blocked checks
and await Doctor in finally, including early command or assertion failures.
Keep the exact concurrency, total-check and sorted-result assertions.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
Separate code-update ownership, effective launcher identity, native service control, and definition mutation. Guard actual definition publication before related config or token writes, and use the installed CLI's preserve-definition restart with renewed ownership and live port/version/build verification.
Consolidate unit/environment publication and conditional rollback, retain main's plugin convergence and fresh-Doctor ownership, and make post-core child termination belong to the winning completion path. Integrate current-main heap-argument provenance and process-marker handling; resolve the service Node from the executable rather than counting backward through flags.
Retain boundary-level sealed/writable/unknown/foreign, mount, platform, failure, and build-identity proof while consolidating redundant tests. The QA cleanup removes 399 maintained test/support lines; focused current-main integration proof passes 1,279 tests with one pre-existing platform skip. Production and installer growth remains +239 net.
Preserves the reviewed repair from ac86fdff61da9c0fea9f62da00a8c9f22df6790d while integrating main at 56d89073dd. No permission weakening, schema or lease policy change, deployment, or release.
Use the recorded suppression reason for human list and show status while preserving genuine delivery warnings and JSON contracts. Related: #111851. Thanks to @akalsey for the report.
* fix(sessions): preserve participant identity and input provenance
Keep profile, agent, remote, observed, and legacy identities distinct in the existing participant table. Record accepted input at admission, including steering, instead of inferring a person from the session creator. Preserve historical membership and counts while leaving ambiguous profile timestamps unknown through stopped-writer Doctor migration.
Project full visibility-filtered person membership before preview limits so Activity does not misattribute channel identities or omit people outside the facepile. Keep participant membership separate from authorization and expose raw-selector ambiguity to memory operators.
Repair Doctor readiness reporting, generic Swift inline-union generation, direct-dispatch metadata handling, and fixture-owned database lifetimes. Verify namespace collisions, real provider input, accepted steering, visibility, backup/migration/reopen boundaries, native decoding, and the built-CLI lifecycle.
Fixes#130661
* fix(macos): isolate readiness and discovery lifecycles
Keep readiness fixtures private for their entire lifetime and give health readiness one deadline owner. Start and cancel slow host discovery with active discovery, not model construction.
Make native protocol, callback, onboarding, and process-cleanup tests observe their intended lifecycle phases without expanding deadlines or weakening assertions. Correct the documented signing default.
Validated with 1,839 parallel native tests, the release product build, causal negative controls, pinned Swift lint/format checks, and fresh isolated autoreview. Native production delta: -5 lines.
* docs(macos): clarify app profile isolation boundaries
* build(protocol): refresh generated Swift install models
* fix(protocol): preserve optional literal field presence
* fix(ci): bound SDK declarations and isolate test lifecycles
Discover the current declaration source graph in a joined child before normal eager emission, and track its complete source-bearing cache inputs. Repair shared jsdom focus teardown and native worker fixture request ordering without changing UI focus ownership or execution fallback policy.
* test(sessions): prove Goal participant upgrade boundaries
* fix(gmail): keep setup command failures readable
* test(gmail): consolidate setup diagnostics coverage
* docs(ci): clarify Swift test execution policy
* test(brave): cancel requests at the transport boundary
The in-flight cancellation fixture polled for fetch within one second, but
first-use runtime and DNS preparation can exceed that deadline. The first
case then exited without aborting or awaiting its request, leaking it into
the next case's global fetch mock (CI run 33118704789).
Abort from the existing mocked transport after its listener is registered,
await terminal rejection, and retain exact call-count and aborted-signal
assertions. No production behavior, timeout, or SDK mock changes.
(cherry picked from commit 697040a81eeb26a8ea947cec01b544125c3d98c0)
* test(openshell): keep mirror socket fixtures within platform limits
The wrapper's canonical macOS temp root makes the nested socket fixture
exceed the 104-byte sockaddr_un.sun_path field, failing at listen before
mirror reconciliation. Shorten the existing temporary-directory prefix
without changing the socket name, assertions, cleanup, or production code.
* refactor(channels): reuse ingress stop guard
* fix(doctor): atomically repair session transcripts
* fix(sessions): keep runtime reads and repairs on SQLite owners
Resolve physical session databases once and carry that identity through startup, search, boards, maintenance, and Doctor. Remove automatic legacy JSON import from Gateway startup while preserving explicit Doctor upgrades.
Publish repaired legacy transcripts with strict atomic replacement and preserve the source when backup, write, or rename fails.
* fix(sessions): simplify startup ownership and diagnostics
* test(sessions): migrate legacy history through Doctor in CLI proof
---------
Co-authored-by: Amp <amp@ampcode.com>
* feat(approvals): standing-grant ledger, revocation, and configurable terms
Completes the operator half of cron standing grants (#129526):
- Grants are listable and revocable. New gateway methods
exec.approval.grants.list/revoke (operator.approvals scope), CLI
'openclaw approvals grants list|revoke', and a Standing grants section
on the Control UI approvals page with per-row revoke. Revocation is
idempotent, records the acting client, and takes effect at the next
occurrence's spawn boundary.
- Grant terms are frozen at mint and configurable. Default stays
until-revoked (matching what shipped Always allow has always meant);
tools.exec.grantExpiryDays sets a day-bounded default for future
grants (enterprise fleet policy), and resolve surfaces may override
per grant via grantExpiresInDays / --expires-in-days. Existing grants
keep their minted terms; config changes are never retroactive.
- expires_at_ms goes nullable (NULL = until revoked). The mandatory-
expiry shape never reached a release tag, so the lazy ensure rebuilds
it in place; grants are re-derivable authority, so the fail-closed
cost is one re-prompt.
- Approval cards say what Always allow does. Automation approvals carry
a standing-grant ApprovalScope (new union member) built server-side
from the cron run registry (now carrying the job display name); the
Control UI inbox card and modal render it via i18n, e.g. 'Always
allow runs this exact command for "grant-demo" without asking, for
10 days (revocable)'.
- Aux method registries stay in lockstep: new parity test fails when a
GATEWAY_AUX_METHODS entry lacks a lazy handler (this gap produced
live unknown-method errors during bring-up).
Live-proven on a hermetic gateway: until-revoked grant ran 62 promptless
occurrences; UI and CLI revocation each returned the prompt on the next
occurrence; config default stamped exactly 10.0 days via a UI resolve;
--expires-in-days 99 override stamped 99.0 days; ledger and card
screenshots captured from the running Control UI.
* chore(ui): annotate the scope narrowing assertion for the safety ratchet
* test(gateway): move aux-method parity check to its own suite
* fix(ci): boundary-parse UI approval scope; register grants schemas for native codegen
- The Swift/Kotlin generators discover named schemas through the
protocol schema fragments; the standing-grant scope member and the
grants list/revoke shapes were missing there, which made the Swift
generator silently drop the ApprovalScope union and broke ios-build.
Registered, regenerated, union and new struct emitted again.
- The chained-assertion lane rejects 'as unknown as' in the UI scope
parser; replaced with a real per-kind boundary parser, which is what
the rule asks for.
- The sqlite-allow-raw marker must share the line of a mid-statement
prepare() call for the Kysely guardrail; split the pragma read so the
SAFETY comment and the allow marker each sit on their own guarded
line.
* chore(ui): record startup-budget growth for the approvals scope line
The standing-grant scope renderer and grants-ledger strings ride the
boot path (~700 B gzip). Recorded via the check's --update-baseline flow
with the reason inline; well under the committed 350 KiB hard cap.
* fix(gateway): restore the channel-restart helper export dropped on main
#118157 made startGatewayChannelFromActiveRegistry module-local while
its colocated test still imports it, breaking check-test-types and the
compact shard on every merge ref. Smallest correct main heal per the
broken-CI doctrine; the test passes again.
* fix(gateway): drive channel-restart reload coverage through its exported owner
Replaces the prior export restore: #118157 made the restart helper
module-local (the dead-export scan is right that tests are not
production consumers), but left its colocated test importing it, so
main failed check-test-types either way. The test now exercises the
same preserveManualStop semantics through rollbackStoppedGatewayChannels,
the exported reload owner, and the helper stays private.
* test(ui): answer the grants ledger request in approvals-page history tests
The approvals page now loads the standing-grant ledger next to history;
a method-aware stub answers it out of band so the ordered history mocks
keep their call counts. Adds coverage for the ledger render and the
revoke round-trip.
* chore(ui): record CI-observed startup-JS baseline for the grants surface
The e2e-real-gateway lane builds the same tree ~600 B larger than checks-ui
and local builds, past the 64 B variance allowance; record the CI-observed
value so the enforcement limit stops straddling cross-lane build variance.
* fix(cli): escape standing-grant ledger fields visibly; register grants methods in inventory tests
The grant ledger's revokedBy (client display name), automation label, and
agent-authored command now go through escapeApprovalTextForTerminal like the
pending-approvals table, so hostile control characters render as visible
\u{...} escapes instead of being silently stripped by the table renderer.
Regression test fails pre-fix. Also lists exec.approval.grants.list/revoke
in the 2026.8 release-train roster, classifies the approvals grants command
group for JSON output, and fixes the stubGrants mock typing.
* fix(gateway): reduce transcript memory pressure and preserve heap controls
Avoid overlapping raw SQLite rows and transcript serialization copies while
preserving complete fenced snapshots, provenance, callbacks, and reset hashes.
Scale managed Node Gateway budgets with host capacity, preserve operator heap
ownership, and keep service repair and macOS ownership aware of native flags.
* fix(daemon): preserve heap controls after named preloads
* fix(config): validate surviving batch values through one mutation flow
* fix(cli): drain config failure output before exit
Unwind already-reported config failures through the shared CLI finalizer so resources close and piped JSON drains before the requested exit. Preserve injected runtime ownership and avoid rendering typed exits twice. Cover full 1 MiB pipe output, exact status, and config error contracts.
* refactor(config): make snapshot validation throw on failure
* fix(release): consent to staged Codex onboarding companion
* fix(e2e): prepare reviewed onboarding plugins explicitly
Use the shared command-help consent helper for the reviewed Codex and
external channel fixtures. Keep exact staged Codex versions pinned, use
official catalog selectors for published packages, and preserve historical
automatic setup when the candidate CLI lacks capability consent.
Replace source-order assertions with shell boundary coverage and document
reviewed plugin preinstallation before retrying noninteractive setup.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(e2e): preserve official provenance for candidate channels
Stage the selected Discord or Slack companion with Codex in the verified
prerelease registry and install its exact pinned npm spec after onboarding.
The former npm-pack path installed matching bytes but could not establish
the official provenance required by trusted plugin state APIs.
Remove local archive packaging and install overrides. Reject missing or
mismatched source companions before CLI use while keeping published catalog
selection and historical automatic setup unchanged.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(e2e): preserve frozen channel candidate registry
Keep the immutable Codex registry artifact unchanged and serve source Discord/Slack tarballs as separately validated exact npm packages. Remove source install overrides and fail closed without the mounted registry.
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(e2e): keep candidate plugins in one registry
Restore the planner-owned immutable prerelease registry artifact containing Codex and the selected source channel companion. This supersedes the separate tarball mount follow-up.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
Co-authored-by: Dallin Romney <dallinromney@gmail.com>
* fix(gateway): own standalone MCP App request lifetimes
Keep initial loading and individual MCP requests bounded without applying
a derived single-request timeout to composed App operations. Carry caller
cancellation through the HTTP request owner, isolate shared catalog waits,
and preserve bounded graceful cleanup before terminal document teardown.
Retire stale document/bootstrap responses and observe asynchronous catalog
rejections without changing authorization, public SDK contracts, or retry
behavior. Add serialized-owner regressions and real Chromium conformance.
Rewrites #119388 while preserving the contributor's report and credit.
Co-authored-by: 唐梓夷0668001293 <tang.ziyi@xydigit.com>
* test(ui): preserve rendered MCP App diagnostics without suppression
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: 唐梓夷0668001293 <tang.ziyi@xydigit.com>
* fix(system-agent): surface operator-only approval handoff on all delegated routes (#116519)
Delegated OpenClaw writes from messaging channels told the user to approve
conversationally ("Say yes to apply"), but delegated sessions intentionally
ignore chat approvals — only an operator in the OpenClaw UI can resolve them.
- Default agent-loop route: thread operatorApprovalOnly from the engine
through the turn runner into the ring-zero tool options; the tool registers
the delegated proposal for the operator registry and instructs the model to
surface the OpenClaw operator UI / `openclaw` CLI path instead of a
dead-end conversational prompt (the needs-approval marker is kept so
out-of-process CLI hosts still mirror the refusal).
- Planner-fallback route: the delegated reply preserves refusal evidence
(what was requested, that it was not applied) alongside the operator
handoff.
- Gateway: the closed SystemAgentChatResult schema is unchanged — the
openclaw.chat response carries only needsApproval/proposalId; no
approvalHint field.
- Coverage: real agent-loop turn through the real ring-zero tool, tool-boundary
delegated refusal + marker transition, engine default-route passthrough, and
direct-session "Say yes to apply" preserved.
- Plugin SDK: regenerate plugin-sdk-api-baseline.jsonl — the new optional
operatorApprovalOnly field on SystemAgentToolOptions flows into the
createOpenClawCodingTools options closure, changing its closureHash; the
export declaration is unchanged.
* fix(system-agent): preserve validation in delegated approval handoffs
Keep executor preapproval validation before staging delegated proposals, share actionable operator handoff text, and align the system prompt. Cover real tool and transport behavior while retaining direct approvals.
Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
* test(system-agent): restore scoped CLI fixture and reuse suites
Keep delegated approval coverage inside existing suites without increasing shard or file-size limits. Restore the CLI backend fixture dropped when chat-engine tests were split, avoiding real plugin setup loading in routing and continuity tests.
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(secrets): preflight exec provider command paths before config acceptance
Schema validation and config writes accepted exec SecretRef command paths that
gateway cold start rejects (symlink, missing, unsafe permissions/ownership), so
a config that printed "Config valid" could crash the gateway on the next restart.
Share one non-executing exec-provider command-path validator
(`src/secrets/exec-provider-path-validation.ts`, extracted from `resolve.ts`
`assertSecurePath`) across cold-start activation, `openclaw config validate`, and
supported config writes so all three surfaces return the same verdict for manual
exec SecretRef providers.
- New `src/secrets/exec-provider-path-validation.ts` (`assertSecureExecCommandPath`);
`resolve.ts` imports and calls it, deleting the duplicated logic.
- `config validate` calls `collectManualExecProviderCommandPathErrors` with
`validateAllProviders: true` so the strict validation command checks every
configured manual exec provider. Config writes (`config set/patch/dry-run`)
use targeted preflight instead — they check only providers touched by the
operation, or all providers when the write edits the `secrets.providers`
collection itself — so an unrelated routine write is not blocked by a dormant
inactive provider that gateway startup would skip. A shared
`collectTouchedProviders` helper deduplicates the touch-collection logic this
function and `collectPluginIntegrationProviderErrors` both need.
- Guards against non-object provider values so a value-mode write setting a
provider to `null`/primitive no longer throws a raw TypeError.
- Docs aligned with the exact permission rule, symlink rejection, and that
`config validate` checks every provider while writes use targeted preflight.
The extracted validator stays at parity with current `resolve.ts` cold-start
activation: absolute path, non-symlink, trusted-directory containment,
non-writable-by-others permissions, current-user ownership, and Windows ACL
availability. It deliberately does not add a regular-file or owner-execute-bit
requirement, so cold start (which now calls the shared validator) does not grow
stricter and block existing configurations without an upgrade path. Tightening
the executable policy is upgrade-sensitive and left to maintainers (the issue
carries `needs-product-decision` / `needs-security-review`).
Scope is limited to manual exec SecretRef providers as reported in #117051.
Plugin-integration materialized-command parity, the deprecated `allowInsecurePath`
manifest field, `checks.schema` semantic widening, and dead CLI flag retirement
from earlier revisions are intentionally left out for the same boundary reason.
Closes#117051
* refactor(config): unify secret provider preflight and mutations
Share one provider issue collector and one set/patch/unset write lifecycle. Preserve validation JSON and targeted recovery, and carry provider metadata through patch deletions. Keep startup path policy unchanged.
Co-authored-by: SunnyShu0925 <shu.zongyu@xydigit.com>
---------
Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix(cron): record real delivery outcomes and stop false-success completions
Record delivery outcomes at their owners and derive whole-run completion, delivery failure alerts, and one-shot retention from those facts. Keep execution status separate from delivery failure, and retain undelivered jobs and transcripts for inspection.
Requested delivery is required unless explicitly best-effort. Existing alternate-route alert policy and duplicate-send protection remain unchanged.
* fix(cron): preserve cleanup ownership and record-only replay
Transfer transcript cleanup ownership before awaiting delivery dispatch so
exceptions retain the diagnostic session while runtime resources still retire.
Remove the returned cleanup flag and exercise actual dispatch in deletion and
admission-release tests.
Keep delivery-failure notification recovery record-only, preserving the
historical receipt without scheduling another alert. Absorb the single-use
alert helper into finalization and strengthen canonical delivery-state coverage.
* fix(cron): retain one-shots only for failed or unknown delivery
* fix(cron): treat empty webhook summaries as intentional silence
* fix(cron): throttle delivery failure alerts with cooldown
* docs(cron): align cleanup and bestEffort text
* fix(cron): align cleanup and replay with run outcomes
Release quiet and best-effort successful one-shot sessions through the
existing dispatch cleanup owner. Carry the finalizer's undelivered execution
status so fatal errors and unrecovered presentation warnings retain evidence.
Restore replay cooldown only from recorded notification intent, without
recomputing alert requests through current policy. Consolidate target-error
results and clarify the shared cooldown and successful-execution contracts.
* fix(cron): extract reply skip-reason leaf to break import cycle and refresh prompt snapshots
* fix(sessions): bound legacy transcript import memory
Stage transcript payloads and deduplication in private temporary SQLite storage before the existing atomic import. Rebuild projections from navigation metadata and stream payload reads rather than retaining entire histories. Preserve exact handoffs, source validation, and archive recovery.\n\nFixes #127468.
* build: register doctor transcript staging SQL boundary
* perf(doctor): bound healthy history checks and import cleanup
Stream unchanged header and label detection while retaining exact snapshots and atomic guards for positive repairs. Reuse one import-finalize operation for handle closure, schema maintenance, and automatic incremental vacuum.
Keep full integrity checks, NONE-mode conversion, and explicit full compaction. Verified constrained-heap regressions, real historical upgrades, complete long-history Docker cases, process interruption, source mutation, and temporary-volume exhaustion.
* fix(transcripts): retire replaced captures from active status
* test(transcripts): move Discord lifecycle proof across public test boundary
* test(transcripts): synchronize pending startup without polling
* test(discord): keep voice harness imports on public SDK
Route repair and finalize doctor diagnostics through the existing fresh-process owner so JSON stdout stays parseable on success and failure. Preserve workspace suggestions, human output, and no-restart behavior; retain subprocess diagnostics before canonical JSON errors.
* fix(plugins): refuse git installs onto an existing managed checkout
Check the managed Git target before cloning, using the same availability guard as npm and directory installs. Preserve explicit update and force behavior, and protect existing checkout files when a repository changes its plugin id.
* docs(plugins): clarify git force reinstall identity limits
Limit the Git force example to reinstalling the same plugin id. Force replaces the checkout but does not migrate an existing install record to a different manifest id; normal ownership validation still applies.
* feat(configure): surface the trusted-proxy loopback opt-in with its warning
Ask for explicit consent before enabling same-host trusted-proxy authentication,
and explain the runtime rejection when consent is declined. Preserve existing
loopback consent and unprompted device enrollment policy on same-mode reruns.
Reuse runtime loopback classification, add English and Chinese wizard copy,
and document the consent and preservation behavior.
* test(configure): assert wizard auth through the real builder
Remove the auth-builder mock and replacement factories so gateway prompt tests verify returned configuration across proxy, token, password, and SecretRef flows. Retain all consent regressions while reducing test scaffolding and reusing tracked environment cleanup.
* fix(device-pair): verify retained subscribers before archiving the migration source
Precheck remaining namespace capacity before importing legacy subscribers. Verify source and pre-existing destination keys in the shared JSON importer before reporting completion or archiving, preserving the source and warning when retention falls short. Keep runtime caps, eviction policy, and registration semantics unchanged.
Prepared for draft PR maintainer review. Review-required: persistent-state retention semantics.
* fix(device-pair): omit absent subscriber migration fields
Keep absent account and thread fields out of normalized legacy subscribers so the strict plugin-state JSON serializer accepts ordinary subscriptions. Preserve numeric zero thread IDs and exercise all optional target combinations through the real migration contract.
Share name-first, ambiguity-aware hook selection with toggles and carry the selected hook to rendering and exit status. Preserve unique keys, missing-hook output, plugin-managed inspection and mutation policy. Closes#131075.
* fix(channels): keep configured accounts in JSON inventory
Keep metadata-only inventory independent of setup-runtime eligibility, while retaining setup precedence and failure visibility. Let status audits resolve channel capabilities at the audit owner instead of treating inventory metadata as complete adapters.
Fixes https://github.com/openclaw/openclaw/issues/130700
* test(status): align JSON audit owner expectations
* fix: preserve native session ownership during cleanup and attachment
Prepare permitted harness owners for offline session deletion. Reject direct
attachment of parent-controlled Codex children before displacing ownership.
Keep deadline and client authority through binding publication, and release
accepted subscriptions when publication fails without a remaining owner.
Unify conversation create/attach and preserve observational child monitoring.
Verified 950 focused/sibling tests, production and test types, independent
Codex review, and the real built offline CLI capacity reproduction.
* test: avoid shadowing the native binding row
Resolve explicit extra roots as hooks or declared packs so successful linked installs are discovered and executed. Select only declared pack leaves while preserving collection scanning, source policy, and containment checks.
Fixes#130783.