Skip to content

Fix incremental query bug and improve marker handling#1

Merged
maynardflies merged 16 commits intomasterfrom
fix/incremental-query-overwrite
Jan 19, 2026
Merged

Fix incremental query bug and improve marker handling#1
maynardflies merged 16 commits intomasterfrom
fix/incremental-query-overwrite

Conversation

@maynardflies
Copy link
Member

@maynardflies maynardflies commented Jan 15, 2026

Summary

This PR fixes critical bugs in incremental query mode and significantly expands test coverage for the 0.0.3 release.

Changes

Bug Fixes

  • Fix incremental query overwrite bug - Results now correctly append to existing files instead of overwriting them
  • Fix CETUS_DATA_DIR env var not being respected - Marker storage now properly respects the environment variable
  • Fix flaky E2E test - Added --no-marker to nonexistent directory test to ensure consistent behavior

New E2E Tests (122 total tests)

Added comprehensive test coverage including:

  • Alert results output formats - CSV and JSONL export to file
  • Streaming on alerting index - Stdout and file output modes
  • Config file corruption handling - Malformed TOML and empty file recovery
  • Alerts list to file - CSV and JSONL export
  • Output prefix with --no-marker - Combined flag behavior
  • Backtest with streaming and output prefix - Complex workflow testing

Improvements

  • Separate marker modes - Clearer separation between direct mode (stdout, no markers) and collector mode (file output with markers)
  • README updates - Documentation for the new operating modes

CI/CD

  • Run tests on all branch pushes - CI now provides feedback on feature branches before merging
  • Skip slow tests - --media all tests marked as skip to prevent CI timeouts

Housekeeping

  • Add tmpclaude-* to gitignore
  • Remove temp files
  • Fix E2E test for prefix mode (add --format jsonl)

Testing

  • All unit tests pass (319 passed)
  • All E2E tests pass (118 passed, 3 skipped)
  • Manual testing of CLI functionality ahead of 0.0.3 release

Test Categories (122 total)

Category Tests
Query endpoints 4
Streaming 2
Alerts API 2
Async methods 2
CLI commands 4
File output modes 4
Incremental queries 2
Markers management 5
Error handling 4
Edge cases 6
Alert operations 8
Config validation 4
Output formats 8
And more... 67

Breaking Changes

None - existing CLI usage remains compatible.

maynardflies and others added 9 commits January 14, 2026 11:59
Signed-off-by: Greg Olmstead <greg@nubelo.io>
Signed-off-by: Greg Olmstead <greg@nubelo.io>
Signed-off-by: Greg Olmstead <greg@nubelo.io>
Signed-off-by: Greg Olmstead <greg@nubelo.io>
Previously tests only ran on main/master pushes. Now runs on any branch
push to provide CI feedback on feature branches before merging.
@maynardflies maynardflies self-assigned this Jan 15, 2026
@maynardflies maynardflies changed the title Fix/incremental query overwrite Fix incremental query bug and improve marker handling Jan 15, 2026
@maynardflies maynardflies marked this pull request as draft January 15, 2026 13:53
maynardflies and others added 4 commits January 15, 2026 15:15
New test coverage:
- CLI version flag (--version)
- Markers list/clear commands
- Config path command
- Alert results with non-existent ID (404 handling)
- Alert backtest with non-existent ID (404 handling)
- Connection error handling (invalid host)
- Empty result handling (queries returning 0 results)

Test count: 21 -> 31 tests
Signed-off-by: Greg Olmstead <greg@sparkits.ca>
Signed-off-by: Greg Olmstead <greg@sparkits.ca>
Signed-off-by: Greg Olmstead <greg@sparkits.ca>
@maynardflies maynardflies marked this pull request as ready for review January 18, 2026 23:52
Signed-off-by: Greg Olmstead <greg@sparkits.ca>
Signed-off-by: Greg Olmstead <greg@sparkits.ca>
Signed-off-by: Greg Olmstead <greg@sparkits.ca>
@maynardflies maynardflies merged commit d57f489 into master Jan 19, 2026
30 checks passed
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