Repository navigation
fix(config): keep last-known-good when the observer flags the config as truncated - #152565
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesPrevent suspicious configuration truncations from replacing healthy recovery backups while preserving intentional edits and rollback. Example: A healthy configuration with 70 trusted proxies is externally replaced by a 41-byte gateway stub.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR fixes a current configuration-loss bug, and the previous review blockers are resolved; the remaining failed CI assertion independently matches another PR. Priority: P0 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherConfig I/O observes on-disk configuration, records health fingerprints through the existing database worker, and supplies recovery backups to Gateway startup, reload, and Doctor. flowchart TD
A[Config file] --> B[Config I O owner]
B --> C[Health worker]
C --> D[Suspicion check]
B --> D
D --> E[Last known good backup]
E --> F[Gateway and Doctor recovery]
Technical reviewBest possible solution: Land the shared promotion guard and existing-owner baseline compensation once CI admission is resolved. Do we have a high-confidence way to reproduce the issue? Current-main source shows the unguarded overwrite, and the linked issue supplies a concrete healthy-config-to-stub reproduction; no target code was executed during this read-only review. Is this the best way to solve the issue? The fix belongs in the shared promotion owner; accepted-write baseline advancement and conditional compensation are necessary to preserve intentional reductions and failed-activation rollback. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 71a8363f9606. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +358, Tests +973, Docs +11, Other +1. Total +1343 across 18 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (25 earlier review cycles; latest 8 shown)
Reviewed October 22, 2026, 12:27 AM ET / 04:27 UTC (Revision 26). |
1a75103 to
5432b70
Compare
|
Follow-up for the review finding "[P1] Preserve promotion after explicitly permitted size reductions" — addressed in 3cacef5. What changed: when the config owner accepts a write that was explicitly permitted to shrink the config ( Where: Regression coverage (
Local verification on this head: full |
3cacef5 to
0df8ba9
Compare
|
Follow-up for the "[P1] Preserve promotion after accepted formatting reductions" finding and the CI failures ( Formatting-reduction fix: the baseline advance no longer requires Regression coverage for the requested scenario: CI failure root causes fixed:
Data-model compatibility: no schema change — the health state keeps using the existing Local verification on 299139b: |
299139b to
293baac
Compare
|
CI failure root cause (checks-node-compact-large-9 / core-unit-src-security-3): the three Verified locally: the same 4-file combination (skills/lifecycle/install + system-agent/chat-wizard-host + state/openclaw-database-maintenance + sessions/session-lifecycle-diagnostics, single worker, matching CI's Node 24.19.0 and shard env) fails identically at this PR's previous base 506c655 without any of this PR's commits, and passes on current main (which contains #152826). Fix: rebased onto current main (febdf18) — rebase was clean, no source conflicts. Post-rebase verification: the previously failing interference combination passes (69/69), |
Carry inherited input loss through the existing hash-bound health marker so accepted writes, later observations, and promotion cannot bless it. Retain healthy reductions and restore owned anomaly markers on rollback. Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review Current head: 1874fd0. Repaired the metadata-only accepted-write P1 by carrying inherited input anomalies in the existing hash-bound health marker through stamping, later reads and promotion, with rollback compensation. The exact regression is red on the parent and green with the repair; 202 affected tests and scoped checks pass, and independent review has no actionable P0–P2 findings. Body and branch are current. Qualification remains partial: source CLI preserves the healthy backup across ordinary edit and restart and logs Doctor restoration, but Doctor later exits1 at a credential/database identity refusal. A fixture-only continuation is investigating without bypassing that gate. Latest-stable upgrade remains approval-blocked. No full Doctor-success, current-head green-CI, credential exception or upgrade claim. |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Final source-CLI qualification: passed on unchanged head 1874fd0. One wholly synthetic private fixture completes healthy Gateway boot, metadata-only truncation/promotion refusal, ordinary CLI edit, a new Gateway process and full Doctor --fix --non-interactive with exit 0. All original fields survive and the healthy recovery backup is byte-exact. Earlier copied-fixture identity and build-lock harness failures were diagnosed; normal provisioning and ownership inspection resolved them without weakening guards. Existing 202 tests/review/CI were reused, not rerun; no source/commit change. Body is current. The actual latest-stable installation-upgrade/compatibility gap remains explicitly approval-blocked. |
|
🦞👀 Re-review progress:
|
|
Upgrade qualification completed for both remaining before-merge items — actual latest-stable v2026.10.5 released installation upgraded to this candidate ( Acquisition: 1) Released installation establishes the upgrade baseline 2) Upgrade to the candidate: existing stored data loads and works The migration was purely additive (diff vs the pre-upgrade snapshot adds only 3) Truncation cannot poison the upgraded installation's recovery bytes 4) Data-model compatibility (the second before-merge item) After all candidate writes, The PR body's Evidence section has been updated accordingly. Raw logs and pre/post snapshots are archived locally; everything above is copy-pasted from the actual runs (the only redaction is path/ellipsis shortening). |
|
@clawsweeper re-review Original contributor @LiuwqGit has supplied the remaining released-install upgrade and health-state compatibility evidence in #152565 (comment) and updated the PR body. The head remains 1874fd0. The supplied transcript identifies the public v2026.10.5 installation, takeover by the exact candidate using the same synthetic state directory, normal Doctor migration, healthy Gateway startup, and recovery with settings and healthy backup bytes preserved. Please assess this new evidence against the two remaining upgrade/compatibility items. These are attributed contributor observations, not a new execution by this reviewer. The existing separately qualified sub-512-byte metadata-only edit/restart/Doctor flow and exact-head CI remain unchanged. No source, tests, or commit was replayed for this request. |
|
🦞👀 Re-review progress:
|
Preserve the guarded promotion owner and inherited anomaly protection while integrating pinned main JSON5 parsing. Keep authored JSON5 backup bytes covered through existing recovery boundary tests. Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review Current head 6c35cfe resolves the new recovery-parser conflict with pinned main3282fda, preserving contributor ancestry, guarded promotion and inherited anomaly protection alongside main's direct JSON5 parser/private-dependency narrowing. Existing tests now verify authored JSON5 backup bytes and the promotion fixture uses the narrowed real type; no new test cases or production control flow. The body records 75 affected tests passing, scoped types/lint/format, complete-context independent integration review, and an ordinary secretless Git commit with the normal hook. Interrupted execution receipts/setup errors are disclosed; original202-test/CLI/released-install upgrade evidence retains its original1874 revision scope and was not broadly replayed. New-head CI39699025060 is running. Credit, Work sessions and exact published body/head have been verified. |
|
🦞👀 Re-review progress:
|
|
Addressed in e0a636a. The existing health owner returns applied/conflict/unavailable, both successful-write verification reads are removed, and only confirmed CAS conflicts retry. Failed reads, failed writes and lost replies do not retry. No schema, persistent fields, store, retention or permission changes. Parent inspected the full delta, original-contributor ancestry, red/green receipts, ordinary commit hook and independent review. All 47 owner cases are covered across retained passing receipts (46 + corrected rollback), plus seven affected consumer cases. The rollback count is independently red on base (7) and green on the fix (5); accepted writes require two reads instead of three. New-head CI/review are tracked separately in the PR body. Architecture review follow-up: simplify health-write settlementReviewed head: The backup-protection invariant is correct: promotion must not replace healthy recovery bytes with an observer-flagged truncation. An ordinary edit/metadata stamp must not erase evidence of earlier loss. Keep baseline capture, the hash-bound inherited-anomaly marker, conditional updates, and candidate-specific rollback compensation. Requested cleanup: remove redundant read-after-write verification from advance and rollback. The comment claiming the worker provides no conditional-write receipt is inaccurate: the health adapter receives Expose an explicit applied / conflict / unavailable-or-unknown outcome through that owner. Stop on confirmed application; refresh and reconsider only after a definite conditional conflict. Do not collapse failed reads, unavailable admission, or uncertain writes into a retriable conflict. Preserve newer-baseline/anomaly decisions and the existing warning/error policy. This is an architecture/work-count finding, not a newly reproduced data-loss regression. Existing tests cover promotion, intentional reductions, metadata-only truncation, and rollback, but do not demonstrate a need to verify every successful write by rereading. Focused proof should cover actual CAS conflict versus unavailable/unknown outcomes, and no extra verification read after success. Persisted-state scope: necessary behavior uses existing Current-head green CI and ClawSweeper findings-none remain valid observations, but do not negate this later architecture review. No source or live state was changed by this review. |
Carry the health worker's applied/conflict/unavailable outcome through accepted-write baseline advancement and rollback. Trust acknowledged writes and only reconsider definite comparison conflicts within the existing bound. Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review Current head e0a636a implements the later architecture finding: consume the existing worker conditional-write result, stop after applied, and refresh/retry only definite conflicts. It removes both verification-read branches without schema/state growth; unknown outcomes do not replay. Body records real-owner RED/GREEN proof, 47 owner cases across retained receipts plus seven selected consumers, scoped static gates, fresh complete-context independent review, normal secretless commit hook and exact source binding. Previous 6c35 CI and prior CLI/upgrade evidence retain their original scope. Contributor ancestry/credit and Work sessions preserved; parent verified actual publication and body. Please review this new head and evidence. |
|
🦞👀 Re-review progress:
|
Preserve the captured health owner result in the Doctor freshness fixture so its override satisfies the explicit write-outcome contract. Co-authored-by: RomneyDa <[email protected]>
Remove the self-derived fingerprint-key assertion and historical upgrade claims from the synthetic stored-row continuity case. Preserve promotion, truncation, schema-column, and baseline compensation checks. Co-authored-by: RomneyDa <[email protected]>
|
@clawsweeper re-review Current head 503add5 addresses the previous review: the failed commands-doctor type leaf was PR-caused, reproduced red on e0a636a, and passes after returning the actual owner result (d6b4ea3); all seven affected tests pass. The self-derived fingerprint-key assertion and unsupported historical-shape claims are removed; meaningful stored-row promotion/truncation/compensation/schema checks remain and the affected case passes. Matching type leaves, targeted lint/format, normal commit hooks, and cleanup receipts are linked in the updated body. No production/state changes or replay of settled broad/upgrade proof. Original contributor credit, ancestry, and Work sessions are preserved. |
|
🦞👀 Re-review progress:
|
Closes #152509
Original implementation and regression coverage: @LiuwqGit, preserved in the existing PR ancestry. Current-main integration and additional qualification continued in the linked sessions.
Work sessions
Original discussion
Implementation and verification
Recovery conflict implementation and verification
Health-write outcome implementation and verification
What Problem This Solves
Fixes: a parseable external truncation of
openclaw.jsoncan replace the healthy recovery backup during Gateway startup or reload, causing Doctor to restore the truncated configuration instead of the operator’s settings.User Impact
User impact: suspicious external truncations no longer overwrite the healthy recovery copy, including after an ordinary accepted edit of an already-truncated file. Intentional accepted edits from healthy input, including formatting-only reductions, remain recoverable. No new settings, schema changes, or migration are introduced.
Why This Change Was Made
Promotion reuses the observer’s suspicion predicate before publishing recovery bytes. Accepted writes advance the existing worker-backed health baseline, and failed runtime activation conditionally restores the pre-publication baseline. The baseline owner now also checks the write’s input snapshot: a permitted edit is not permission to bless a suspicious reduction that happened earlier. Rollback compensation is retained even when the baseline cannot advance.
The current-main integration preserves database-free writes, current source guards and rejection diagnostics. Existing promotion/rejection splits satisfy line budgets; there is no new recovery/state owner or persisted format. The earlier metadata-only anomaly repair added the input-snapshot guard and its regression. The latest cleanup consumes the existing health worker’s applied/conflict/unavailable result instead of rereading successful writes. Only confirmed conditional conflicts retry; unknown outcomes do not replay bookkeeping.
Evidence
Doctor consumer repair and test cleanup (October 22)
Current head:
503add5d6248de636fed75183c7db61e5500ef3c; tree024eb0b9c9f7dc49a9f8812583e7d9def88f84b3. Two ordinary fast-forward commits preserve e0a636a and the original contributor ancestry. No production, schema, state, or persistence changes in this follow-up.The failed commands-doctor type leaf was PR-caused: one Doctor test wrapper discarded the new owner's return value. d6b4ea3 returns the actual updateAfterFileCommit result without casts, suppression, or weakening assertions/race injection. The same leaf reproduced TS2345 on e0a636a (exit 2, 13 s) and passed with the repair (14 s); all seven affected Doctor tests passed (48 s wall), targeted lint had zero warnings/errors, and format/diff checks passed. A repository-wide override audit found no other discarded-result override. Fresh independent P0–P3 scoped review found no actionable issue. RED receipt · GREEN and normal-hook receipt.
503add5 also addresses the review's low-value-test note: it removes the self-derived fingerprint-key SQL comparison and describes the synthetic case as stored-row continuity, not historical upgrade proof. The promotion, truncation, compensation, and explicit schema-column assertions remain. That single affected case passed (496 ms test time / 42 s wall; 14 other cases unselected), matching config-cli types passed (16 s), and targeted lint, format, and diff checks passed. Cleanup proof and normal-hook receipt.
Both commits were created normally with the canonical Git hook on secretless AWS runners and imported unchanged; parent/tree, raw commit digests, author, and human co-author trailers were verified. Runners are released with cleanup complete. Settled owner suites, Doctor proof, and actual released-install upgrade evidence were retained at their original revisions—not replayed or relabeled. The small deletion/wording follow-up received source inspection rather than another full review.
Current-head CI and review (503add5): the exact-head review, completed 2026-10-22T04:27:28.368Z, accepts both follow-ups and retained product/upgrade proof: Before merge: None; Findings: None; ready for maintainer review. CI 39721647047 is nevertheless failed, not green: all 82 jobs are terminal (51 successes, 29 skips, one source-test failure plus its downstream aggregate-gate failure). The previously failing commands-doctor type job now passes.
The sole source failure is the tooling owner-plan assertion for operator-authority.test-support.ts: it expected no extra owner files but selected src/auto-reply/reply/commands-plugin.native-subagents.test.ts. That same file and assertion independently fail on PR #180279's job, inspected directly rather than inferred from review text.
Attribution: this CI tested merge 95207cadfb6a921e10e3dd5a494c366a638b3747, with base 87feb0f and PR parent 503add5. The unexpected native-subagents test directly imports the operator-authority fixture and was added to ancestral main by #180173 (7ba05b6). The failing expectation omits that consumer. The assertion, planner, inventory, consumer/helper, Vitest configuration, and dependency inputs are unchanged between the tested base and this merge; this PR's added files are config-owned and do not create that direct importer. This is source-derived inherited-failure attribution plus a matching independent PR execution, not a separately executed exact-base replay or a passing CI claim. No CI rerun, main refresh, test suppression, or unrelated repair was performed. This evidence-only update changes no source or behavior-proof input; no duplicate review request is needed.
Health-write outcome cleanup (October 22)
Previous head: e0a636a; tree 882871e7ee3a66d75aaba5e6f8b1a3d21a5c4d60. This is a normal fast-forward commit over 6c35cfe, preserving @LiuwqGit’s original implementation and ancestry.
Addresses the architecture finding: the existing health owner now returns applied / conflict / unavailable. Successful writes stop immediately. Only an actual conditional-write conflict refreshes and retries within the existing four-attempt bound; failed reads and uncertain writes stop with the existing warning/error policy. Both post-write verification-read branches are removed. Pre-publication capture, newer-baseline/anomaly decisions, hash-bound inherited loss and candidate-specific rollback compensation remain.
Persisted state: no schema, table, field, store, migration, retention, durability or permission change. Existing health state and backup bytes retain their owners. This cleanup reduces production code by two lines; it does not add another state mechanism.
Changed-path proof: secretless AWS Linux runner, Node 24.21.0 / pnpm 12.12.1, isolated HOME, repository-owned test/static wrappers. Ten selected regressions fail on unchanged base production. The two owning test files then supply 46 passing cases; an incorrect rollback work-count expectation was corrected and separately proved red on base (7 reads) and green on the fix (5 reads), covering all 47 owner cases across retained receipts—not a later single all-green run. Seven selected recovery/async-load consumer cases also pass. Successful accepted writes now perform two health reads (capture + transition) rather than three; a real intervening observation yields conflict then applied; failed read, failed write and lost reply cases do not retry. Existing backup-promotion and rollback assertions remain in the exercised owner flow.
Matching config-cli types, five-file lint (zero errors/warnings), six-file format, and diff checks pass. The broad changed-path compiler planner selected unrelated graphs and hit existing root-budget limits; it was stopped, and the matching config leaf passed directly. No broad compiler success is claimed. An introduced test-parameter shadowing error was corrected before the final static gates.
Fresh independent complete-context review of the local delta completed with no actionable findings; the sole subsequent change was that mechanical test-parameter rename. pr-simplify completed. The canonical pre-commit hook passed during an ordinary secretless Git commit; the commit was imported byte-for-byte and its object checksum, tree, parent, author and required human co-author trailer were independently verified. Both proof runners are released.
Proof: base RED, owning-file results, corrected rollback RED/GREEN and affected consumers, final static gates and ordinary commit.
Historical e0a636a CI and review: CI 39718795893 failed on the PR-caused Doctor wrapper return mismatch, with a downstream aggregate-gate failure. ClawSweeper accepted the architecture cleanup and retained product proof, found no production-code defect, and requested CI attribution plus the redundant-test cleanup. Both are addressed in the follow-up above. Green 6c35 CI/review and prior real CLI/released-install upgrade runs retain their original revision scope.
Recovery-parser conflict integration (October 22)
Previous head
6c35cfeeb2e329e0ead8ecf17fbae2a0fdbdbe5c(tree5bc3802a11406efe442d8ff4bc76f5499527cec7) preserves published1874fd0794c545123ab0ec915fb54b72e37f6bb6as first parent and integrates pinned main3282fda7943c9fdd7a6778289521cbfc1bd048dbas second parent. Main's #179952 narrowed the private recovery dependencies and switched backup parsing to the imported JSON5 owner, causing a reproduced conflict inio.observe-recovery.ts. This is an actual conflict repair, not a refresh merely for main drift. Original @LiuwqGit ancestry remains intact.The resolution keeps main's direct JSON5 parser and all three updated parser calls, while retaining this PR's exported dependency type, separate guarded promotion owner, and suspicious-signature input. The promotion fixture drops the retired parser injection and unsafe cast. Existing backup/last-good cases now include authored JSON5 comments/trailing commas and verify exact restored bytes. No new test cases, production control flow, schema, permission, dependency, or public API were added. Other automatic merges remain unchanged.
Changed-input qualification: one secretless AWS runner, Linux x86_64, Node 24.21.0, pnpm 12.12.1, frozen lockfile, isolated HOME and no instance credentials (IAM endpoint 404). Exact source tree was checked before and after validation. Each selected file ran through
pnpm test src/config/<file>.test.ts --maxWorkers=1:io.observe-recoveryio.snapshot.promotionio.factoryio.snapshot.recoveryio.read-helpersAll 75 affected tests passed. Coverage includes JSON5 backup/last-good restoration, promotion refusal after observed truncation and metadata stamping, accepted-write rollback, source guards, prepared recovery, and read/write consumers. Cold worker preparation accounts for about 24–25 seconds of each runtime-config invocation; those durations are not test-body costs.
Seven-file lint reports zero warnings/errors (96 s including SDK preparation); three-file format and diff checks pass. Narrow typecheck passed (2 s) after correcting only the temporary proof config's rootDir and inclusion of canonical ambient declarations. The earlier configuration errors remain setup failures, not product defects or green runs.
pnpm docs:listcompleted. pr-simplify retained one parser and one promotion owner without new scaffolding.Independent complete-context autoreview of the relevant integration completed all three P0/P1 passes with no actionable findings (69.148 s), followed by source verification. An earlier split-context pass disclosed its limitations; the complete-context continuation supersedes that review gap. Unchanged fs-safe and health-store internals were not independently re-reviewed, and no full-PR P2-clean claim is made.
Normal commit and recovery: ordinary Git commit invoked the canonical pre-commit hook inside the real secretless merge and exited 0, preserving the exact tree and both parents. The resulting commit object was imported byte-for-byte into the retained local worktree; contributor code/hooks were not executed on the credentialed host. An initial diagnostic hook attempt rejected stderr trace output; directing the trace to a private file removed that observation interference without weakening the hook. The runner was confirmed destroyed and the worktree is clean. The interrupted attempt's outer execution receipt and workspace were unavailable; no success was inferred from elapsed time. Missing current-tree proof was then completed with retained terminal receipts. Previously settled 202-test, source-CLI, and released-install upgrade proof was not broadly replayed.
Prior-head CI and review (6c35cfe): CI 39699025060 completed successfully on
6c35cfeeb2e329e0ead8ecf17fbae2a0fdbdbe5c: all 83 jobs are terminal, with 54 successes, 29 skips, and zero failures. The aggregate CI gate and applicable dependency/security reviews also passed. The exact-head ClawSweeper review, reviewed at 2026-10-22T00:27:34.806Z, reports Before merge: None; Findings: None; ready for maintainer review. It explicitly accepts reuse of the prior real CLI/upgrade evidence across this parser integration. Its CI-pending wording predates the now-completed run. This CI-status-only body update changes no source or behavior-proof input.Prior
1874fd0CI 39409117521 / gate 39410358141 and its installed upgrade/CLI runs retain their original revision scope. This resolution preserves recovery behavior and uses affected real-owner boundary checks; it does not claim a new full installed upgrade, live-provider turn, or new permissions/migration behavior.Prior-head source-CLI qualification: passed on 1874fd0
The final qualification used unchanged commit
1874fd0794c545123ab0ec915fb54b72e37f6bb6, tree695917732874ab2ff5ca5bd1b017f8f10502f1c4. One wholly synthetic private profile (p0152509qualification) and one fixture were used throughout; no state or credential copies were introduced. The runtime/UI preparation and identity checks remained enabled. This successful run supersedes the earlier incomplete Doctor attempts retained below.The active configuration retained all original fields; byte-exactness was checked for the healthy recovery backup. The final source-CLI path is now qualified, including full Doctor completion—not merely a restoration log before a later refusal. No source/test/review/commit replay was needed: the existing 202 affected tests, scoped checks, independent review and exact-head CI remain their recorded evidence, not new runs.
The earlier copied fixture correctly failed because its credential receipt was bound to the original database path/device/inode; archive extraction changed the inode. The other harness error treated a persistent build-lock container directory as active lock ownership, instead of inspecting its existing owner.json. A correctly provisioned private fixture, normal preparation and three clean shutdowns resolved the setup problems without changing product source, disabling identity checks, hydrating real credentials or bypassing a guard.
Released-install upgrade qualification: passed on unchanged candidate. The previously outstanding actual
2026.10.5installation-to-candidate upgrade is now qualified on head1874fd0794c545123ab0ec915fb54b72e37f6bb6: the public npm release[email protected](1b58cb9) established the settings (gateway mode/port/token, 70 trusted proxies, logging level, update channel), theconfig_health_entrieshealth row, and the byte-exact healthy recovery copy in an isolated synthetic state dir (no real credentials). The candidate build then took over the same state dir: it completed the standard upgrade migration viadoctor --fix --non-interactive(exit 0, purely additive config change, health baseline advanced through the new accepted-write path using the released-build-written row), booted the Gateway healthy, never promoted a 41-byte external truncation stub into the recovery backup, and restored full settings via Doctor (exit 0) with the recovery bytes byte-identical throughout.PRAGMA table_info(config_health_entries)is unchanged — the same five columns the release created, no schema or migration in either direction. Full redacted transcript: follow-up comment on this PR.Released-install upgrade proof fields
Real environment tested: yes — actual public npm release
[email protected](1b58cb9) installed from the registry, then upgraded in place to a local build of head1874fd0794c545123ab0ec915fb54b72e37f6bb6on Linux; isolated synthetic state dir and synthetic token only, no real credentials.Exact steps or commands run after this patch: released CLI
config set/config patchto establish settings → releasedgateway run(health OK) → clean shutdown → candidate--version/config getover the same state → candidategateway run(blocked by the standard client-credential migration admission) → candidatedoctor --fix --non-interactive(exit 0, migration complete) → candidategateway run(health OK, healthy promotion) → clean shutdown → 41-byte parseable truncation stub written externally → candidategateway run(stub never promoted; startup recovery restored settings) → clean shutdown → stub rewritten → candidatedoctor --fix --non-interactive(exit 0, restored from last-known-good).Evidence after fix: redacted terminal transcript (copy-pasted from the actual runs; path shortening only) below.
Observed result after fix: the upgraded installation preserved settings, health state, and healthy recovery bytes end to end; the external truncation stub never replaced the recovery backup at any point (gateway startup or Doctor), and the released-build-written health row loaded and worked under every new code path (observation, promotion, accepted-write baseline advance, Doctor recovery) with no schema change.
What was not tested: an authenticated real-model turn (the checkout stayed secretless); real channel credentials; non-npm distribution formats (native installers, Docker images); EACCES/permission-recovery upgrade paths.
Prior metadata-only anomaly repair: 1874fd0
Current descendant:
1874fd0794c545123ab0ec915fb54b72e37f6bb6(tree695917732874ab2ff5ca5bd1b017f8f10502f1c4), a fast-forward descendant of1febae496e47c6bda828c949da9f6a6f0543966a. The existing hash-bound health marker now carries suspicious input through automatic metadata stamping, later reads and promotion. Consecutive accepted edits preserve the anomaly; rollback restores the writer-owned prior marker. Metadata stamping is not restoration of lost user settings. Healthy intentional reductions remain supported. No new state owner, setting or schema.Earlier partial source-CLI attempt (superseded by the successful qualification above), using isolated synthetic configuration:
Historical setup failures, now resolved: those earlier receipts remain failed attempts, not green runs. The final qualification above uses one correctly provisioned private fixture and completes full Doctor with exit 0, while preserving the identity checks. No product source or passed test/review was replayed.
Prior-head CI completed with a successful CI gate on
1874fd0794c545123ab0ec915fb54b72e37f6bb6(aggregate gate). The fresh ClawSweeper review on that same head reports no actionable code findings; the final source-CLI Doctor gap is now closed by the successful run above. Actual released-install upgrade/compatibility proof is now provided above ("Released-install upgrade qualification"); the earlier limitation no longer applies. Earlier1febae…CI attribution below applies only to that prior head, not to this descendant.a79290962703690187d4375687dce72f9ae75c0e, the production config IO flow (healthy promotion → external truncation retaining metadata/mode → observed anomaly → ordinary accepted port edit → promotion) incorrectly returnedtrueand could poison the backup. With this repair it refuses promotion, preserves the healthy bytes, and later recovery restores them. No mocked owner decisions.7c346d20560f403643ed15cd0a10ee9eda38e594. The earlier P2 is fixed. The temporary-directory alias warning is nonfatal; no host/model/auth-route change or isolation bypass was used.--fix --non-interactiveexited 0, preserved every original configuration field (including 70 trusted proxies), and retained byte-exact healthy recovery bytes in.bak. Doctor added normalmeta.migrations,skillsandwizardfields, so final live JSON is not byte-identical. This native evidence predates the final accepted-write repair; unchanged startup/recovery owners reuse it, while the changed write path has the new red/green production-owner regression.eager-import-closure.test.tsandpr-worktree-provision.test.ts, selected shards 19 + 19 + 16 passed, 1 skipped. The final repair adds no imports or wrapper-closure changes.ce3f47b60a55d9302c70936c680319a039a68eed; those files and the baseline are unchanged. No suppression/baseline exception added.Published candidate: signed author-preserving merge commit
1febae496e47c6bda828c949da9f6a6f0543966a, tree7c346d20560f403643ed15cd0a10ee9eda38e594, parents original contributor headd6910cf27cac610ab1ce31ad6c9d06a618b3d6faand pinned maince3f47b60a55d9302c70936c680319a039a68eed. Existing remote-head CI has 90 successful, 53 skipped and 1 neutral check runs with successfulopenclaw/ci-gate; that is old-head evidence. Fresh CI is required after publication.Gaps: no authenticated real-model turn (contributor checkout stayed secretless); the previously missing latest-stable installation upgrade proof is now provided above ("Released-install upgrade qualification"). No source/credential exception requested or used.
Proof: new regression red, 152 tests and focused gates, documentation checks, prior Gateway restart, prior Doctor recovery.
Prior-head CI attribution (809 matching diagnostics)
On head 1febae4, CI 39398684324 fails only its core production-type leaf (job 118548953798) among the CI build/test checks. The completed job log contains the same 809 compiler diagnostics as independently executed clean main 37e60af and the repaired archive integration. The comparison normalizes only checkout-root paths; every diagnostic and order match. This run's actual merge base is 2e41793, not the executed older main: the compiler configuration, package/lock, offending helper and SDK browser entry are unchanged between those bases. This is signature-based inherited-failure attribution, not a new execution of the newer main.
Main's src/gateway/chat-display-replay.test-support.ts imports Control UI consumers into the Node-only core compiler graph, producing the DOM/JSX errors. This PR does not change that helper or compiler policy. The check remains failed; no rerun, suppression, broad compiler-library change or merge bypass was used. Superseded cancelled context jobs have a later successful context/evidence run.
The metadata-only accepted-write backup-poisoning P1 below the 512-byte size threshold was unresolved on prior head
1febae…; descendant1874fd0…repairs it with the final source-CLI result and remaining upgrade gap recorded above. Inherited CI attribution does not close those qualification gaps.