Skip to content

feat: capture query parity with asserts + regex capture groups#50

Merged
sleipi merged 2 commits into
mainfrom
feat/48-capture-parity
May 25, 2026
Merged

feat: capture query parity with asserts + regex capture groups#50
sleipi merged 2 commits into
mainfrom
feat/48-capture-parity

Conversation

@sleipi
Copy link
Copy Markdown
Owner

@sleipi sleipi commented May 25, 2026

Closes #48

Changes

  • Refactor types.Capture to structured type (Source, LineNum, Regex)
  • Fix line N capture (was returning full stdout, now extracts Nth line)
  • Add lineCount capture query
  • Add stdout regex /pattern/ and stderr regex /pattern/ captures
  • Validate regex at parse time for both asserts and captures (fail-fast)
  • Add verbose-mode warning when regex capture doesn't match
  • Fix goconst lint issue (matches predicate constant)
  • Update SPEC.md with full capture query documentation
  • Update ROADMAP.md

Scope changes from issue

Removed (not needed):

  • exit capture
  • duration capture

Test coverage

  • Unit tests for ResolveCapture (all paths incl. edge cases)
  • Unit tests for parseCapture (all queries, invalid regex, invalid line number)
  • Unit tests for regex validation in parseAssert
  • Unit tests for executor warning generation
  • Unit tests for verbose display warning rendering
  • E2E tests: all capture queries, line out-of-bounds, warning output in verbose mode

sleipi added 2 commits May 25, 2026 16:39
- Refactor types.Capture to structured type (Source, LineNum, Regex)
- Fix `line N` capture (was returning full stdout, now extracts Nth line)
- Add `lineCount` capture query
- Add `stdout regex /pattern/` and `stderr regex /pattern/` captures
- Validate regex at parse time for both asserts and captures (fail-fast)
- Add verbose-mode warning when regex capture doesn't match
- Update SPEC.md with full capture query documentation
- Update ROADMAP.md

Removed from original issue scope: `exit` and `duration` captures (not needed).
@sleipi sleipi added the enhancement New feature or request label May 25, 2026
@sleipi sleipi merged commit 0c5b917 into main May 25, 2026
4 checks passed
@sleipi sleipi deleted the feat/48-capture-parity branch May 25, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: capture query parity with asserts + regex capture groups

1 participant