Skip to content

fix: isolate lenient rule discovery failures - #219

Open
r4ravi2008 wants to merge 1 commit into
kitproj:mainfrom
r4ravi2008:fix/lenient-discovery-isolation
Open

r4ravi2008 wants to merge 1 commit into
kitproj:mainfrom
r4ravi2008:fix/lenient-discovery-isolation

Conversation

@r4ravi2008

Copy link
Copy Markdown
Contributor

Summary

A parse or expansion error on a lenient search path still stopped the rest of that rule directory's walk. Later sibling rules were never discovered, even after bootstrap isolation in #218.

This change treats a lenient parse or expansion failure the same way as a lenient bootstrap failure: warn, skip only the failing file, and keep walking.

Changes

  • pkg/codingcontext/context.go: on a lenient path, discoverPendingRule errors log skipping rule file after discovery failure and return nil from the walk callback.
  • Isolation tests now expect later siblings (and later search paths) to survive a lenient parse failure.
  • docs/reference/search-paths.md: lenient parse, expand, and bootstrap failures all skip only the failing rule.

Testing

  • go test -race -count=1 ./pkg/codingcontext/
  • TestRun_LenientRuleParseFailurePreservesEarlierRules
  • TestRun_LenientRuleParseFailureDoesNotBlockLaterLenientSearchPath

Line Changes

Category + Added - Deleted
Tests 8 6
Docs 3 5
Main code (pkg/codingcontext) 16 14

Definition of Done

  • Lenient parse/expand failure excludes only the failing rule
  • Later sibling rules in the same directory are still discovered
  • Later lenient search paths are still processed
  • Reviewer approval

A parse or expand error on a lenient path used to stop the directory
walk. Continue past the failing file so later sibling rules are still
discovered.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant