Repository navigation
improve: safely reuse qualified offline compositions - #188678
Conversation
Preserve explicit npm profiles and their lock/reuse path while carrying qualified target dependencies in bundle archives. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 65d6807d-2851-4dba-9916-f4bc1496596b
Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: abb5a92a-2552-4be8-91fc-4258059363e4
Scope Node-only setup to bundle enrollment, fix narrowed bundle fixture metadata, and reuse the validated package manifest owner instead of unsafe assertions. Prove missing npm/Corepack repair and retained npm runtime compatibility. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 92b05551-9794-42c5-b0ea-0dbd82702c99
Verify graph metadata and copied dependency content against a prior strict qualification, and consume fast image recipes from an archive checked inside Docker. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 672e26e5-f84b-42fd-920c-dea068b3f456
|
🦞👀 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. |
Keep fixture loops explicit without changing their behavior, and account for their exact test-line delta. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 4b152785-ec9c-414f-90c7-2368b3a060b3
…sites Merge the reviewed offline runtime prerequisite without rewriting history. Recognize already-declared Docker stages while keeping digest enforcement for all external images. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 7f0ad263-49b7-4178-96a2-c1d101a61593
|
Codex review: needs maintainer review before merge. What this changesThis PR adds qualified dependency reuse and an archive-bound Docker recipe that verifies the consumed archive before extraction. Example: Build from installed-runtime.tgz after app/dist/entry.js has changed.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: it adds useful opt-in composition optimizations, preserves strict defaults, and has no independently established introduced defect; the failing checks also fail on its prerequisite. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherOffline release tooling combines a portable package and inventoried Linux dependencies into installed assets that Docker passes through the existing finalizer. flowchart LR
A[Portable package] --> D[Composition owner]
B[Dependency inventory] --> D
C[Prior strict receipt] --> D
D --> E[Installed archive and receipt]
E --> F[Docker checksum admission]
F --> G[Existing runtime finalizer]
Technical reviewBest possible solution: Retain the opt-in optimizations within the existing composition and finalization owners, alongside the prerequisite’s general digest-validator repair. Do we have a high-confidence way to reproduce the issue? This is an optimization feature; source inspection establishes the changed paths, and exact-head CI independently reports failures also present on the pinned prerequisite. Is this the best way to solve the issue? The change uses the existing inventory, dependency planner, receipt, and finalizer owners; its essential invariant is that reduced donor hashing must still verify selected output bytes and the archive Docker actually consumes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 093d71e81eb1. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +140, Docs +21, Other +178. Total +339 across 5 files. Added test files: 0. View PR surface stats
Review metrics
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 30, 2026, 4:41 PM ET / 20:41 UTC. |
Merge d16cdab without changing the qualified-reuse patch. Adopt the shared Docker stage classifier and repaired worker fixture types; retain selected-copy and archive-consumption guards. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 2919158f-36e4-40ef-88d0-b3bd5c5c07eb
Merge main 65acdfd to resolve the real executable-entry conflict while preserving both declaration sets. Retain private implementation trees below src/node_modules, leaving dependency-root placement with its existing planner. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: ea39c266-fd27-4fd1-8151-4387b09a4a77
Merge final Linux composition prerequisite e3e3497, preserving its reviewed main integration and direct node_modules filter repair. Exercise the existing qualified-reuse tamper regression against src/node_modules implementation content; retain the exact 140-line allocation. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 9bdac577-c78d-45b4-9fe6-b164b6c94914
Use the already-admitted root fs-safe0.26.15 pin so selected Codex packages satisfy the canonical single-version contract. Regenerate only the Codex lockfile importer. Co-authored-by: galiniliev <[email protected]> (cherry picked from commit 79daa9c)
Resolve declared package names and ancestor placements with package-style lookups. Preserve nested versions, source links and required dependency guards. Co-authored-by: galiniliev <[email protected]> (cherry picked from commit d4e71ba)
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 6c5dbb4e-05b9-4de2-96c2-b7c9e83ecb02
Merge exact Linux prerequisite f3bdcad, retaining builtin lookup, ancestor deduplication and Codex fs-safe alignment. Exercise builtin-name package resolution in the existing composition fixture without increasing the 140-line reuse allocation. Scoped tests, typechecks and P0-P2 review pass; the measured pre-main test-line ceiling still has inherited debt. Co-authored-by: galiniliev <[email protected]>
Resolve four squash-lineage conflicts against main adb58af after verifying its conflict-side blobs equal prerequisite f3bdcad. Preserve exactly the five-file qualified-reuse delta and 140-line test credit. Bound the native-image-input fixture to its real runtime commit instead of unrelated partial history. Main-relative tests, static checks, ratchet and fresh P0-P2 review pass. Co-authored-by: galiniliev <[email protected]>
Worked on by: - @galiniliev Co-authored-by: galiniliev <[email protected]> OpenClaw-Publication: 202b16e6-c0eb-4e9e-9b9e-9ed55a6df7ed
|
Merged via squash.
|
Add opt-in qualified dependency reuse and archive-bound image input while preserving strict verification defaults. A digest-bound prior strict receipt qualifies the dependency manifest. Recheck donor topology and package manifests, then hash the selected copied payload. Partial receipts cannot qualify subsequent reuse. The archive recipe verifies the exact Docker-consumed archive before extraction, so unchecked mutable app bytes cannot enter that route. Preserve the existing target lifecycle and acceptance requirements. Validated with 53 affected tests, meaningful tamper controls, offline archive-consumption proof, static checks, independent review, current-head CI, and conflict-free current-main composition. Allocate exactly 140 lines for 140 added regression-test lines. Co-authored-by: galiniliev <[email protected]>
Related: #188661, now landed. This follow-on targets main and preserves exact prerequisite
f3bdcadb948e1b873b59066cbd0994192da50a42in its history. Its effective change against reviewed mainadb58af237c2079d8eae388b22b9ce439d19e081is exactly the five qualified-reuse files.What Problem This Solves
Repeated offline compositions rehash every dependency payload, while skipping verification of a mutable donor or Docker's
app/input would admit stale or changed bytes.User Impact
Release tooling can opt into qualified dependency reuse and an archive-bound image recipe without changing the strict defaults. Reuse receipts explicitly report partial input verification; neither mode replaces Linux target acceptance.
Why This Change Was Made
A trusted, digest-bound receipt from a prior strict composition qualifies the dependency manifest, not the current donor. Reuse still checks complete topology, modes, sizes, link targets/containment and package manifests, then verifies the actual selected copies against that inventory. Unselected payload bytes are not rehashed, and partial receipts cannot qualify another reuse. No caller-written operation report serves as authority.
The landed composition owner's repairs are retained: builtin-named npm dependencies use package lookup and nearest-ancestor deduplication, and legitimate implementation files under paths such as
src/node_modulesare copied and verified. Those prerequisite fixes are not reintroduced as independent owners here.The optional
--image-input archiverecipe checks the receipt-bound archive/manifest and the small admission inputs without rehashing all ofapp/. Docker copies the archive, checks its exact SHA-256 inside the build, and only then extracts it. The existing finalizer remains the single lifecycle owner. Directory recipes and full-inventory verification remain the defaults.Source implementation contributed by @galiniliev. Relative to main, this adds no cache, competing operation-report owner, dependency, lockfile or tool pin. Net production growth remains 176 lines. The scoped allocation is still exactly 140 for the +140 test-line delta; the shared scalar was not changed.
Evidence
712cf21f051338520e61849fa4c7d43acfa1ef3apreserves tested commit63593cf109f5737ed238603dec0f1c73d583553cand treedcc577f3532a53cb300ee278b730e4947adc7060. The exact prerequisite was merged history-preservingly inaa52afa9975e8cfe3b8eecaec51bf3418a3ae214. Four squash-lineage conflicts were then resolved against main only after proving all four main-side blobs equal the reviewed prerequisite. No rebase or age-only refresh was performed.fs. Restoring the old lookup makes composition fail withopenclaw requires fs; the repair passes while retaining nested versions. The existing implementation-file tamper case still fails with the old copy filter and passes with the repair. Genuine first strict receipts, relocation/tampering, partial-receipt rejection, CLI archive admission and native-finalizer boundaries remain covered.adb58af237c2079d8eae388b22b9ce439d19e081: P0–P2 scoped-clean, no actionable findings. The final candidate was committed unchanged. The dirty local ClawSweeper checkout required the documented autoreview route. The earlier hosted review also found no actionable defects; it is prior-head evidence, not a current-head approval.app/bytes; archive tampering failed checksum verification before extraction. No broad rebuild was repeated solely for metadata or ancestry changes.Retained archive-consumption trace — unchanged Docker stage
Successful admission and container readback, while mutable
app/contained different bytes:After changing that archive while retaining the expected digest:
The maintained build step orders checksum verification before extraction with
&&; the tampered build exited 1. This is archive admission proof, not full release-image qualification.Current-head CI is green: the CI gate passed for
712cf21f051338520e61849fa4c7d43acfa1ef3a; final readback found no failed or running checks. Full release-image acceptance remains target-owned. Receipts retaincompositionOnly: true, ABI/libcrequires-target-acceptance, and lifecycletarget-required. No live cloud operations were performed.Worked on by
Work sessions