Repository navigation
feat: capture explicit repository disk snapshots - #189263
Conversation
Persist immutable provider receipts through the existing environment writer before setup and enrollment. Reuse them for recovery, inspection, and confirmed exact-resource teardown. Retained allocation, pause/resume, and disk-authoritative workspaces remain inactive. Related: #188796. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 79a28e77-6a76-4cd6-bd81-e44cc99064b5
Resolve the package metadata conflict by preserving this prerequisite state schema 37 and current main agent schema 39. Receipt behavior is unchanged; canonical schema generators and all 10 receipt store/migration tests pass after integration. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: fea66917-e69b-4777-b127-03eb548d7c89
Keep the historical migration expectation values unchanged while satisfying no-shadow. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 147bd311-a32a-4cc1-a4c2-116b71affb91
Preserve receipt custody through provisioning failure, select the complete placement row, align PostgreSQL additive column positions, and update schema-bound consumers and regression fixtures. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: aa6ef0fc-2c5f-4e21-94bc-6ead8b0adea2
Persist exact repository disk identity and accepted pending-result authority in shared state v38. Keep mirrored results unchanged, hold missing or replaced disks, and refuse stale file, publication, and materialization fallbacks. Disk mode remains inactive until explicit I/O and lifecycle support follows. Co-authored-by: galiniliev <[email protected]>
Declare shared-state schema 38 in package admission metadata, include the exact migrated tables in historical scope proofs, preserve canonical test ordering, and close the trusted PR wrapper import inventory. Co-authored-by: galiniliev <[email protected]>
Rebuild the empty pending-result table alongside worker receipts and preserve incoming foreign keys from installed lazy fragments when restoring historical test schemas. Co-authored-by: galiniliev <[email protected]>
Compose legacy schema transformations in canonical order, preserve installed PostgreSQL foreign keys in historical fixtures, and settle confirmed deletion after shutdown aborts new effects. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 1cb5a42a-b4a8-43a9-8242-1e75244865d8
Preserve the v38 predecessor schema and installed foreign-key repairs while incorporating confirmed provider teardown settlement from the published prerequisite. Co-authored-by: galiniliev <[email protected]>
Integrate main 64daa25 to repair the actual provider-lifecycle conflict. Keep the receipt-owned SSH bootstrap extraction and the incoming destructured clock default. Shared-state schema remains 37. Affected receipt, image-intent, teardown-drain, and migration tests: 18 passed; targeted Gateway typing and lifecycle lint passed. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c1df24cc-0977-428a-bfbc-8ba8a983218b
The published prerequisite now owns five lines previously counted in this child. Reduce the child allocation to its measured 628-line delta. Co-authored-by: galiniliev <[email protected]>
Keep exact-disk editor writes on the retained owner. Freeze explicit publication captures under durable request refs, and prepare fresh Git-preserving exports without stale mirror fallback. Disk mode and final Move lifecycle remain inactive. Co-authored-by: galiniliev <[email protected]>
|
🦞👀 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 changesThis PR adds exact-disk editing, immutable publication captures, and fresh Git-preserving export preparation while keeping disk mode disabled. Example: A publication captures publish.txt containing “frozen disk bytes”, loses the receipt-binding reply, and retries after another edit.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open as a useful, maintainer-directed prerequisite; no actionable introduced defect was found, and its dependent landing order remains explicit. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherGateway repository consumers coordinate session and placement authority, use the original node for current bytes, and retain immutable Git artifacts for publication or local worktree preparation. flowchart LR
A[Repository request] --> B[Session and placement authority]
B --> C[Exact attached node]
C --> D[Quiescence and capture]
D --> E[Immutable Git artifacts]
E --> F[Publication receipt]
E --> G[Gateway worktree preparation]
Technical reviewBest possible solution: Land this bounded consumer slice after its authority prerequisite, preserving disabled activation until the separate lifecycle and upgrade qualification is complete. Do we have a high-confidence way to reproduce the issue? This is an inactive feature prerequisite; inspected source and supplied real-owner traces establish its scenarios, but no target code was run during this read-only review. Is this the best way to solve the issue? The change uses the existing repository, checkpoint, placement, transport, and receipt owners; the shared capture helper is justified by publication and export having the same exact-disk capture invariant. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 298b86c81fa0. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +345, Tests +1403, Docs +20, Other +4. Total +1772 across 30 files. Added test files: 3. View PR surface stats
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 HistoryReviewed October 31, 2026, 8:26 AM ET / 12:26 UTC (Revision 3). |
Baseline-Refresh: 83475ff7b8d187add499b99ad483180c4b75548a Co-authored-by: galiniliev <[email protected]>
Replay the reviewed checkpoint-reuse regression on the original hosted S6 ancestry and actual landed main without importing unsigned prerequisite history. Reuse one checkpoint-ref owner for fresh, accepted and retained captures; atomically retain later queued aliases and companions under current authority without recapturing changed disk bytes or advancing accepted state. Co-authored-by: galiniliev <[email protected]>
Preserve the exact revocation assertion while satisfying the hosted curly rule. Account for the two required brace lines in this regression allocation; keep the shared budget unchanged. Co-authored-by: galiniliev <[email protected]>
|
Merged via squash.
|
* feat(workers): bind cleanup to recorded cloud resources Persist immutable provider receipts through the existing environment writer before setup and enrollment. Reuse them for recovery, inspection, and confirmed exact-resource teardown. Retained allocation, pause/resume, and disk-authoritative workspaces remain inactive. Related: openclaw#188796. Co-authored-by: galiniliev <[email protected]> * feat(workers): bind cleanup to recorded cloud resources Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 79a28e77-6a76-4cd6-bd81-e44cc99064b5 * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: fea66917-e69b-4777-b127-03eb548d7c89 * test(state): avoid shadowing the migration fixture path import Keep the historical migration expectation values unchanged while satisfying no-shadow. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 147bd311-a32a-4cc1-a4c2-116b71affb91 * fix(workers): complete resource receipt consumers and migration parity Preserve receipt custody through provisioning failure, select the complete placement row, align PostgreSQL additive column positions, and update schema-bound consumers and regression fixtures. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: aa6ef0fc-2c5f-4e21-94bc-6ead8b0adea2 * feat: retain repository disk authority through recovery Persist exact repository disk identity and accepted pending-result authority in shared state v38. Keep mirrored results unchanged, hold missing or replaced disks, and refuse stale file, publication, and materialization fallbacks. Disk mode remains inactive until explicit I/O and lifecycle support follows. Co-authored-by: galiniliev <[email protected]> * fix: complete disk authority migration consumers Declare shared-state schema 38 in package admission metadata, include the exact migrated tables in historical scope proofs, preserve canonical test ordering, and close the trusted PR wrapper import inventory. Co-authored-by: galiniliev <[email protected]> * test: preserve exact PostgreSQL disk authority predecessors Rebuild the empty pending-result table alongside worker receipts and preserve incoming foreign keys from installed lazy fragments when restoring historical test schemas. Co-authored-by: galiniliev <[email protected]> * fix(workers): retain teardown settlement and predecessor contracts Compose legacy schema transformations in canonical order, preserve installed PostgreSQL foreign keys in historical fixtures, and settle confirmed deletion after shutdown aborts new effects. Co-authored-by: galiniliev <[email protected]> * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 1cb5a42a-b4a8-43a9-8242-1e75244865d8 * Publish openclaw/s4-retained-session-disk Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: c1df24cc-0977-428a-bfbc-8ba8a983218b * test: align disk authority allocation with repaired prerequisite The published prerequisite now owns five lines previously counted in this child. Reduce the child allocation to its measured 628-line delta. Co-authored-by: galiniliev <[email protected]> * feat: capture explicit repository disk snapshots Keep exact-disk editor writes on the retained owner. Freeze explicit publication captures under durable request refs, and prepare fresh Git-preserving exports without stale mirror fallback. Disk mode and final Move lifecycle remain inactive. Co-authored-by: galiniliev <[email protected]> * test: preserve complete runtime refusal diagnostics Keep exact update-admission expectations aligned with the canonical updater and PATH diagnostic suffix, without relaxing no-effect assertions. Co-authored-by: galiniliev <[email protected]> * test: qualify exact disk capture at native effects Replace mock admission cases with the real environment, node transport, upload, and Git publication owners. Preserve allowed and rejected effects plus quiescence cleanup across revocation. Co-authored-by: galiniliev <[email protected]> * fix(workers): preserve queued aliases when reusing disk captures Replay the reviewed checkpoint-reuse regression on the original hosted S6 ancestry and actual landed main without importing unsigned prerequisite history. Reuse one checkpoint-ref owner for fresh, accepted and retained captures; atomically retain later queued aliases and companions under current authority without recapturing changed disk bytes or advancing accepted state. Co-authored-by: galiniliev <[email protected]> * style(test): brace retained capture authority check Preserve the exact revocation assertion while satisfying the hosted curly rule. Account for the two required brace lines in this regression allocation; keep the shared budget unchanged. Co-authored-by: galiniliev <[email protected]> --------- Co-authored-by: galiniliev <[email protected]>
What Problem This Solves
Explicit repository file access, publication and export must use the original attached disk—not an older Gateway mirror. Publication retries must preserve selected bytes and include requests queued after a lost receipt-binding reply.
Prerequisite #189106 landed as
7faf32da36cdb6f6021e662f92cbd9c1de783255; GitHub automatically retargeted this existing PR to main. No replacement PR or early retarget.User Impact
Disk mode remains unselectable. Mirrored sessions and ordinary turns retain their behavior. This implements explicit current-disk I/O and snapshot preparation, not full retained-disk activation. No schema, public protocol, product configuration, cloud allocation or deployment is added.
Solution and Scope
Existing repository/checkpoint, placement, workspace-operation, transport and receipt owners retain their responsibilities. No parallel manager, queue, cache or state store. Authority is checked at the final effect; cleanup custody survives revocation.
Against captured main
c2a39e4c5a8166d1f5ea6703d1dfaa7d7c45de79: 34 files, +2,106/-129. Production remains 19 files, +527/-123 (net +404); the latest correction changes no production code. Tests/helpers: nine files +1,550/-6; docs +20; four allocation records +8; inventory +1. The 65-line checkpoint-ref leaf was extracted after a real 700-line owner-budget failure, without an exception. The review repair contributed production +97/-33 (net +64) and one boundary regression, now allocated exactly 92 lines after required braces. The existing 50-line accepted-reuse allocation and shared scalar remain unchanged.Current Candidate and CI Repair
Head
6e669f1d0a24b07f65e7c3e42924c239efadf888, tree34760b3be1416d4a2ab7e4df1323062d2b941646. This is a signed descendant of reviewed implementationfcd45d9ba30e8fd1f878e3d29fbc2cc4a0d36b3a; its only delta is required braces around the unchanged revocation assertion and the corresponding two-line test-allocation adjustment (two files, +4/-2).CI 41272536469, attempt 1 on
fcd45completed FAILURE: 67 successful, 25 skipped, two failed jobs. The lint leaf reportedeslint(curly)atrepository-workspace-snapshot.test.ts:152; the other failure was downstreamopenclaw/ci-gate. A bounded job-tail read recovered the diagnostic missing from the earlier cached log. This was PR-authored, not inherited or flaky.The same maintained CI-mode lint owner and
config/tsconfig/oxlint.core.jsonreproduced the exact error red, then passed green with zero warnings/errors after adding braces. The condition and thrown error are identical; no assertion was weakened. Canonical format/whitespace and exact ratchet 6,368,190 ≤ 6,386,775 passed. The CI-failure planner found no Vitest failures to rerun. The 78-case runtime proof and complete source review below are reused only for unchanged behavior, not claimed as a fresh runtime execution. The pending auto-merge request was retired through native recovery before changing the head. Current-head CI remains required; the failed run is retained, not rerun or waived.Implementation Qualification
Native signed baseline
92aad389fbb6a3c2344848a80efaa7ecb3ccd820has original hosted0dd64a1064ea2eb0df0ff776517934abcc816e75and actual mainc2a39e4c…as parents. All new task commits verify signed and retain Galin credit; the hosted head remains an ancestor. Earlier unpublished preparation imported an unsigned prerequisite marker and was correctly refused before push. Its source/receipts remain preserved. The replacement preparation excludes that side ancestry without changing signature protection, using an unsigned override, rewriting hosted history or re-signing somebody else's commit.bc88dded7db43a74033a95d0b34201355ba81b61). Native conflict resolutions preserve landed recovery and exact canonical generated blobs. Source equivalence is distinct from execution.Historical Evidence and Nonpasses
33fd93f3…: 56 cases/four files passed in 335.20s, static gates and complete 32-path P0–P3 review clean.5eaea8e7…: seven native capture cases passed in 73.38s with typing/ratchet/whitespace. Historical source-scoped evidence only.0dd64a10…: 79 refreshed I/O/context/startup cases passed; CI 41198174787 was green for that head. Hosted review reported no findings/before-merge items; advisory only. Its 18 real capture/cleanup cases passed in 154.73s with static checks and independent review. Separate 431-line allocation accompanies the original 971-line allocation. Negative admission/final-input controls refuse effects while preserving cleanup; allowed control retains selected/alias refs and companions.101f2bbf…: 80 owner cases/four files passed (144.93s Vitest / 147.18s wrapper), plus 11 cleanup/recovery and 12 quiescence cases. Editor mirrored-acceptance and retry without remembered turn context were reproduced red, then repaired. Types, lint, format/line budgets/docs links/whitespace and final independent review passed.06079b6e…. Execution: 2 failed/27 passed; startup subsets: 1 failed/3 passed/8 unselected. No weakening, skipped failures, rerun or passing replay labeled a repair. Later upstream fixes and prior-head green remain separate evidence.Limits
Synthetic local production-path fixtures—not real cloud retention, live-model disk turns, authenticated remote GitHub publication or paused wake. Prerequisite
4484installed-v38 stable-upgrade proof is complete in #189106: synthetic legacy rows in the genuine release, preserved NULL/mirrored semantics, cold serving identity/readiness and cleanup. It closes that prerequisite's old installed-upgrade gap only, not full disk-feature or later-package acceptance. Release, deployment and controller adoption holds remain.Contributed by @galiniliev.
Work sessions