Merged upstreamCorrectnessMerged Jul 16, 2026
Repair handles tracked workspace self-links
Fixed ClawSweeper repair target validation so tracked node_modules workspace self-links can be hashed deterministically instead of failing as directory cycles.
openclaw/clawsweeper · #609
Problem
Repair validation could reject OpenClaw's tracked packages/speech-core/node_modules/openclaw workspace self-link as a validation identity directory cycle, stopping repair execution after target preparation.
Approach
Added a narrow tracked-workspace-link exception that records a stable package reference instead of recursively walking back into the checkout. The exception requires a tracked link, in-checkout directory target, direct node_modules package path, tracked target manifest, and exact package-name match.
Impact and scope
- Restores repair execution for checkouts that contain tracked package-manager workspace self-links.
- Keeps validation fail-closed for untracked, escaping, mismatched, broken, and unexpected symlink shapes.
- Maintains checkout identity binding so later mutations to linked target content are still detected.
Validation
- Added focused positive coverage for unscoped and scoped tracked workspace self-links.
- Added negative coverage for untracked links, untracked manifests, mismatched identities, escaping links, and non-node_modules self-links.
- PR evidence included a clean OpenClaw checkout binding proof, focused validation tests, build, lint, format, and broader repair-suite results.