Repository navigation
fix: immutable update preparation fails without SDK declarations - #175087
Conversation
Keep update-marked full builds aligned with the package export contract required by installed immutable generation verifiers. Fixes #175051.
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR restores SDK declaration generation for default update builds while preserving explicit runtime-only choices. Example: An immutable installation on 2026.10.4 prepares a different official main SHA.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR repairs a confirmed build/verifier mismatch that remains on current main; no discrete introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe source-build orchestrator turns candidate source into runtime and SDK artifacts, which the installed immutable updater verifies before sealing and recording a prepared generation. flowchart LR
A[Installed updater] --> B[Candidate source]
B --> C[Default full build]
C --> D[Runtime and SDK declarations]
D --> E[Installed generation verifier]
E --> F[Sealed prepared generation]
Technical reviewBest possible solution: Produce the SDK artifacts promised by package exports without weakening installed immutable verification or adding another artifact inventory. Do we have a high-confidence way to reproduce the issue? Current-main build selection, package exports, and generation verification establish the failure chain, corroborated by the affected-release report; this read-only review ran no reproduction. Is this the best way to solve the issue? The producer-side repair satisfies already-installed verifiers, preserves explicit runtime-only builds, and avoids a competing verification contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c60b3ee9aff9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +15, Docs +1, Other -2. Total +14 across 5 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 Reviewed October 17, 2026, 12:32 AM ET / 04:32 UTC. |
…dates (openclaw#175087) Immutable update preparation always failed: the updater marks its candidate build with OPENCLAW_UPDATE_IN_PROGRESS, build-all then defaulted to a runtime-only build without .d.ts files, and immutable generation verification requires dist/plugin-sdk/*.d.ts like packaged releases ship. The build no longer implicitly skips declarations for update-marked builds; explicit runtime-only builds stay available. Production net -2 LOC. Linux live proof: an update-marked build sealed the generation (adopted, then already-current) with SDK declaration verification passing. Fixes openclaw#175051
Fixes #175051.
What Problem This Solves
Fixes immutable update preparation failing because the candidate build omits Plugin SDK declarations required by the installed generation verifier.
User Impact
Default update builds include the public SDK artifacts needed to verify and seal a generation. Explicit runtime-only build profiles and overrides remain available. The full declaration build costs additional build time, as it does for an ordinary full build; no configuration or migration is required.
Why This Change Was Made
The update marker implicitly selected a runtime-only build even though
package.jsonexports SDK declaration files. Those files ship in the published npm package and are checked by the existing full-build SDK consumer gate. Removing that implicit opt-out keeps the candidate producer aligned with the existing artifact inventory and manifest-driven verifier. Changing only the candidate verifier would leave already-installed updaters failing before activation.The generation fixture now includes the real types/default export shape and checks rejection when its declaration is absent. The legacy shell fixture keeps declaration-cache inspection synthetic alongside its already-synthetic compiler, while retaining real transaction and restart ownership checks. No new artifact list or production path is introduced. Production: +0/-2 lines; tests: +19/-4; docs: +3/-2. Thanks @potterdigital for the precise report.
Evidence
OPENCLAW_UPDATE_IN_PROGRESS=1 node --import ./scripts/tsx.mjs scripts/build-all.mtsbuild, with no declaration override, passes in 4m 56.7s. Its SDK gate verifies all 155 public subpaths. The published[email protected]tarball independently contains bothdist/plugin-sdk/core.jsandcore.d.ts.git diff --check; and Madge (zero cycles) pass. Independent P0–P2 review reports no actionable findings. Fullcheck:changedwas not run because its SQLite inventory stalls on this host; the scoped checks above follow the provided local gate budget, and PR CI remains the broad proof.Live Linux proof used a disposable Testbox run, isolated HOME/state, a free loopback port, and a task-owned systemd Gateway. The update-marked build passed in 3m 39.3s; its generation sealed and verified with declarations present. The real CLI returned
adopted, thenalready-currentwith no warnings. The Gateway and lease were stopped after proof.The commands below used the scratch installation, its pinned external Node executable, its own service/account, and fresh state/config paths:
Initial provisioning attempts were rejected for copied-file ownership, an inaccessible service-account state path, and this CI host's writable
/opt. Only the disposable fixture was corrected: normalize its ownership, use the lease's nonroot runner account with fresh private state, and place the installation/runtime under protected/usr/libparents. The verifier and directory-protection checks stayed unchanged. This proves build → seal → adopt and the already-current CLI path; a published-updater-to-new-SHA preparation is not claimed.