Repository navigation
fix(doctor): preserve revision checks across successive repairs - #147235
Conversation
Keep include-expanded authored snapshots internal across valid, invalid, and cached config reads. Cover read-scoped root/include responses while preserving the paired internal trees. Defer alias migration helpers and their direct resolved-source API tests to the first consumer layer; preserve existing env-reference entrypoint coverage here.
|
🦞👀 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. |
|
@fuller-stack-dev scoped owner-review handoff: this receipt layer depends on #147120 and supports aniruddhaadak80's final contributor repair in #138040. Signed head: Exact-head CI attempt 1 passed with 115 successful, 16 skipped, zero failed, and zero cancelled jobs; the gate passed at 2026-09-13 18:47:34 UTC: https://github.com/openclaw/openclaw/actions/runs/34774542381/attempts/1. The actual checkout was merge ClawSweeper revision 2 reviewed this exact head at 18:35:04 UTC with no actionable introduced code or security defect. The regression-execution part of its rank-up request is now evidenced; published-updater-by-candidate successive-receipt/migration compatibility and earlier-config/backup preservation remain unproven, alongside inherited native Windows/recovery gaps. The merge hold remains. This is scoped owner review, not merge-ready or end-to-end alias/SDK certification. No merges or merge automation. |
|
Codex review: needs maintainer review before merge. Reviewed September 21, 2026, 12:58 PM ET / 16:58 UTC (Revision 13). ClawSweeper reviewWhat this changesDoctor preserves configuration revisions across successive repairs, stops dependent cleanup after refused writes, and adds regression coverage and test-fixture corrections. Merge readiness✅ Ready for maintainer review This repair remains necessary on current main. No blocking introduced defect was found, and the updated compatibility evidence addresses the previous review’s qualification concern. Priority: P2 Review scores
Verification
How this fits togetherDoctor plans configuration repairs during maintenance and updates. Its configuration writer validates each planned revision before saving changes, then permits dependent cleanup and Gateway service repair. flowchart TD
A[Configuration files] --> B[Doctor repair planning]
B --> C[Planned revision and repairs]
C --> D{Atomic revision check}
D -->|Matches| E[Save changes and backup]
E --> F[Advance revision for next repair]
F --> C
E --> G[Dependent cleanup and service repair]
D -->|Conflict| H[Preserve files and report refusal]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -10, Tests +902. Total +892 across 25 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep successive repairs on the existing atomic writer, advancing revisions only after successful commits and preserving prior files and backups on refusal. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the mechanism: current main stops supplying the planned revision after the initial commit, allowing a later repair to miss intervening edits. The branch contains focused real-file regressions; this review did not execute them. Is this the best way to solve the issue? Yes. Reusing the existing atomic writer’s revision and path checks closes the gap without adding a competing persistence owner or configuration option. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ddcd52d5bffd. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (12 earlier review cycles; latest 8 shown)
|
Merge the verified main baseline while retaining Vincent Koc's original three-commit ancestry. Keep authored capture and public stripping together; retain current-main migration and validation APIs and supplemental privacy tests. Co-authored-by: Vincent Koc <[email protected]>
Merge the verified main baseline while retaining Vincent Koc's original three-commit ancestry. Keep authored capture and public stripping together; retain current-main migration and validation APIs and supplemental privacy tests. Co-authored-by: Vincent Koc <[email protected]>
…policy Preserve contributor ancestry and current-main authorization, deferral, and Windows activation behavior while routing token persistence through the Doctor config owner before service mutation.
Preserve Vincent Koc's original receipt commits and the accepted #147120 stack. Retain planning revisions across successive writes and qualify terminal and deferred cleanup assertions.
Preserve successive-write revision checks and contributor ancestry while composing the qualified receipt layer over the current gateway writer. Reuse the repair prompter fixture without weakening assertions or line caps.
Use the real config snapshot for existing and absent config files and assert the writer result. Preserve disk, metadata, privacy, and no-op assertions.
Preserve contributor ancestry and inherit the landed task-publication and compiler-lifetime repairs from main. Keep maintenance-time service token recovery with the canonical Doctor writer, including refusal settlement and service authority checks.
Preserve the contributor receipt layer and merge the accepted current-main gateway writer. Bind the maintenance fixture to its planned config revision and verify successive writes and refusal retention through its callback.
Keep real service auditing and runtime path classification while making the installation-only fixture independent of the host Node launcher. Cover denied, approved, and noninteractive consent for version-managed runtime drift.
Absorb the reviewed lower consent fixture without changing the receipt layer. Keep generated diagnostic paths readable after identifier redaction and use the atomic phase owner to settle an interrupted fixture PID publication.
Keep the synthetic catalog clock on whole milliseconds so the exact arm interval survives floating-point boundaries. Retain the dispatch fixture clock until accepted work dispatches or responds, scoped to this invocation.
Give each status model test an owned state directory and await its scoped cleanup so retained session-cost workers cannot leak into later suites.
Own default and custom session stores and await scoped cleanup so cached SQLite read scopes cannot leak into later auth-profile suites.
Retain Vincent Koc’s receipt repair and contributor ancestry. Advance the repair baseline only after committed writes; invalidate partial-publication receipts without authorizing dependent cleanup. Integrate current main and bound accepted-dispatch fixture polling with a fail-first regression.
Retain bounded dispatch polling while recognizing the matching request terminal dedupe result when cancellation prevents provider dispatch. Pending acceptance and malformed request keys cannot release the clock.
Cancellation at acceptance must not await dispatch it intentionally prevents. Keep terminal settlement and no-provider-call assertions, and incorporate main's targeted directive-delivery assertion fix (087ccde).
|
Merged via squash.
|
…claw#147235) * fix(config): preserve references across plugin owner migrations * fix(config): keep authored provenance out of config responses Keep include-expanded authored snapshots internal across valid, invalid, and cached config reads. Cover read-scoped root/include responses while preserving the paired internal trees. Defer alias migration helpers and their direct resolved-source API tests to the first consumer layer; preserve existing env-reference entrypoint coverage here. * test(config): invalidate cached provenance fixtures * fix(doctor): honor config write refusals before gateway repair * test(doctor): simplify gateway repair mock arguments * test(doctor): cover update metadata and include refusal * fix(doctor): preserve revision checks across successive repairs * test(doctor): preserve committed repairs after revision drift * test(doctor): assert updater deferral through config writer * test(models): keep native auth refresh fixture passive * test(node): keep prepared workspace fixture owner private Create the fixture owner root with the same private permissions as project preparation so permissive host umasks cannot invalidate transfer tests. * refactor(config): split authored env-reference accounting Move unchanged authored-reference helpers and private snapshot tests into coherent siblings so the provenance change satisfies the line-cap ratchet. * fix(tooling): include authored env helper in PR wrapper archive Keep the extracted wrapper source inventory complete after the config helper extraction; preserve eager-import closure and provisioning guards. * test(doctor): extract gateway writer fixtures for line caps Keep all assertions and coverage while moving coherent gateway assertion helpers and the linked token/writer fixture to sibling test support. * test(doctor): bind persistence fixtures to observed config revisions Use the real config snapshot for existing and absent config files and assert the writer result. Preserve disk, metadata, privacy, and no-op assertions. * test(doctor): isolate installation consent runtime fixture Keep real service auditing and runtime path classification while making the installation-only fixture independent of the host Node launcher. Cover denied, approved, and noninteractive consent for version-managed runtime drift. * test: stabilize catalog clock and accepted agent dispatch Keep the synthetic catalog clock on whole milliseconds so the exact arm interval survives floating-point boundaries. Retain the dispatch fixture clock until accepted work dispatches or responds, scoped to this invocation. * test: drain status model fixture session resources Give each status model test an owned state directory and await its scoped cleanup so retained session-cost workers cannot leak into later suites. * test: scope sandbox workspace authority fixture state Own default and custom session stores and await scoped cleanup so cached SQLite read scopes cannot leak into later auth-profile suites. * test(gateway): observe accepted cancellation settlement Retain bounded dispatch polling while recognizing the matching request terminal dedupe result when cancellation prevents provider dispatch. Pending acceptance and malformed request keys cannot release the clock. --------- Co-authored-by: Jason (Json) <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
Part of #136025 and #145252. Builds on the already-landed #147120.
What Problem This Solves
Doctor must use the preceding committed revision for each successive repair. A refused write must not advance the persistence baseline or authorize dependent cleanup. This preserves the planned receipt even when initial planning has no changes, advances it only after a committed write, and invalidates the active receipt after partial publication while retaining the terminal error. Independent ALS capture/compensation is unchanged.
Current Qualification
Current signed head:
50346e20154c4733a2c59803924f245bac3de105, retaining Vincent Koc's contributor ancestry. Main's targeted directive-delivery assertion fix (087ccde18c30) is included because the exact two CI failures reproduced on clean main before that fix. Both targeted cases now pass.Focused Doctor/receipt and real root/include-file checks (50), backup/write-lock checks (37), readiness coverage, production/gateway types and scoped static checks remain qualified. The affected gateway suite previously passed 376 tests; that did not fix the Linux cancellation CI failure, which remains recorded on the earlier heads. The final narrow correction skips dispatch pumping only for cancellation at acceptance and checks provider-call count after terminal settlement. Both completed/cancelled cases pass, with terminal timeout/provider-not-started/persisted-task assertions preserved. No production cancellation change or timeout increase. API-direct P0–P2 final correction review and typed lint/format pass. Targeted settlement command wall: 33.40s (two outcomes); targeted delivery command wall: 53.48s. Exact-head CI passed: all 148 completed jobs succeeded (run 35627982216). Fresh exact-head ClawSweeper review reported no actionable findings and no before-merge blocker. PR merged on 2026-09-21 at 17:22:47 UTC as
1a7911f56c11ba5c980d598610f34961f35e641e.The
414b8ffdcandidate package built and passed tarball integrity. A fresh isolated Linux/arm64 cell using the unmodified published 9.5 updater installed that exact candidate successfully (exit 0, terminal update status succeeded). All 11,427 published-parent and 12,558 candidate payload files verified. The agent roster migrated, the synthetic token was preserved, and both.bakand.pre-updateretained the original config bytes. Service policy was external with--no-restart; no live Odin state or service was touched. Doctor/config/update/daemon source, package manifest and lockfile are unchanged between that candidate and this successor. This is scoped compatibility evidence, not a claim that the package was built from the successor or exhaustive global no-loss proof.The separate Darwin cell failed before promotion with
existing managed handoff lease is incompatible, leaving config and installed published runtime unchanged. Read-only diagnosis found incompatible foreign retained records; no foreign records were changed and the failed namespace was not retried. Historical process-census/cleanup UNKNOWN is preserved. Observer Promise identity, complete-census entitlement and unrelated full-stack joins are not imposed as own-PR landing prerequisites. Required exact-head GitHub CI and review remain enforced.Release-Note Impact
Doctor keeps revision checks across successive config repairs and refuses stale/partially published revisions without authorizing dependent cleanup.
Preserves Vincent Koc's receipt repair and attribution. The contributor-owned alias repair #138040, cancellation lane, and shared full-chain acceptance remain separate outcomes. No live Odin deployment or restart.