Repository navigation
fix(lock): tolerate legacy manager state during exit cleanup - #254
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. Reviewed September 11, 2026, 6:13 PM ET / 22:13 UTC (Revision 3). ClawSweeper reviewWhat this changesThe PR prevents legacy shared lock-manager state from interrupting process-exit cleanup, adding regression coverage, a built-package probe, and documentation. Merge readiness✅ Ready for maintainer review The PR remains necessary: current main and v0.8.6 still contain the unguarded iteration. The focused repair has sufficient real filesystem proof and no actionable findings; the earlier proof gap is resolved. Priority: P2 Review scores
Verification
How this fits togetherfs-safe uses sidecar files to coordinate access to shared files. Its process-exit handler visits shared lock managers and removes eligible owned locks while preserving retained or changed sidecars. flowchart TD
A[File lock acquisitions] --> B[Shared manager registry]
C[Process exit] --> D[Visit every manager]
B --> D
D --> E[Check ownership and retention]
E --> F[Remove eligible raw locks]
E --> G[Preserve retained or changed locks]
D --> H[Clean available reclaim guards]
Before mergeNone. Agent review detailsSecurityNone. Review metricsNone. Technical reviewBest possible solution: Keep the narrow missing-state fallback, existing ownership and retention checks, documented registration order, and coordinated release note. Do we have a high-confidence way to reproduce the issue? Yes. Current source exposes the failure when exit cleanup encounters a manager without reclaimGuards before another manager; supplied before/after built-package runs corroborate it. This review did not execute the scenario. Is this the best way to solve the issue? Yes. Treating the absent collection as empty repairs the direct exit path without duplicating acquisition backfill or replacing globally registered handlers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against e8a087715a65. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Maintainer proof for
Ready for squash merge. Preserve the original contributor credit; the release note thanking @metahacker is consolidated in #257. Handler ownership remains first-registration-wins, as documented. |
Mixed package versions share the process-wide sidecar-lock manager registry. Exit cleanup could encounter an older manager without reclaimGuards, throw a TypeError, and leave later managers unprocessed. Treat that missing collection as empty while retaining the existing ownership checks and retainOnExit behavior.
The contributor regression holds real legacy-shaped and modern locks in a child process. Maintainer qualification adds a built-package probe and documents the first-registration-wins limitation: restart with the fixed copy registering the exit handler first. Loading it later does not replace an older handler.
Validation at the maintained head:
Thanks @metahacker for the original fix and regression. The contributor commit is preserved. Release notes are consolidated in the final notes/dependency PR #257; this PR changes code, tests, documentation, and its repeatable probe only.
Related to openclaw/openclaw#132616. This fixes the library cleanup defect; it does not claim to resolve every consumer shutdown symptom.