Repository navigation
test: daemon resilience and ingest pipeline correctness (#1735, #1736) - #1741
Conversation
) Full-pipeline replay, edge case corpus, provider contracts. 68 new tests. Regression coverage for #1617. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughThis PR introduces substantial test coverage expansion alongside targeted production refactoring: core message query logic now uses sort_key epoch timestamps for timing, MCP tools standardize error responses, the CLI context command wires via lazy group dispatch, mutation testing migrates to Nix, and four new test modules comprehensively validate parser contracts, corpus edge cases, ingest pipeline determinism, and daemon failure recovery. ChangesProduction Code Changes and Wiring
Comprehensive Test Suite
Build System and Workflow Updates
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
SIGKILL recovery, WAL checkpoint, memory pressure, large sessions, concurrent access safety. 5 tests, all pass in 25s. Co-Authored-By: Claude Opus 4.7 <[email protected]>
… broken link - Distinguish transient SQLite errors from permanent ones in daemon helpers - Fix UnboundLocalError in _table_row_count - Remove merge conflict markers from mutation-testing.yml - Fix broken README link to deleted verification-lab.md Co-Authored-By: Claude Opus 4.7 <[email protected]>
Findings addressed: - #5: SIGKILL test uses min_count=N_SESSIONS*MESSAGES//2 not 1, so kill lands during active ingestion. - #6: VmRSS replaced with VmPeak (high-water mark) so the memory assertion measures peak rather than post-cleanup RSS. - #7: _wait_for_daemon_ready uses proc.poll() instead of os.kill(pid, 0), avoiding PID-reuse TOCTOU. SIGKILL via raw PID is kept where proc.poll() guards it. - #8: _has_systemd_scope() memoised to avoid repeated fork+exec at module-load / collection time. - #9: Dead assert snap1["session_profiles"] >= 0 replaced with explicit == 0 assertion documenting daemon-only materialization. - #10: _parse_code_records (private API) replaced with parse_payload("claude-code", ...) in test_provider_contracts and test_corpus_edge_cases. - #11: test_concurrent_access_safety docstring updated to document that --no-api mode tests WAL read-during-write, not daemon API concurrency. - #12: _write_corpus_files dead return value removed; callers iterate corpus_dir directly. - #13: topology-target.yaml regenerated via build-topology-projection. - #14: Stale verification_reports domain entry removed from test-coverage-domains.yaml (all referenced files deleted). Co-Authored-By: Claude Opus 4.7 <[email protected]>
Production bugs: - _query_messages used non-existent columns (id, timestamp, created_at) on real messages table; fixed to use message_id, sort_key - _DETAIL_DEFAULTS swapped summary/full semantics (summary returned full messages, full returned nothing) - Removed SQL injection via f-string column interpolation in _query_work_events - Bare except Exception in embedding fallback path now logs before fall - aggregate_sessions error format now consistent with other MCP tools - find_similar_sessions no longer silently falls back to metadata when embedding explicitly requested Integration: - context CLI command added to _GROUP_ATTRS (same bug as blackboard fix) - Missing _SHORT_HELP entries for context and correlate - Duplicate verify-test-coverage-contracts CommandSpec removed - OTLP test schema updated to match production column names Co-Authored-By: Claude Opus 4.7 <[email protected]>
73 new integration/unit tests. Daemon SIGKILL recovery, WAL checkpoint, memory pressure, large sessions, concurrent safety. Ingest pipeline full replay, edge case corpus, provider contracts with #1617 regression.
Summary by CodeRabbit
New Features
contextsubcommand support in CLI.Bug Fixes
Tests
Chores