Skip to content

fix(update): prevent stale children from changing native services - #143905

Merged
fuller-stack-dev merged 11 commits into
mainfrom
fix/update-native-child-custody
Sep 11, 2026
Merged

fuller-stack-dev merged 11 commits into
mainfrom
fix/update-native-child-custody

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Latest: settled capability-probe correction (4255c6b1d18e)

CI34623288834 passed the actual published-upgrade Docker lane, but compact18 refused the legacy revoked case at its capability probe. A focused real-process control exposed a normal-only predicate: valid code-zero/exit capability output was refused after cooperative descendant cleanup, even with the actual process group and descendant extinct. The forced-cleanup control remained refused.

The caller now requires code zero, exit termination, null signal, not killed, complete exact capability output, current original authority, and normal or fully joined cooperative cleanup. It still requests complete process-tree extinction. Forced, uncertain, cancellation, timeout, stale authority, incomplete output and unsupported capabilities remain failures. No timeout or cleanup mechanism changed.

Eight affected native/legacy controls passed; both new controls passed on final source after a test-only shadowed-local rename. The changed runtime was rebuilt and all three affected compiled finalizer cases passed. Typed lint passes. The two-file scoped P0-P2 review was clean before that identifier-only correction; production bytes remain exactly reviewed. The final full canonical local gate is finishing, and fresh exact-head hosted CI is required. An unrelated unchanged Windows worker-artifact tooling test timed out in the old CI and is not being edited here. Earlier proof and failures remain preserved.

Related: #143791

Problem and scope

An interrupted update can leave a target-native command alive after its original owner or immediate spawner is revoked. This PR binds native receiver admission, process/file/signal effects, and configuration commits to the original update's live lease and registered process lineage. Unsupported targets refuse before stop/publication.

This is the native-child custody component and its public Doctor caller, not complete recovery-journey acceptance. The lease-store schema is unchanged.

Current published head: 231835929f940faaac8d273a8fcd441a2e6798a6, tree 7cb9e913997da02ae3c0c770a136db1290e74552. The native publisher verified exact-tree equality and preserved the signed reconciliation parent 7793e227. GitHub reports the PR mergeable.

Mainline reconciliation

The landing continuation integrates main through 86cd546d0bbe5110e813961430e9c0d3946c768e, including #144778. A changed package generation retains both the original/spawner hierarchy and the active candidate-generation lease. The actual child PID/start identity binds both registrations before private input is delivered. Original revocation now refuses child effects, not merely eventual parent settlement. Root release remains blocked by surviving descendants.

The already-landed #144328 retirement of the obsolete post-activation stop path is retained. The selected native caller supports install/restart, and its real-process fixture now uses restart/restarted. Ordinary Gateway stop remains supported by its own CLI registry.

Review correction

The scoped integration review found two related gaps. Both reproduced through the actual receiver: a target different from the active grant root, and a candidate mirror substituted for the original owner. The receiver now requires the active grant root to match its loaded target. Original/spawner/active-root records and the captured physical lease-database identity are correlated in the existing registered child names, with the same correlation on both root registrations. Current row and actual PID/start checks remain required; transported fields alone cannot select a replacement lineage. No lease schema or separate store was added. Stripping lineage fields from a modern registration refuses. The shipped UUID-only finalizer format now captures its existing physical database and retains its real original/registered-child authority before issuing fully bound modern descendants; see the correction below.

Review status is findings-resolved after the red/green corrections, not a second clean review.

Fresh composed proof

The new test in update-command-executor-native.test.ts uses a real original executor, a real intermediate delegated process, a separately registered receiver, the actual private-stdin Gateway receiver, and actual disposable native/configuration sinks:

  • Healthy changed-root flow writes through execFileUtf8, publishLaunchAgentPlist, and createConfigIO().writeConfigFile; prior port/auth settings survive the config transition.
  • Replacing the real original lease or immediate-spawner row refuses all three effects.
  • Killing the actual spawner while leaving its registered receiver alive refuses all three effects. Both installation roots remain excluded until settlement. The test-only raw transport permits survival; production owner and receiver checks are not mocked.
  • Original revocation at the real config pre-commit boundary prevents publication.
  • Fresh original ownership is admitted after successful native work and both roots settle.

All five distinct composed cases passed across preserved runs. The three new real-receiver substitution controls reproduced both review findings before correction. Two further real receiver controls reproduced and now refuse equal-row database copies, including stripped database pins. All 19 receiver/nested/composed cases and three rebuilt finalizer cases pass on final tree 4ccc401163a0afbbccd411c16ff9377304d41bbb. The earlier legacy probe established the historical fence-only behavior; the corrective section below supersedes that behavior to preserve shipped finalizer completion. Separate finalizer/upgrade-recovery controls passed 7 cases; owner/generation controls passed 19. The selected receiver fixture and final static checks are recorded in the landing comment at the exact published head. Earlier test setup and type failures remain preserved; they are not product passes.

