Repository navigation
fix: reuse frozen PR installs across source-only commits - #185493
Conversation
|
🦞👀 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 changes before merge. What this changesThis PR reuses frozen PR-tooling installations across source revisions whose audited installation inputs are unchanged. Example: Six consecutive main revisions have identical audited installation inputs on Darwin arm64 with Node ABI 147.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Needs changes before merge - 1 item remains Keep this PR open: the optimization has maintainer-approved value, but its newly added reuse regression fails on the reviewed head and blocks CI. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherThe scripts/pr bootstrap selects dependencies for authenticated workflow anchors, materializes frozen installations when installed versions differ, and pins package directories for the supervised operation. flowchart TD
A[Trusted workflow anchor] --> B[Installed package validation]
B --> C[Audited dependency key]
C --> D[Complete cached installation]
C --> E[Verified archive and frozen install]
E --> D
D --> F[Pinned tooling packages]
Technical reviewBest possible solution: Retain audited reuse in the existing materializer and repair the failing reuse regression without weakening input invalidation or full-tree fallback. Do we have a high-confidence way to reproduce the issue? Current-main source directly establishes that unrelated source changes produce different installation keys; no target code was executed during this read-only review. Is this the best way to solve the issue? The existing materializer is the appropriate owner, and the audited lifecycle closure plus conservative fallback addresses the documented reason for full-tree identity. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4ac0cd149daa. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceTests +109, Docs +17, Other +92. Total +218 across 4 files. Added test files: 0. 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 Reviewed October 27, 2026, 1:51 AM ET / 05:51 UTC. |
|
Merged via squash auto-merge.
|
…5493) * fix: reuse frozen PR installs across source-only commits * fix: complete frozen-install input audit * fix: audit SQL schemas as executable install inputs * test: bind dependency cache fixture to child Node runtime
* fix(scripts): preserve PR tooling across process handoffs Follow-up to #185493. * fix(scripts): persist PR cache lifetime in SQLite * test(scripts): align PR lifetime fixtures with owner contracts * fix(scripts): qualify PR cache and bootstrap fixtures * test(scripts): assert bootstrap archive refusal * fix(tooling): register maintained commands and preserve numeric wait conversion * fix(tooling): align test-line ceiling with main * fix(tooling): remove stale cache lint suppression * test(tooling): prove native GitHub CLI policy on Darwin * test(tooling): assert native GH promise rejections * fix(tooling): align test budget and canonical Knip roots * docs(tooling): align cache lifetime and anchor cleanup guide
…85964) * fix(scripts): preserve PR tooling across process handoffs Follow-up to openclaw#185493. * fix(scripts): persist PR cache lifetime in SQLite * test(scripts): align PR lifetime fixtures with owner contracts * fix(scripts): qualify PR cache and bootstrap fixtures * test(scripts): assert bootstrap archive refusal * fix(tooling): register maintained commands and preserve numeric wait conversion * fix(tooling): align test-line ceiling with main * fix(tooling): remove stale cache lint suppression * test(tooling): prove native GitHub CLI policy on Darwin * test(tooling): assert native GH promise rejections * fix(tooling): align test budget and canonical Knip roots * docs(tooling): align cache lifetime and anchor cleanup guide
What Problem This Solves
Fixes repeated full frozen installs during PR landing when main changes but install inputs do not. The cache previously keyed every source-tree byte, so unrelated source commits each consumed another multi-GB installation.
User Impact
PR tooling can reuse one installation across audited source-only heads. There is no Control UI/runtime behavior change. Source authentication, ancestry, complete archive verification, pinned package validation, concurrent publication, and live-consumer retention are preserved.
Why This Change Was Made
Key the audited installation by 606 dependency/lifecycle inputs, platform, architecture, and Node ABI. The input policy includes every package manifest, lockfile, patches, package-manager configuration, the complete lifecycle import closure, two SQL schemas, and native protocol generator inputs. Root is the only workspace with install lifecycle scripts, including pnpm:devPreinstall. esbuild configuration files and future ancestor tsconfig.json files are included. The three standard root hooks and pnpm pre-hook were executed under a write-confined, network-denied sandbox with filesystem instrumentation; there were no unkeyed source reads. Registry build hooks present on the qualified Mac read their own package payloads/platform siblings.
Any changed audited input, unaudited runtime, tracked dist tree, or retained wrapper without an audit keeps the original full-tree key. This is deliberate: a new hook could read new paths. Such changes require renewing the audit before cross-head sharing resumes. The current audit covers Darwin arm64 / Node ABI 147. SQL schemas are executable inputs too, because the Kysely generator passes them to SQLite; they have no special data exception.
Evidence
Acceptance: sequential cold-cache identity over six consecutive first-parent main heads with unchanged audited inputs, followed by one synthetic lockfile change. No real installs were needed for the workload or key tests.
5a8be2a1eb7bthrough154e39f03a2dpr-dependency-cache.test.ts --maxWorkers=1pr-wrappers.test.ts --maxWorkers=1The ~3.5 GB/install observation implies ~17.5 GB less logical install payload for this sequence, not a measurement of physical APFS savings. Live observation: 14 complete entries (11 with live consumers, 3 unused), plus 7 staging entries. No shared installation was manually deleted or altered. Native initialization used the existing workflow to create one full installation; pnpm reported 1576 packages in 33.3s, excluding source extraction/verification.
scripts/prNo startup/UI bytes change; no screenshots apply. No remote leases or local Docker. Release-note context: reduce repeated frozen installation and disk churn in maintainer PR tooling.
CI run 40456196847 caught a test-fixture assumption: the Bun runner and spawned Node process report different ABIs. The fixture now keys its audit to the actual Node child, preserving all assertions and production behavior. A focused local run reproduced the CI failure and passed after the correction.