fix: boundary hook parses real-world boundary bullets; doctor accepts n/a (0.15.1) - #10
Merged
Merged
Conversation
…cepts n/a (0.15.1) The edit-boundary hook matched EDIT BOUNDARY entries as whole bullet strings, so a bullet listing several comma-separated paths, or a path followed by a parenthesised note, matched nothing and denied every edit to those files. Entries are now split on commas with a trailing note dropped; brace globs keep their commas and '(group)' path segments are untouched. lcd-doctor ran its placement-vs-glob heuristic on explicit 'n/a' values, giving any project without a test suite a permanent WARN it could not clear. Both found by dogfooding LCD on a real work-item (D-023). Tests first: each fix has a fixture case in tests/test-boundary-check.sh / tests/test-doctor.sh.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fail-safe defects found by dogfooding LCD on a real work-item (private decision log D-023) — both hit while using the plugin, not while reading it.
1. The edit-boundary hook read a boundary differently than people write one
lcd_journal_boundaryemitted each EDIT BOUNDARY bullet as a single entry, and the hook matched that whole string against the edited path. So both of these denied every edit to the files they list:The deny message names the boundary, so the author sees their own path in the list and is told it isn't in the list — with no hint that the format was the problem. It denied two legitimate edits in the work-item that found it.
Entries are now split on commas, and a trailing parenthesised note is dropped. Two things deliberately survive:
{src,lib}/**) keeps its commas — there they are pattern, not separator;(group)path segment (Next.js route groups) is untouched, because a note is only recognised after whitespace.Not addressed here: bash
casecan't match a brace pattern at all, so{src,lib}/**as a boundary entry still matches nothing. That's a pre-existing matching gap, separate from this parsing fix.2.
lcd:doctortreatedn/aas a mistakeA project with no test suite fills the test keys with an explicit
n/a(the shipped doctor fixture already does this foreval:). The placement-vs-glob heuristic ran on those strings anyway and emitted a WARN that no edit could clear — permanent noise for docs/prose/decision-record projects.n/a, with or without a reason after it, now counts as filled in and skips the heuristic.Testing
Tests first, then the fix. New fixture cases in
tests/test-boundary-check.sh(multi-path bullet, annotated entry, brace-glob passthrough) andtests/test-doctor.sh(a fullyn/adocs-only project → 0 FAIL, 0 WARN). Both failed before the change.tests/run.sh→ 10/10 ·claude plugin validate .→ passed.Patch bump to 0.15.1 in
plugin.json+marketplace.json(lockstep), CHANGELOG section added.