This proof performs real native command execution and definition/configuration writes in disposable paths. It does not install, stop, or replace an operator service. Finalizer/upgrade tests retain their existing isolated service-backend fixtures. It makes no claim of full recovery, later publication ordinals, or installed-service/HOLD acceptance.

Shipped finalizer correction

ClawSweeper revision 10 exposed a real v2026.9.4 compatibility failure: the admitted legacy finalizer could not create its nested native restart. CI 34618659283 also failed the actual v2026.9.3 published-upgrade lane because that older transport has no executor field. Both defects reproduced through the actual worker and native caller before repair.

The exact UUID-only legacy grant now pins the existing physical database and retains its live original/registered-child process lineage before creating fully bound descendants. The older grantless worker acquires exclusive original ownership before run adoption/effects; an incumbent prevents admission. Modern stripped-lineage and copied-database refusal remain intact. No lease schema, second store, global setting, or operator-service change.

On the current corrective source: 25 affected controls pass (19 modern and six legacy); rebuilt runtime and three finalizer controls pass; the canonical changed-source gate passes. A scoped independent P0–P2 review is clean for this four-file correction only. Earlier integration findings remain findings-resolved. Fresh exact-head CI, including the real published-upgrade Docker lane, is required before merge. Explicit disposable fixtures are not installed acceptance.

Grantless scratch-domain follow-up

Revision 11 correctly identified that v2026.9.3 overrides the child TEMP/TMP/TMPDIR for scratch work. Both normal-incumbent bypasses reproduced through actual worker/native effects. The one-shot worker now restores those selectors from the retained producer environment (ownedManagedUpdateEnv ?? run.env) using the existing platform-aware lookup before lease admission. No alternative lease domain or caller-selected path is added.

The new tests retain real os.tmpdir()/secure filesystem resolution. Only the preferred-root location is a disposable unavailable path to exercise fallback on POSIX; Windows takes its normal fallback. Four final scratch-domain controls pass for both environment sources and healthy/incumbent cases. No scratch-local lease DB may appear. Seven affected checks passed before the platform lookup refinement; the rebuilt runtime and three compiled finalizer controls pass on final source. The complete changed-source gate and scoped P0–P2 correction review pass.

CI34621166786 passed the real published-upgrade Docker lane. Its only failure was the composed healthy fixture requiring cleanup normal despite code0 and cooperative cleanup. The fixture now accepts normal/cooperative success and explicitly checks actual group/receiver extinction, root release, and fresh ownership. No timeout or production cleanup changed. That old failed CI is preserved; new exact-head hosted checks remain required.

Checks and release-note context

The previous exact head 5690dd25a9a9f44812b3af894c113b4b6a1d266f passed all 129 jobs in CI 34497808062. That evidence remains tied to that head. New exact-head hosted checks are required before landing this reconciliation.

User-visible change: updates reject unsupported or stale native children before protected mutations, preserve original authority across destination-generation changes, and retain exclusion until descendant settlement. No package/launcher ownership or installed recovery HOLD is changed by this PR.

Preserved prior-head evidence and qualification history

Related: #143791

What problem this solves

An interrupted update could leave a target-native service command running after another update was admitted. The surviving command could still change service files, process state, or configuration under the old update.

Why this change was made

Reuse installation child grants for target-CLI native install, restart, stop, and capability-probe lifetimes. Nested callers retain both the original update owner and immediate spawner, bind actual PID/start identity before input, and retain exclusion until descendants settle. Hierarchical child keys keep descendants visible to intermediate and root release checks. Native process, file, signal, and config commit boundaries recheck authority.

The target receiver is bound separately to its destination package root; it does not replace the original installation's lease domain. Supported root/channel transitions retain original authority. Foreign destinations refuse. Candidate validation requires explicit destination-binding capability before native stop or package/Git activation, and the selected native caller rechecks capability later. Targets advertising only the earlier capability refuse before activation.

The public Doctor Git-update caller now owns one real executor across candidate validation, stop, update, same-owner recovery, and settlement. An additive runner callback probes native capability after existing config validation and before stop. History, failure reporting, and triage follow the complete outer executor result, including release failure. Recovery forwards the same original run/environment/fence instead of creating a restart-only lease.

Unsupported update-owned detached/unmanaged fallbacks refuse rather than starting unowned work. The missing-target old-runtime installer fallback is removed. Ordinary user-invoked Gateway commands retain their behavior.

User impact

Supported target-native update commands retain the original update's authority through completion. Revoked owners cannot start another protected native mutation or commit pending configuration. Replacement updates stay excluded while registered descendants remain live. Unsupported targets refuse before stop/publication rather than failing only after activation.

