Files
pbakaus_impeccable/tests
42be79eab5 Fix monorepo target-selection edge cases from #213 review (#282)
Two Cursor Bugbot Medium findings on the merged monorepo context PR:

- Excluded packages still listed: discoverTargetCandidates added every glob
  match but never applied negated workspace patterns, so an excluded package
  (e.g. "!packages/internal") showed up as a selectable target even though
  resolveWorkspaceProjectRoot sends it back to the repo root. Now filtered
  with the same isExcludedByWorkspacePattern check the resolver uses.
- Empty app list blocks root: resolveTargetSelection returned
  TARGET_SELECTION_REQUIRED whenever projectRoot === repoRoot, even with zero
  discoverable child apps (e.g. `workspaces: ["."]`), leaving an unanswerable
  prompt. It now returns null (use the repo root as the project) when there
  are no candidates.

Also documents two Greptile P2 clarity notes (the four contextSourceStatus
labels incl. the dual meaning of 'fallback', and the deliberate
isMonorepoRoot-before-hasGitBoundary ordering in findMonorepoRoot).

Adds regression tests for both behaviors.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 07:59:56 -07:00
..