Repository navigation
fix(scripts): preserve PR tooling across process handoffs - #185964
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: needs maintainer review before merge. What this changesThis PR preserves dependency installations and selected Git execution policy across process handoffs. Example: A package reader survives its creator while five newer frozen installations create cache pressure.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR addresses verified PR-tooling lifetime failures, and the reviewed head has no remaining actionable findings. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe scripts/pr wrapper selects trusted tooling, projects dependencies, and starts supervised operations; its lifetime owners retain those resources until consumers drain. flowchart TD
A[PR command] --> B[Trusted wrapper selection]
B --> C[Authenticated bootstrap]
C --> D[SQLite installation holds]
C --> E[Selected Git context]
D --> F[Supervised operation]
E --> F
F --> G[Drain and retire resources]
Technical reviewBest possible solution: Retain one SQLite lifetime owner and one Git invocation owner while preserving existing workflow authentication and operation-lock semantics. Do we have a high-confidence way to reproduce the issue? Current-main source permits eviction after creator death despite surviving readers, and PATH adapters can rediscover the selected launcher recursively; supplied paired receipts demonstrate the lifetime failure and repair. Is this the best way to solve the issue? The change fixes resource ownership rather than masking missing-package errors, removes the superseded PID sweep, and shares Git policy across bootstrap, supervision, installation, and GH calls. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against afc8bcdbc8f9. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceTests +2840, Docs +17, Config +117, Other +965. Total +3939 across 25 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 HistoryReview history (4 earlier review cycles)
Reviewed October 28, 2026, 12:22 PM ET / 16:22 UTC (Revision 5). |
Baseline-Refresh: 7954369c69bda948083e06127bc7d666dab3c697
Baseline-Refresh: dfb241d1decd6ed4f80fb4bb6657f10852291ec7
Baseline-Refresh: d287b8c808b79d408ebdbdc48622578bfcf745ee
Baseline-Refresh: 25dd34d2254c6638e4e7a71f00db9226b77352ba
Baseline-Refresh: c965f8813f4e4c4b9472ba9171b8be71627d2413
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…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
Problem
PR tooling can collect an installation while an inherited reader still uses its projected packages. Creator/PID death does not prove the installation is unused. A wrapper can also lose its selected physical Git executable across PATH and process handoffs. Real regression proof establishes these failures; no shipped incident is claimed.
Closes #185962
Related work and credit: #185493.
Change
scripts/pr-lib/cache-lifetime.mjsowns readiness, durable holds and settlement in builtin SQLite. Holds bind canonical paths and physical identities before projection. Creator FD9, revalidated identities and process drain precede release; authoritative eligibility replaces PID/path-disappearance collection.scripts/pr-lib/git-invocation.mjsreplaces PATH-only Git rediscovery with captured executable/environment handoffs. Native Windows GH admits matching physical Git or refuses before execution. The Darwin-only offline test observes actual GH using the selected policy in two directories, sync and async, including denial, config preservation and binary identity.The PR's initial unshipped v3 cache layout refuses older PR-only hold keys without modifying that database. It adds no public configuration, parallel file ledger or runtime fallback. The baseline integration inherits upstream state-v36 metadata and template migrations; those are not a new schema change authored by this PR.
Production/workflow/declarations/config: 1,290 added / 208 removed, net +1,082. Growth establishes the lifetime owner, authenticated bootstrap and physical Git boundary. Tests: 3,349 added / 509 removed, net +2,840; the canonical eligible LF delta is +2,839 because the Python file is outside its pathspec. Documentation is separate: 36 added / 19 removed, net +17.
Current head and qualification
Signed candidate: 46d2212, integrating the preceding reviewed head with fixed upstream
3a5a369ec654dc14041e1a2dcea867d0115b23d9. Source postchecks bind all 25 retained PR paths and the remaining tree to that target. The sole conflict takes upstream's entire commented test baseline unchanged, removing this PR's override.The inherited ceiling is 6,310,000. Current canonical CI measured 6,305,288, leaving 4,712. Upstream's entire baseline and comments are retained; this PR adds no counter allowance, test pruning or ratchet-policy change.
Current M hosted CI/docs checks, all ten ratchets and the automatic exact-head Darwin run passed. The fresh exact-M ClawSweeper review reports no actionable finding, no Before merge item and no remaining Rank-up move. These are current-head hosted and review results, not a full native-gate stamp or merge authorization. Historical physical receipts remain scoped below.
Source review is composed: findings from the full report were repaired in later narrow reviews, with independent signed-source and integration checks. The old report is not relabeled clean. The fresh exact-M ClawSweeper review, updated2026-10-28T16:23:42Z, covers
46d221211272bb6cbf287561ce3491c317f77103: Findings None, Before merge None, Security None, and no remaining Rank-up move. It confirms the owner-boundary fix and sufficient proof, with no actionable defect. Its ready-for-maintainer-review state is not bot-automerge approval.Evidence
openclaw/ci-gatejob122939374888 passed; all 16 executed Node jobs, production/test types and five core stripes, central/core/selected-plugin lint, guards, architecture/source contracts/package boundaries, UI E2E and all 10 ratchets passed. The separate Node24 compatibility job was skipped. Physical checkoutdb3b900925afc29d185a796c2e60c38dd36fefb0merges M into0ebeb475e394c53ff3101b101716d8e90187d688. Baseline Node24.22.1/pnpm12.15 ran the normal frozen205-workspace install with cache-hit=true/already-up-to-date and successful prepare. The canonical test-line command used the explicit CI ratchet base with--no-merge-base.RED_LIVE_READER_ENOENTversus candidateGREEN_RETAINED_SAME_PHYSICAL_PACKAGE: genuine packages, creator exit before five pressure installations, fresh reads and both joins. It composes with 13 earlier B stages; the outer cleanup deadline was separately settled.The isolated Mac attempt stopped in native preflight; installation and all five suites were UNRUN. Cleanup remains UNKNOWN, with claim/workspace and recovery inputs retained; hosted Darwin success does not settle that custody. Follow-ups: persist native preflight identity before dispatch and support exact completion reconciliation; explain focused-versus-canonical typed-lint inference; add commit/phase progress identities and an established bound to baseline-successor history validation; profile the observed1,405.30s database-worker ratchet, which passed with T1 counts168→168 and compatibility15→15, without claiming a regression.
Owner decision: squash landing including the existing automatic docs sync/publication is explicitly approved. The publisher workflow is unchanged. Exact-head review and native landing guards still apply; no protected label or marker has been cleared.
No release, package publication, or unrelated deployment is requested.