Evidence

  • Retained composed baseline: a surviving ordinary child wrote a disposable target after fresh installation admission. This is synthetic evidence, not an installed-service mutation; it was not replayed.
  • Owner regressions cover native subprocess, plist/config commit, signal escalation, startup publication, and delegated registration. Healthy ordinary/delegated controls remain preserved.
  • Intermediate-release regression uses real live children and store rows with simulated spawner liveness. Sibling keys fail; hierarchical keys pass. It is not an actual parent-death replay.
  • Earlier independent P0/P1/P2 review found a probe-custody gap; it is repaired through existing child registration/binding, with two intended red failures and ten green controls. Probes receive empty stdin, never an execution grant.
  • ClawSweeper's two P1s are corrected: real receiver controls cover healthy original-to-distinct-target authority and foreign-root refusal; candidate-owner regressions cover package, staged artifact, and Git refusal before simulated stop/publication. Three intended preactivation failures and the 21-case owner-suite pass are retained. Fixture setup failures remain separate from product evidence.
  • The follow-up independent P0/P1/P2 review found one P2: the old capability value did not attest to destination binding. Explicit targetRootBinding: true admission fixes it. The legacy response caused an accepted disposable effect in RED; all eight selected receiver/registered-CLI controls pass after correction. Review status is findings-resolved, not a new clean review.
  • Published test correction separates already-mocked lifecycle transport from real executor custody: 129 lifecycle cases and one actual missing-executor/no-child control pass, with scoped independent review and required checks. Compact16 passed on published test-correction head 32da4b0c and again with compact6/18 in completed run 34476330534.
  • Earlier source-bound local check:changed passed on committed head adf04247f68f312b424b9156f3d792fc9a461380 (tree c63de19ea09f007d8db7d95c7abba27d06451a20), with normal commit hooks preserving the checked tree. That prior result is retained; hosted CI/native landing qualification must complete on the new integrated head.

Current correction evidence

  • The qualified Doctor contribution is integrated byte-for-byte, including original-lease revocation and release-refusal controls. Its candidate tests exercise the real Git runner, default config validation, original executor and pre-stop capability admission. They are not installed-service proof.
  • Compact18 CLI fixtures now bind and join a real harmless child for receiver admission while retaining explicitly mocked native effects. Probe results do not invoke the effect mock. Actual host PID identities remain real when service platforms are simulated; original admission, exact receiver arguments, version, native result, health and terminal assertions are preserved.
  • The affected run recorded 440 passes and 44 failures, with all five real receiver cases passing locally. Bounded correction runs recorded 35 passes/13 failures, then 12 passes and three environment passes. These overlap and are not presented as a final all-tests aggregate. Failed setup and typecheck attempts remain preserved separately.
  • Independent composition review found no actionable P0/P1/P2 issue. A subsequent type-only fixture alias correction retains runtime behavior. The required staged check:changed passed on tree 9a3747448f6fb295745ab6d4e17d0ec6b40574f1, committed unchanged as 4b30bc680ac0d21db130fe0eaca5de5bac2f5efa.
  • The earlier adf foreign-receiver failure is preserved without a cause claim. The unchanged receiver assertions subsequently passed in hosted compact18 on 1e68cdd8; this does not substitute for composed authority-chain proof.
  • ClawSweeper revision 4 reviewed 4b30bc68: previous code findings addressed, no new blocking code defect; composed authority and upgrade evidence remain required.
  • The CI dispatch for that head failed at preflight, before tests, because a mainline help-text conflict left the synthetic merge ref stale. The conflict is resolved in 1e68cdd8899f2992a5cfef58cb629b079a3b3a60: both upstream install help strings and the unchanged hidden executor option are preserved. No runtime logic or assertion changes. The one-file required gate passed on exact committed tree 057beb9a32cf57a86b5e26a9b5823e80873cbda7. All 13 correction files and the executor remain byte-identical.
  • Run 34476330534 completed red: compact6, compact16 and compact18 passed; compact31 and compact33 failed because the synthetic merge base split the release navigation and exposed the hidden QA channel. The actual logs and original package remain preserved.

