fix(path-detection): right boundary is the segment class, not a trailing separator - #254
fix(path-detection): right boundary is the segment class, not a trailing separator#254kyle-sexton wants to merge 1 commit into
Conversation
…ing separator
The five HPP_* bodies required a separator AFTER the child segment,
which inverted detection both ways in a live consumer incident
(claude-code-plugins#1093): a real bare path value at end of line
("root = C:/Dev/GitHub") was missed, while the space-permitting segment
class let prose satisfy the requirement by greedily consuming words
until a later slash on the same line — a comment was flagged while the
actual violations passed clean.
The classes now exclude whitespace and the double quote and the
mandatory trailing separator is gone: bare values at a natural boundary
(EOL, whitespace, quote) are detected, prose spans cannot match, and a
root with no child segment still never matches. The old bare-root
non-match pins are deliberately flipped — that design's only rationale
was prose safety, which the whitespace-excluding class now provides
without the false-negative cost.
Consumer note: the guardrails driver in claude-code-plugins already
carries the identical body file (claude-code-plugins#1095) plus a
bare-form update to its /Users/Shared exclusion stage; medley's
hook-layer driver has the same Shared exclusion shape and needs the
same one-line follow-up when this syncs. ci-workflows' action driver
has no affected exclusion stage.
Suite 34/0; shellcheck clean.
Co-Authored-By: Claude Fable 5 (200k context) <noreply@anthropic.com>
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
|
Warning Automated review did not complete — this is an infrastructure failure, not a review verdict. Treat any Claude comment on this PR (including a placeholder like "I'll analyze this and get back to you") as incomplete, not "no findings."
Re-running the job, or pushing a new commit, will retry the review. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4105843e36
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
🔒 babysit-prs lane claiming this PR for on-branch fix work this cycle (amendment-round: 16, safe tier). Will fix clear branch-owned findings and push; will not resolve threads or merge (safe tier). |
Summary
The five
HPP_*bodies required a separator AFTER the child segment, which inverted detection both ways in a live consumer incident (melodic-software/claude-code-plugins#1093):root = <drive>:/Dev/GitHub) has no trailing separator and was missed — a false negative on exactly the config-value shape the bodies exist to catch.Fix: the segment classes now exclude whitespace and the double quote, and the mandatory trailing separator is gone. Bare values at a natural boundary (EOL, whitespace, quote) are detected; prose spans cannot match (at least one non-space child character must follow the root); a root with NO child segment (
C:\Users, a loneD:/repos/) still never matches.Deliberately flipped pins
machine-path-patterns.test.shpinned "bare roots stay clean" as a regression guard. Those pins are flipped, not worked around: that design's only stated rationale was prose safety, which the whitespace-excluding class now provides without the false-negative cost. New pins cover both directions of the old inversion (bare values must flag; prose spans must not — including a span-equality assertion that the prose line's match is the path token itself, never a greedy span). README updated to match (cross-doc reconciliation done in-PR; no other doc references the old boundary semantics).Consumer impact (manifest targets)
Semantic widening reaches all three mapped targets on next sync — bare home/checkout values will start flagging:
path-detection-guardrails): already carries the identical body file plus a bare-form update to its/Users/Sharedexclusion stage — fix(guardrails): machine-path right boundary — segment class, not trailing separator claude-code-plugins#1095. Local and upstream copies are byte-identical.path-detection-tools): its hook-layer driver has the same/Users/Shared/exclusion shape (tools/shared/path-detection/hardcoded-path-patterns.sh) and needs the same one-line bare-form follow-up when this syncs.path-detection-action): no affected exclusion stage found incheck-machine-specific-paths.sh.Verification
components/path-detection/machine-path-patterns.test.sh34/0SC1003disable became unnecessary — no trailing backslash remains)🤖 Generated with Claude Code
Related
No linked issue — the driving incident is tracked downstream: melodic-software/claude-code-plugins#1093 (consumer bug report), fixed there by melodic-software/claude-code-plugins#1095 with this component change mirrored byte-identically. Prior art: #250 (checkout-root broadening from the same consumer chain).