Repository navigation
fix(update): retain immutable release provenance for inspection - #168403
Conversation
Record publication and accepted activation in the existing immutable control store without backfilling legacy releases or enabling collection. Keep v3 adoption gated until a qualified serving bridge advertises compatibility.
|
🦞👀 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 preserves immutable release publication and successful activation evidence in an inspect-only inventory. Example: A compatible version-3 installation prepares generations cccccccccccccccccccccccccccccccccccccccc and dddddddddddddddddddddddddddddddddddddddd.
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 foundation. Matching GitHub annotations resolve the previous CI attribution blocker; no actionable introduced defects remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe immutable updater consumes installation bindings and sealed generations, writes revision-checked SQLite receipts, and exposes release facts through update status. flowchart TD
A[Immutable update CLI] --> B[Existing executor owner]
B --> C[Sealed generation preparation]
C --> D[Immutable control transaction]
E[Successful activation] --> D
D --> F[Release inventory]
F --> G[Update status]
Technical reviewBest possible solution: Retain this inspect-only foundation with the package capability unpublished until the coordinated bridge rollout qualifies. Do we have a high-confidence way to reproduce the issue? Current-main preparation replaces its sole prepared receipt without retaining historical publication rows; this read-only review ran no target code. Is this the best way to solve the issue? The existing control store is the appropriate owner, and transactional inventory avoids directory-name inference or a competing persistence path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ac2c756da388. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +297, Tests +579, Docs +93, Other +8. Total +977 across 21 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 HistoryReviewed October 10, 2026, 8:17 AM ET / 12:17 UTC (Revision 3). |
|
The review's CI-classification item is resolved for the source change. The architecture guard found four typed raw CASE expressions; The other initial CI failures reproduce on unchanged main parent The updated PR body preserves the failed results and the exact reproduction commands. The new head's CI is allowed to finish normally; no CI rerun was requested. Current head CI run 38050053802 reports four |
|
@clawsweeper re-review The current open item is now attributed with matching main evidence. All four failures in Current head is |
|
🦞👀 Re-review progress:
|
|
Merged as The only failing leaf on reviewed head The approved foundation remains inspect-only: no collection, deletion, implicit backfill, published v3 capability, or live adoption was enabled. Remote validation, baseline reproductions, the corrected Kysely guard issue, and production growth are recorded in the PR body. All validation leases were released. |
…claw#168403) * fix(update): retain immutable release provenance for inspection Record publication and accepted activation in the existing immutable control store without backfilling legacy releases or enabling collection. Keep v3 adoption gated until a qualified serving bridge advertises compatibility. * fix(update): infer bounded release inventory query results
What Problem This Solves
Immutable preparation replaces its single prepared-generation receipt, losing historical ownership evidence even though the old release directory remains. Cleanup cannot safely infer ownership from a release name or absence from current references.
User Impact
This adds the approved inspect-only foundation, with no change to existing installations. The optional version-3 descriptor records a three-generation policy and exact SHA/identity pins; its normalized inventory preserves native publication and acceptance evidence. No release, backup, recovery runtime, or snapshot is deleted, and earlier directories are not implicitly backfilled.
Real adoption stays gated. This package deliberately does not advertise
openclaw.immutableInstallDescriptorVersion: 3; the combined descriptor readers and runtime contracts must qualify a bridge before a later change publishes that marker. The futureadopt-immutable --inspect-release-retentionentrypoint refuses before executor metadata is created when the physically installed bridge is unsupported. Ordinary v1/v2 updates remain unchanged.Why This Change Was Made
The existing immutable control store remains the owner. Its
immutable_release_generationstable records SHA, contained path, directory identity, build digest, publication revision, and acceptance revision. Publication and acceptance update the table in the same transaction and revision check as their existing receipts. Moving current/prepared/previous references preserves inventory; failed receipt writes roll back inventory writes. Legacy acceptance never creates a missing inventory row.The stored shape is maintainer-approved (2026-10-10) and documented in the database layout reference. The guarded bridge path upgrades the separately installed launcher only from known v1/v2 bytes before a v3 write. Pending recovery blocks adoption, and subsequent v3 updates reject unsupported candidate/recovery readers before drain. Build isolation (#168237) is integrated through main, retaining its unprivileged builder and root-owned publication boundary. Migration preservation (#168321) adds no persisted descriptor version. The inventory uses descriptor v3 in the same strict schema and control owner; coordination is recorded on #168237. The package capability remains unpublished until the combined bridge and retained readers qualify.
Actual collection, mount-safe removal, recovery-aware deletion and orphaned maintenance-child settlement remain outside this inspect-only change. This foundation adds production code because persistent ownership evidence and reader compatibility did not previously exist; it reuses the original control store, executor, service and launcher owners.
Evidence
Reviewed candidate:
82840d3a829b4fd4fa6544d4f1267a941f1e7111. The final independent review is clean through P2; the source bytes match the remote proof.tbx_01m4j1v0c94esaygx9t1jzcj1m: immutable sibling suites, protocol schema and CLI option tests; rollback, legacy non-backfill, stale revision, identity conflict, accepted versus rolled-back activation, and unsupported-reader refusal covered.The pre-integration staged
check-changedgate passed on Hetznercbx_0e7f9b4e3cde, including core types, all core-test type graphs, core/script lint, dead-export scans and structural guards. The export-name collision guard and both closure suites passed (20 checks). The same final run passed 118 focused tests, including 12 real root launcher tests.After integrating the landed build-isolation and migration-preservation slices, Hetzner
cbx_bdfe27e44ab7verified the exact 21 source files byte-for-byte against the reviewed checkout. Integrated proof run:node scripts/run-vitest.mjs src/infra/*immutable*.test.ts src/cli/update-cli/status.test.ts src/cli/update-cli.immutable.test.ts src/cli/update-cli.option-collisions.test.ts packages/gateway-protocol/src/schema/config.test.ts --maxWorkers=1passed 250 cases; the separate root launcher command passed all 12 root-only cases. Vitest phase durations were 4.55 s, 141.82 s, 26.73 s, and 42.97 s. This covers the integrated builder/publication path and the new receipt/status siblings. The integrated staged gate passed core types, all 27 core-test type graphs (1,761.95 s), and its preceding structural guards, then stopped at three inherited unused exports:isPollVoteEchoText,PUBLIC_SESSION_ENTRY_SCRIPT, andisClaudeLikeLiveAgent. The same three failures reproduce on a clean, unchanged worktree at basecdeb1e37adc6ecfba8db436f5372c37799d2f931. Baseline and remaining checks continue the native plan after that verified inherited failure; all remaining native commands passed (core/script lint, native schema, storage, media, sidecar, cycle, webhook and pairing guards), as did the export-name collision guard and both closure suites (20 tests, 64.11 s Vitest / 65.71 s wrapper). The continuation completed with exit 0 in 20m30.67s, including baseline installation and reproduction. The failed full gate is not represented as green.Pre-integration per-file wall times (
node scripts/run-vitest.mjs <file> --maxWorkers=1; launcher runs as root):packages/gateway-protocol/src/schema/config.test.tssrc/cli/update-cli.option-collisions.test.tssrc/infra/package-update-activation-immutable-recovery.test.tssrc/infra/package-update-activation-immutable.test.tssrc/infra/update-immutable-activation.test.tssrc/infra/update-immutable-install.adoption.test.tssrc/infra/update-immutable-launcher.test.tsThe slower file totals include existing SQLite crash/recovery fixtures and compiled-worker preparation; the added transaction/format cases themselves are millisecond-scale. Docs inventory includes both changed pages. The final report-filter command lacked
rgon the image; its already-produced artifact was retrieved and checked with Python without replaying tests.Production/tooling delta is +338/-31 (net +307); test/fixture delta is +630/-51, including the 215-line frozen v2 launcher required for real old-reader proof. The requested broad production filter reports net +520 because it also counts that frozen fixture and the removed ratchet entries. Growth is required for the newly approved persistent ownership and compatible-reader contracts; there is no existing release collector to remove in this foundation.
Infrastructure recovery: Testbox synchronization timed out, so validation moved to AWS. AWS passed the full typecheck and preceding guards, then identified the now-removed unused export. Its final pass hit the original lease lifetime; an undersized quota-fallback replacement was released, and Hetzner completed the final proof. No failed product check was waived.
No live Gateway adoption, published-package bridge qualification, or disk-reclamation claim is made.
Remote validation lineage
tbx_01m4hxbv6sba80d9qpadqd6sbt: interrupted before a verdict; released. Replacementtbx_01m4hxrdhkymf0b18kz954she2:node scripts/run-vitest.mjs src/infra/package-update-activation-immutable.test.ts --maxWorkers=1passed 24 cases (47.56 s Vitest; 49.06 s wrapper), including the baseline provenance probe.tbx_01m4j1v0c94esaygx9t1jzcj1m: focused immutable/CLI/protocol proof, corrected owner/activation rerun and real root launcher proof passed as recorded above; later synchronization timed out. Released.cbx_e40e8c93eb78:node scripts/check-changed.mjs --stagedpassed full typechecking and preceding guards, then found the removed unused export. Its follow-up expired at the lease's original lifetime. Released. Quota-fallbackcbx_0b3c22aff799was unsuitable and released without running validation.cbx_0e7f9b4e3cde: final pre-integration staged gate, export/closure guards, and 118 focused cases passed. A subsequent docs-report filter lackedrg; the generated inventory was downloaded and independently checked. Released.cbx_0f0a5aa69e3b: first rebase proof passed core production typechecking before cancellation to integrate the newly landed build owner. Released; remaining checks are covered by the final integrated run.cbx_bdfe27e44ab7: runsrun_8c0ef3186af509c141e0dc2e3cc233b6andrun_2735d54eb2576330eda4533263eeefe8stopped before tests at a textual Git-diff hash assertion. Direct comparison confirmed all 21 file contents matched; the final proof uses per-file SHA-256 admission. These were harness failures, not passing test runs. The final integrated command and results are recorded above. The subsequent native-plan continuation and unchanged-base reproduction passed as described above. The lease was released after the final result.CI follow-up
Initial run 38046619071 identified four typed raw CASE expressions in the inventory reader. They now use Kysely's expression builder, preserving the exact byte bounds and nullable rejection while letting the query owner infer row types. Fresh independent review is clean.
Hetzner Crabbox
cbx_76a1a50f67de, focused correction and baseline proof: core types passed, 38 immutable owner/recovery cases passed (70.13 s Vitest), and focused lint passed. The broad Kysely scan's 14 remaining diagnostics exactly match unchanged basecdeb1e37adc6ecfba8db436f5372c37799d2f931; none involve this diff. The first broad scan stopped on those inherited diagnostics before tests; the continuation compared them with the clean base and finished the focused proof.The same lease reproduced the other CI leaves on unchanged main parent
123d5a1331a8307969767b34e8f8808461ea205b:ui/src/e2e/chat-github-publication-guest.e2e.test.ts: the same two missing “Publish PR” button assertions failed; 1 case passed (56.19 s Vitest). Command:node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-github-publication-guest.e2e.test.ts --maxWorkers=1.src/gateway/control-ui-public-session-refresh.test.ts:51: the same TS2345 (string | undefinedpassed asstring) undernode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.gateway-root.json.Those UI/Gateway test files are untouched by this PR. No CI rerun or unrelated source change was used to clear them. The lease was released after proof.
Current head CI run 38050053802 reports four
mobile-shell-geometry.e2e.test.tscases. The same desktop-zero, landscape-zero, standalone-landscape-contract and compact-landscape failures occur on scheduled main run 38048680925, shard 4/9, main commitb0e5f302dd8d7ad6e2c141c9e9667bd11b8de645. This PR changes no UI files. All other selected current-head CI checks passed; the aggregate is red only because of that inherited UI leaf.