Repository navigation
fix(pr): keep in-flight landings working after dependency refreshes - #182147
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 real behavior proof before merge. What this changesThis PR restores retained workflows’ exact dependencies through isolated frozen installations instead of refreshing shared tooling checkouts. Example: A retained landing requires dotenv 18.0.7 after the shared installation advances to 18.0.8.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 3 items remain Keep this PR open: it addresses a concrete retained-workflow failure still present on main, and inspection found no discrete introduced code defect. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe PR wrapper selects trusted workflow source and supplies its dependency context before supervision and operation locking; retained workflow bindings and installed package directories enter this subsystem, and verified selective package pins leave it. flowchart TD
A[Retained workflow anchor] --> B[Check installed dependencies]
B --> C[Verify anchor and extracted source]
C --> D[Install frozen dependencies privately]
D --> E[Publish complete installation]
E --> F[Pin exact package directories]
B --> F
F --> G[Run retained workflow]
Technical reviewBest possible solution: Keep recovery in the existing wrapper bootstrap, preserve retained bindings and selective pins, and complete the source-to-lifecycle boundary evidence. Do we have a high-confidence way to reproduce the issue? Current-main source requires exact anchored versions but can only refresh a separate tooling checkout forward, matching the reported dotenv 18.0.7-versus-18.0.8 refusal; no target code was executed during this read-only review. Is this the best way to solve the issue? The approach repairs dependency availability at its existing owner, removes the ineffective refresh path, and preserves exact-version and retained-workflow contracts without modifying shared installations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 57714a697a82. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: This PR expands trusted wrapper recovery to execute historical-anchor package lifecycle hooks. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +53, Docs +17, Other +85. Total +155 across 7 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 23, 2026, 11:27 PM ET / October 24, 2026, 03:27 UTC. |
|
Merged via squash.
|
…penclaw#182147) * fix(pr): materialize frozen dependencies for retained anchors * fix(pr): validate frozen installs without rewriting package links
What Problem This Solves
Fixes native PR landings becoming stranded when main refreshes dependencies after their workflow binding was created. #182065 and #182046 were bound to main with dotenv 18.0.7; after #182010 installed 18.0.8, their next commands stopped at
the trust anchor requires 18.0.7before acquiring a lock.User Impact
Maintainers can continue an admitted review or landing after a dependency refresh without downgrading a shared checkout or replacing its workflow binding. Exact-version checks and the original trusted workflow remain in force.
Why This Change Was Made
The old recovery in
scripts/pr:533(pr_materialize_dependencies) could only fast-forward and reinstall a separate tooling checkout. That cannot satisfy an older anchor. The wrapper now prepares an isolated frozen installation from the authenticated anchor commit, verifies the extracted source before lifecycle hooks execute, rechecks exact package versions, and pins the resolved package directories as before. It atomically publishes complete cache entries, reuses them, and sweeps old entries whose recorded consumers have exited. The forward-only refresh is removed; explicit tooling-root validation remains.The cache key includes the full source tree, platform, architecture, and Node ABI. Using the full tree covers workspace manifests, patches, and install-hook inputs, at the cost of less sharing between source revisions with identical lockfiles. Concurrent first installs may duplicate work; only one complete entry survives. PID reuse can delay cleanup.
Evidence
Production delta: +145 / −60 lines (net +85); tests: +153 / −100 (net +53). The added bootstrap owns frozen-install recovery; no new eager import is introduced.
Real historical-anchor proof completed against main commit
7b71c23797646bed71dc869b83a1c51764c267a6: the normal frozen install reused 1,592 packages, including lifecycle scripts. On the final committed head,scripts/pr lsthen exited 0 using the completed cache without reinstalling. The cached dotenv is 18.0.7; both the task checkout and shared tooling remain at 18.0.8.CI is green on
f70c1ce062be4eb2cb564f5c6618da1dc1eaaf47: https://github.com/openclaw/openclaw/actions/runs/40057330854. The exact-head watcher accepted eight superseded checks; current required gates succeeded.Validation commands:
The focused test command passed all four new cases and the import inventory; its exit was nonzero solely for the investigated local timeout described above. Typechecking, lint, syntax, formatting, line-cap ratchet, and pre-commit checks passed.