Navigation CI correction at 2fbc1a5b20cbd761c1cffc157559fb3f246c76ca

  • Adopted already-landed fix(docs): align locale navigation with split release tabs #144037 (1670c5a1) and fix(docs): detect missing navigation routes #144075 (46ffd899) through pinned main ecf8371c. The locale overlay and exact ordered navigation assertions match the split Releases/Contributing tabs; the hidden QA route is removed from public navigation, with its catalog assertion intact.
  • The old failures came from committed base/navigation drift, not demonstrated shared-test pollution. No failing assertion was disabled or replaced with a sampled inventory.
  • The merge was conflict-free. 49 of 51 PR paths, including every production file, retain their prior bytes; only two PR test files acquire already-landed upstream package-target and Doctor progress-argument corrections. Every PR production file is unchanged.
  • Fresh qualification: both affected navigation/catalog files 32 passed; overlapping package/Doctor controls 6 passed; required changed-file checks passed; independent P0/P1/P2 integration review scoped-clean.
  • New exact-head CI attached automatically: 34495320499. No rerun or duplicate dispatch. The exact-head package passed build and integrity checks: 67,962,880 bytes, SHA-256 2f5c96ac5a524aadf99aed549c6863a01f9c92022f114f605ef3cc774bb063be. Its embedded commit is 2fbc1a5b20cb; the old package remains preserved.

Source-process fixture ownership follow-up at 5690dd25a9a9

Compact31 and compact33 passed in CI 34495320499. Compact18 exposed the earlier intermittent foreign-receiver refusal again: capability checking failed before the unchanged installation-binding assertion. The raw failed run is retained. Bounded local pass-through diagnostics returned valid capability and normal cleanup, so they do not establish the precise hosted refusal cause.

The concrete test-owner mismatch is corrected by adding the unchanged update-command-service-custody.test.ts to the existing CLI-process test list. That lane supplies isolated, serial execution and the already-established ESBUILD_WORKER_THREADS=0 source-child setting. The test is still executed, not skipped or disabled. No new runner, assertion edit, timeout increase, mock, capability-policy change, or production change. All five real receiver cases and the existing lane-ownership contract pass; independent P0/P1/P2 review is scoped-clean. Required tooling checks passed, and the normal commit hook preserved checked tree 916d093b9a9db4517617c10b8f574f006ffdd7ab. Published commit: 5690dd25a9a9f44812b3af894c113b4b6a1d266f. New exact-head CI attached automatically: 34497808062. No old-run retry or duplicate dispatch. The exact-head canonical build and package integrity passed: 67,942,400 bytes, SHA-256 fdb06feffe56744a8710457546b9e204d18aca61719ec5eb68495e5da6bd88e7. The embedded build-info commit matches 5690dd25a9a9f44812b3af894c113b4b6a1d266f; the earlier packages remain preserved.

Hosted compact22/job 102941031293 (actual hybrid profile) passed all five unchanged receiver cases, including foreign-installation refusal. Its process group passed 37/37 tests and cleanup verification. The test did not disappear from CI. The initial local default-profile mapping to compact27 was incorrect and is not used as evidence. Exact-head CI 34497808062 completed SUCCESS at 5690dd25a9a9f44812b3af894c113b4b6a1d266f: 129/129 jobs complete, zero failures, including the required openclaw/ci-gate, compact6/16/18/31/33, both Windows test jobs and the receiver process lane. No old-run retry or duplicate dispatch.

Remaining qualification and boundaries

The genuine compact6 public-Doctor missing-executor defect is corrected by the qualified caller/runner/helper contribution in this head. This does not qualify all package/Git Doctor mutation children or plugin/fresh-finalizer paths. Exact new-head CI passed; old-head failures are preserved, not relabeled passing. The existing composed-proof requirement is still open.

Scope is target-CLI native custody and its public Doctor caller. Doctor/plugin children, in-process preparation/autostart, the separate deferred-load protocol, original-domain recovery continuity, and durable retirement remain tracked dependent work. This patch does not change package/launcher swap ownership, rollback, finalization history, terminal-result retirement, or the lease-store schema.

Canonical build and package integrity passed at 4b30bc68: 67,727,360 bytes, SHA-256 124a45220829c043a0577f7f4701f80d45a9e9eb0d28de3353583c041b1ffcae. That package is preserved. The separate canonical package for conflict-resolved 1e68cdd8 passed build and tarball integrity: 67,737,600 bytes, SHA-256 15661e5ce4e71809783db8d0db8fb227d77a6ad5a054e807f81d5c7b0df94799. The source-bound artifact/contract has been delivered to the existing parent/cbbe qualification owners; their installed hold is unchanged. Composed/installed proof remains pending; the older artifact is not rebound to the new head. No universal Doctor/plugin, whole-journey, or installed-service closure is claimed. PR remains unmerged.

@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime cli CLI command changes commands Command implementations size: XL maintainer Maintainer-authored PR labels Sep 10, 2026
@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review September 10, 2026 09:32
Keep original-root and immediate-spawner custody through native command and capability-probe lifetimes. Nest child keys for subtree exclusion, bind actual process identities before input, and fence native process, file, and configuration effects. Preserve ordinary commands and reject unsupported update-owned fallbacks.
@fuller-stack-dev
fuller-stack-dev force-pushed the fix/update-native-child-custody branch from 5e3fe4c to a465b4d Compare September 10, 2026 09:40
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 10, 2026
@clawsweeper

