Context
packages/loopover-mcp/lib/local-branch.js:214-220 (redactLocalPath), packages/loopover-mcp/bin/loopover-mcp.js:3628-3631 (redactLocalValidationPaths), and bin/loopover-mcp.js:3948-3972 (sanitizeDiagnosticText) are three separately-maintained implementations of the same underlying concept — redacting a local filesystem path before it reaches API/terminal output — using different mechanisms (a generic absolute-path regex heuristic vs. exact-known-path string substitution) and, as the sibling (-prefix bug issue in this same file shows, different correctness.
Requirements
- After the sibling
(-prefix regex fix lands (see the companion issue), consolidate these three into one shared, single-tested path-redaction helper that all three current call sites use.
- Preserve whichever mechanism (regex heuristic vs. exact substitution) is actually needed at each call site — if
sanitizeDiagnosticText's exact-substitution approach solves a different problem (redacting a KNOWN path vs. detecting an unknown one in free text), keep both approaches available as named functions in the one consolidated module rather than forcing a single mechanism that doesn't fit all three use cases.
Test Coverage Requirements
99%+ Codecov patch coverage; existing tests for all three original call sites must continue passing against the consolidated module.
Deliverables
Expected Outcome
A future fix to path-redaction logic (like the sibling (-prefix bug) only needs to happen once.
Links & Resources
packages/loopover-mcp/lib/local-branch.js:214-220, bin/loopover-mcp.js:3628-3631,3948-3972
- The companion
(-prefix regex fix issue (land first, then consolidate)
Context
packages/loopover-mcp/lib/local-branch.js:214-220(redactLocalPath),packages/loopover-mcp/bin/loopover-mcp.js:3628-3631(redactLocalValidationPaths), andbin/loopover-mcp.js:3948-3972(sanitizeDiagnosticText) are three separately-maintained implementations of the same underlying concept — redacting a local filesystem path before it reaches API/terminal output — using different mechanisms (a generic absolute-path regex heuristic vs. exact-known-path string substitution) and, as the sibling(-prefix bug issue in this same file shows, different correctness.Requirements
(-prefix regex fix lands (see the companion issue), consolidate these three into one shared, single-tested path-redaction helper that all three current call sites use.sanitizeDiagnosticText's exact-substitution approach solves a different problem (redacting a KNOWN path vs. detecting an unknown one in free text), keep both approaches available as named functions in the one consolidated module rather than forcing a single mechanism that doesn't fit all three use cases.Test Coverage Requirements
99%+ Codecov patch coverage; existing tests for all three original call sites must continue passing against the consolidated module.
Deliverables
Expected Outcome
A future fix to path-redaction logic (like the sibling
(-prefix bug) only needs to happen once.Links & Resources
packages/loopover-mcp/lib/local-branch.js:214-220,bin/loopover-mcp.js:3628-3631,3948-3972(-prefix regex fix issue (land first, then consolidate)