Repository navigation
fix(pr): reclaim finished materialized wrapper copies - #162340
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: blocked before merge. Reviewed September 30, 2026, 11:28 PM ET / October 1, 2026, 03:28 UTC. ClawSweeper reviewWhat this changesThe PR reclaims temporary copies of trusted PR tooling after supervised completion, while preserving copies when ownership or child completion is uncertain. Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this addresses a remaining temporary-storage leak, and no concrete introduced correctness defect was found. The member-authored contribution is actively assigned and retains meaningful work absent from current main. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw's PR tooling can extract trusted wrapper code into a temporary directory when a checkout cannot supply it. Its process supervisor runs the operation, tracks child completion and operation locks, and now controls cleanup of that temporary copy. flowchart TD
A[PR command] --> B[Trusted wrapper selection]
B --> C[Temporary wrapper copy]
C --> D[Process supervisor]
D --> E[Operation and child processes]
E --> F[Completion and ownership checks]
F --> G[Remove owned copy]
F --> H[Retain uncertain copy]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +123, Other +90. Total +213 across 5 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep temporary-copy retirement with the existing supervisor, using creation identity and completed child custody as the deletion boundary. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the path: force trusted-wrapper materialization, complete a supervised operation, and observe that current main leaves the copy behind. The captured body reports this failing against the base; this review did not execute it. Is this the best way to solve the issue? Yes. Extending the existing supervisor avoids a competing cleanup owner and preserves conservative retention when completion or directory ownership cannot be established. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 18659d387600. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
* fix(pr): reclaim finished materialized wrapper copies * test(pr): check materialized anchors before supervised cleanup
What Problem This Solves
Fixes: supervised PR operations leave their materialized wrapper copies in temporary storage after the operation and its children have finished, accumulating files and inodes.
User Impact
Newly created wrapper copies are reclaimed after proven supervised completion. Existing copies, unsupervised advisory operations, uncertain child custody, and retained operation locks remain untouched. This prevents one source of recurring temporary-storage growth; it does not clean existing installations.
Why This Change Was Made
The creating wrapper holds its directory open across exec and gives cleanup authority only to the same supervisor process. The supervisor derives the path from its own anchored script, strips that authority from children, and removes only the unchanged directory after strict child drainage and the existing completion/lock gates. External dependency symlink targets are preserved. Open notification pipes, interruption, replacement, or missing authority retain the copy.
Evidence
The earlier 273-case run remains incomplete, not green: a local Git command shim recursively selected a fixture proxy and the task-owned test runner was terminated through its native lifecycle. The retry above corrects only that invocation's synthetic-fixture Git selection; no global Git/PATH guard was changed. Required prepared-head CI remains a separate landing gate; skipped draft checks are not passing proof.