clawsweeper Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 11, 2026, 1:09 PM ET / 17:09 UTC (Revision 13).

ClawSweeper review

What this changes

Bind updater-launched native service commands and configuration writes to live update ownership, preserve older finalizer completion, and accept successfully settled cooperative capability probes.

Merge readiness

⛔ Blocked before merge - 2 items remain

This PR remains necessary: current main lacks the native-child authority handoff. Earlier compatibility findings are repaired, and the latest cooperative-cleanup correction preserves the rejection safeguards. No blocking correctness finding remains.

Priority: P2
Reviewed head: 4255c6b1d18e8fe21570182375a9d3b344b83b54

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A coherent ownership repair with strong component proof, resolved prior findings, and an explicitly accepted compatibility tradeoff.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): Recorded real-process proof exercises the original executor, delegated receiver, native process/file/configuration effects, revoked or substituted authority, and descendant settlement in disposable environments. Latest-head cooperative and forced probe controls preserve the earlier sufficient authority and legacy-completion evidence; installed-service recovery outside this component is not claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): Recorded real-process proof exercises the original executor, delegated receiver, native process/file/configuration effects, revoked or substituted authority, and descendant settlement in disposable environments. Latest-head cooperative and forced probe controls preserve the earlier sufficient authority and legacy-completion evidence; installed-service recovery outside this component is not claimed.
Evidence reviewed 8 items Pinned correction verified: GitHub’s exact-head commit patch changes the capability predicate and adds cooperative/forced settlement controls. The local historical diff failed because a required promisor object returned HTTP 403; the exact commit API supplied the correction instead. No merge-removal claim relies on the stale test merge.
Current main still needs the change: The fetched-main native caller launches service commands without the new private executor grant; its delegated executor also lacks the new original/spawner lineage checks. The merged generation repair does not replace this native-child protection.
Latest release boundary: The v2026.9.4 native caller likewise lacks the new grant handoff and retains the old-runtime installer fallback; this protection is not already supplied by the latest release.
Findings None None.
Security None None.

How this fits together

OpenClaw’s updater launches the target installation’s CLI to manage Gateway services. Installation leases and registered child processes determine whether those commands may change service files, processes, or configuration.

flowchart TD
  A[Update or Doctor request] --> B[Original installation lease]
  B --> C[Registered target CLI child]
  C --> D{Target supported and owners current?}
  D -->|Yes| E[Native service and config effects]
  D -->|No| F[Refuse mutation]
  E --> G[Join descendants and release leases]
Loading

Before merge

  • Resolve merge risk (P1) - Updates targeting unsupported runtimes or relying on detached, unmanaged, or Windows Startup-folder fallbacks can now refuse and require operator action; the maintainer explicitly accepts this documented compatibility boundary.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +807, Tests +2632, Docs +21. Total +3460 across 55 files.

View PR surface stats
Area Files Added Removed Net
Source 29 1209 402 +807
Tests 25 2695 63 +2632
Docs 1 21 0 +21
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 55 3925 465 +3460

Review metrics

Metric Value Why it matters
Production and regression coverage growth Production net +807 lines; tests and test support net +2,632 lines The stated growth supports shared child ownership, Doctor integration, shipped-format compatibility, and real-process refusal controls.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/commands/doctor-update.ts, unknown-data-model-change: src/commands/doctor-update.ts, unknown-data-model-change: src/daemon/launchd-service-files.ts, unknown-data-model-change: src/daemon/schtasks-install.ts, unknown-data-model-change: src/daemon/systemd-definition-mutation.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Retain the documented updater boundary (recommended)
    Accept the explicitly documented unsupported-target and fallback refusals while retaining ordinary Gateway commands and the repaired legacy-finalizer paths.

Technical review

Best possible solution:

Keep the maintainer-accepted updater-only refusal boundary, with one live ownership chain through native effects and proven completion for shipped legacy finalizers.

Do we have a high-confidence way to reproduce the issue?

Yes: current-main source exposes the unbound native-child path, and recorded real-process controls demonstrate stale-owner effects and their refusal after repair. This read-only review did not execute those controls.

Is this the best way to solve the issue?

Yes: extending the existing installation lease owner avoids competing authority stores, and accepting cooperative cleanup matches the runner’s joined-extinction contract without accepting forced or uncertain cleanup.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7af0464ba960.

Labels

