Skip to content

refactor: extract preflight-check helpers + fix false-positive file path matching - #24

Closed
TerminalGravity wants to merge 1 commit into
mainfrom
fix/preflight-check-helpers
Closed

refactor: extract preflight-check helpers + fix false-positive file path matching#24
TerminalGravity wants to merge 1 commit into
mainfrom
fix/preflight-check-helpers

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

What

  • Extracted extractFilePaths, detectAmbiguity, estimateComplexity, splitSubtasks from preflight-check.ts into src/lib/preflight-helpers.ts
  • Fixed bug: extractFilePaths was matching version strings (v3.2.0), abbreviations (e.g., i.e.), and framework names (node.js) as file paths
  • Added extension allowlist to reduce false positives
  • 18 new tests covering all extracted helpers

Why

The helpers were untestable as private functions. The file path regex was producing false positives that could confuse triage (e.g. v3.2.0 being treated as a referenced file → bogus 'file not found' warnings).

All 61 tests pass ✅

…e-positive file path matching

- Extract extractFilePaths, detectAmbiguity, estimateComplexity, splitSubtasks
  into src/lib/preflight-helpers.ts for testability
- Fix extractFilePaths matching version strings (v3.2.0), abbreviations (e.g.),
  and framework names (node.js) as file paths
- Add allowlist of real file extensions to reduce false positives
- Add 18 new tests in tests/lib/preflight-helpers.test.ts
- All 61 tests pass
@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Superseded by #29 which consolidates this work with additional improvements. Closing in favor of that PR.

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