Label justifications:

  • P2: This is bounded update-reliability work with concrete stale-child and compatibility controls.
  • merge-risk: 🚨 compatibility: Updater-owned operations intentionally stop accepting unsupported target runtimes and unowned fallback paths.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): Recorded real-process proof exercises the original executor, delegated receiver, native process/file/configuration effects, revoked or substituted authority, and descendant settlement in disposable environments. Latest-head cooperative and forced probe controls preserve the earlier sufficient authority and legacy-completion evidence; installed-service recovery outside this component is not claimed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Recorded real-process proof exercises the original executor, delegated receiver, native process/file/configuration effects, revoked or substituted authority, and descendant settlement in disposable environments. Latest-head cooperative and forced probe controls preserve the earlier sufficient authority and legacy-completion evidence; installed-service recovery outside this component is not claimed.

Evidence

What I checked:

  • Pinned correction verified: GitHub’s exact-head commit patch changes the capability predicate and adds cooperative/forced settlement controls. The local historical diff failed because a required promisor object returned HTTP 403; the exact commit API supplied the correction instead. No merge-removal claim relies on the stale test merge. (src/cli/update-cli/update-command-service-command.ts:89, 4255c6b1d18e)
  • Current main still needs the change: The fetched-main native caller launches service commands without the new private executor grant; its delegated executor also lacks the new original/spawner lineage checks. The merged generation repair does not replace this native-child protection. (src/cli/update-cli/update-command-service-command.ts, 7af0464ba960)
  • Latest release boundary: The v2026.9.4 native caller likewise lacks the new grant handoff and retains the old-runtime installer fallback; this protection is not already supplied by the latest release. (src/cli/update-cli/update-command-service-command.ts, 3a9d69db306c)
  • Cooperative cleanup remains bounded: The probe requests process-tree extinction, rechecks cancellation and original authority after settlement, and requires successful exit, no signal, no killed flag, complete output, and the supported capability. The termination controller joins group extinction and distinguishes forced or uncertain cleanup. (src/cli/update-cli/update-command-service-command.ts:79, 4255c6b1d18e)
  • Earlier findings remain repaired: The executor recognizes the exact shipped UUID-only grant and pins its existing database before issuing modern descendants. Grantless finalization restores the retained producer’s temporary-directory selectors before acquiring the normal installation lease. Real-worker controls cover successful completion and incumbent refusal. (src/infra/update-migrated-finalize.worker.ts:68, 4255c6b1d18e)
  • Complete captured proof inspected: The full API body matched captured SHA-256 e3757a993e5a9c7c362976788cdeb324d38bc259d62b71716ef73d693fb925a9 and all 22,231 UTF-16 units were read. Its composed proof uses real leases, intermediate and receiver processes, native execution, plist publication, and config commits; replaced owners, dead spawners, substituted lineage, and copied databases refuse effects. The latest report records both settlement controls passing on final source: fix(update): prevent stale children from changing native services #143905 (comment). (src/cli/update-cli/update-command-executor-native.test.ts:167, 4255c6b1d18e)

Likely related people:

  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • obviyus: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (12 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-10T12:33:38.073Z sha 1e68cdd :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-10T15:33:16.609Z sha 2fbc1a5 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-10T15:57:12.849Z sha 5690dd2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-10T16:18:10.815Z sha 5690dd2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-11T10:12:49.123Z sha 5690dd2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-11T15:59:26.606Z sha 7793e22 :: blocked before merge. :: [P1] [P1] Preserve native completion for accepted legacy finalizer grants
  • reviewed 2026-09-11T16:24:50.673Z sha facc8ca :: needs real behavior proof before merge. :: [P1] [P1] Acquire grantless ownership outside the worker scratch directory
  • reviewed 2026-09-11T16:46:24.597Z sha 2318359 :: blocked before merge. :: none

@fuller-stack-dev fuller-stack-dev self-assigned this Sep 11, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Qualified landing candidate; publication awaiting signing

Landing continuation for our native-child custody component, reconciled with main through 86cd546d0bbe5110e813961430e9c0d3946c768e (including #144778). Unpublished local checkpoint: fb87d66f9da37424b88e842d29e4747fc888a702; tree: 4ccc401163a0afbbccd411c16ff9377304d41bbb.

The fresh finite composed proof uses the actual original executor, intermediate delegated process, registered private-stdin Gateway receiver, and real disposable native/configuration sinks. It covers healthy changed-root execution, real original-owner and immediate-spawner row replacement, actual spawner death with a surviving registered receiver, config pre-commit revocation, retained exclusion at both roots, and fresh ownership after settlement. Earlier isolated upgrade/finalizer recovery coverage is preserved, not presented as installed-service proof.

Scoped integration review found receiver-root and original-lineage substitution gaps. Both reproduced and are fixed. Follow-up real receiver tests also reproduced and now refuse equal-row database copies and stripped database pins. Admission correlates original/spawner/active-root and the captured physical database identity with the recorded registrations; it still requires current rows and actual PID/start identity. Shipped plain grants retain their old fence-only behavior without gaining the new native/nested capability. No lease schema or second store was introduced.

Final-source checks:

  • node scripts/run-vitest.mjs src/cli/update-cli/update-command-service-custody.test.ts src/cli/update-cli/update-command-executor-native.test.ts: 19 passed, including all five composed controls and all five substitution/copy refusals.
  • Rebuilt CLI/runtime plus selected finalizer controls: 3 passed, bootstrap/postbuild checks passed.
  • Real legacy-fence probe: admission, refusal of new nested delegation, and joined release passed.
  • Production and test typing, typed lint, and formatting passed. The full changed-source gate passed on the preceding repair snapshot; final binding corrections received the listed affected checks. Exact-head hosted CI is still required and has not been substituted by old-head success.

Review disposition is findings resolved with preserved red/green evidence, not a second clean-review claim. Main's retired post-activation stop branch remains retired. Operator services and shared installed HOLD were untouched; disposable definition/config writes are not a claim of installed recovery or completion of the broader recovery journey.

The native publisher refused the unsigned merge because its GitHub API path cannot preserve merge ancestry. The remote remains 5690dd25; the existing registered 1Password signer is awaiting local authorization. No new-head CI or merge is claimed. A refreshed review will be requested after exact-head publication.

@fuller-stack-dev

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

The signing blocker is resolved. The native publisher verified the remote head and exact qualified tree. The signed commit preserves the unsigned checkpoint's tree, parents and message. The PR is now mergeable.

Landing continuation for our native-child custody component, reconciled with main through 86cd546d0bbe5110e813961430e9c0d3946c768e (including #144778). Exact new head: 7793e227da75cba8352506a683b1470e8ad786a9; tree: 4ccc401163a0afbbccd411c16ff9377304d41bbb.

The fresh finite composed proof uses the actual original executor, intermediate delegated process, registered private-stdin Gateway receiver, and real disposable native/configuration sinks. It covers healthy changed-root execution, real original-owner and immediate-spawner row replacement, actual spawner death with a surviving registered receiver, config pre-commit revocation, retained exclusion at both roots, and fresh ownership after settlement. Earlier isolated upgrade/finalizer recovery coverage is preserved, not presented as installed-service proof.

Scoped integration review found receiver-root and original-lineage substitution gaps. Both reproduced and are fixed. Follow-up real receiver tests also reproduced and now refuse equal-row database copies and stripped database pins. Admission correlates original/spawner/active-root and the captured physical database identity with the recorded registrations; it still requires current rows and actual PID/start identity. Shipped plain grants retain their old fence-only behavior without gaining the new native/nested capability. No lease schema or second store was introduced.

Final-source checks:

  • node scripts/run-vitest.mjs src/cli/update-cli/update-command-service-custody.test.ts src/cli/update-cli/update-command-executor-native.test.ts: 19 passed, including all five composed controls and all five substitution/copy refusals.
  • Rebuilt CLI/runtime plus selected finalizer controls: 3 passed, bootstrap/postbuild checks passed.
  • Real legacy-fence probe: admission, refusal of new nested delegation, and joined release passed.
  • Production and test typing, typed lint, and formatting passed. The full changed-source gate passed on the preceding repair snapshot; final binding corrections received the listed affected checks. Exact-head hosted CI is still required and has not been substituted by old-head success.

Review disposition is findings resolved with preserved red/green evidence, not a second clean-review claim. Main's retired post-activation stop branch remains retired. Operator services and shared installed HOLD were untouched; disposable definition/config writes are not a claim of installed recovery or completion of the broader recovery journey.

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 11, 2026
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Published 4255c6b through native preparation, with verified signature and exact qualified tree.

CI34623288834 passed the real v2026.9.3 published-upgrade Docker test. Its compact18 failure stopped a legacy revoked control at capability admission before receiver. A new actual-child/descendant regression proved a false refusal: code0/exit, exact real receiver capability output, cooperative cleanup and confirmed group/descendant extinction, yet unsupported. Forced cleanup still refused. The caller now accepts only normal/cooperative successful settled exits, also requiring null signal/not killed and all prior output/current-authority checks. No timeout or cleanup implementation change.

  • Eight affected cases passed, including healthy/unsupported/changed-root/foreign-root, both settlement controls, and the legacy revoked case.
  • Final test-only local rename: both settlement cases and typed lint pass. Runtime rebuilt; all three compiled finalizer cases pass.
  • Scoped P0-P2 review is clean for the two-file correction before that identifier-only change. Production bytes remain exactly reviewed. Prior whole-PR findings are preserved, not relabeled.
  • Final local canonical gate is finishing; fresh exact-head CI must pass before merge. The old run also timed out in an unchanged Windows worker-artifact tooling test; no unrelated source was changed or gate waived.

Revision12 already accepted the terminal component authority and legacy compatibility proof. Retain the documented updater-only fail-closed compatibility boundary; no lease schema/store change and no full installed/HOLD recovery claim.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@fuller-stack-dev
fuller-stack-dev merged commit c06f21d into main Sep 11, 2026
180 of 181 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/update-native-child-custody branch September 11, 2026 17:27
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

steipete added a commit that referenced this pull request Sep 11, 2026
install.test.ts crossed the 1000-line cap when #143905 added an authority
case, so every pull request merging main now fails lint on a file it never
touched. expectFields asserts named fields and touches none of this suite's
mocks, so it belongs in the existing sibling helper module rather than here.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 12, 2026
…enclaw#143905)

* fix(update): prevent stale children from changing native services

Keep original-root and immediate-spawner custody through native command and capability-probe lifetimes. Nest child keys for subtree exclusion, bind actual process identities before input, and fence native process, file, and configuration effects. Preserve ordinary commands and reject unsupported update-owned fallbacks.

* test(update): separate lifecycle transport from executor custody

* fix(update): admit native targets before activation

* fix(update): preserve Doctor executor through native recovery

* fix(cli): preserve upstream service install guidance

* test: run native custody controls in process lane

* fix(update): preserve native completion for legacy finalizers

* fix(update): restore legacy finalizer lease domain

* fix(update): accept settled cooperative capability probes
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Sep 24, 2026
rebase 時のコンフリクト解決 (onto 92635da, 元コミット 119f95fdaa6):
- 上流 openclaw#143905/openclaw#147242 で safe RPC restart 分岐に
  assertGatewayServiceFallbackAllowed("safe RPC restart") が追加された。
  本コミットは safe 分岐を external-supervisor 判定より前へ移し暗黙 safe 判定を
  足しているため、移動先の分岐に上流のガードを取り込み、旧位置の重複分岐は削除
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Nov 10, 2026
rebase 時のコンフリクト解決 (onto 92635da, 元コミット 119f95fdaa6):
- 上流 openclaw#143905/openclaw#147242 で safe RPC restart 分岐に
  assertGatewayServiceFallbackAllowed("safe RPC restart") が追加された。
  本コミットは safe 分岐を external-supervisor 判定より前へ移し暗黙 safe 判定を
  足しているため、移動先の分岐に上流のガードを取り込み、旧位置の重複分岐は削除

rebase 時のコンフリクト解決 (onto 57fd13e, 元コミット 21f40bf994c):
- 上流 8b680f3 (openclaw#178163) が createSafeGatewayRestartPreflight の
  inspectors 引数と SafeRestartInspectors 型を削除。引数なしの形に合わせ、
  session admission / mutation を 0 に固定するスタブだけを外して実数で数える
- 上流 c268b9d (openclaw#181608) が SafeRestartTarget 型を引数へインライン化。
  インライン型のまま transport 引数を追加
- 上流がテストを describe なしのトップレベル it と、実モジュールの spy による
  カウンタ差し替えに書き直したため、両テストファイルは上流版を基に
  本コミットのケースを追加。restart-coordinator.test.ts は
  session-controller.lifecycle.js を spy して admitted turn を 1 件にする

rebase 時の調整 (onto 258d034, 元コミット 76c4af4b6cc):
- restart-suspension.test.ts: 上流 36e277d (openclaw#175837) が
  session-lifecycle-admission.js を session controller へ統合して削除し、
  上流 f27df1d (openclaw#165330) が scheduleGatewayRestart の skipCooldown を
  削除していた。どちらも前回のベース (57fd13e) より前の変更で、
  このファイルは読み込みに失敗し上流分を含む全テストが動いていなかった。
  後継の beginSessionEffect / getSessionControllerWorkCount
  (session-controller.lifecycle.js) へ置き換え、skipCooldown を外した。
  クールダウンは直前に再起動を発信した場合だけ掛かるため、外しても挙動は同じ

rebase 時のコンフリクト解決 (onto 638a185, 元コミット a06162363f5):
- 上流が lifecycle-safe-restart.ts に restartFlagConflictError / assertNativeRestartFlags
  を追加し、runDaemonRestart の冒頭で呼ぶ形にした (--preserve-definition と --safe、
  --skip-deferral の組み合わせ検査)。上流の2関数と呼び出しを残したまま
  shouldUseImplicitSafeRestart と requestSafeGatewayRestartIfNeeded の呼び出しを
  その直後に並べた (フラグ検査 → 暗黙 safe 判定 → external-supervisor の順)。
  旧位置の `if (opts.safe)` 分岐は本コミットが既に削除済みで、重複は残っていない。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant