Refactor test suite for consistency and maintainability - #54
Closed
wesm wants to merge 4 commits into
Closed
Conversation
… model Use post-filter counts (after pairAndFilter removes empty tool_result messages) for session.MessageCount and UserMessageCount so analytics matches the status bar total. Add postFilterCounts() helper and reorder writeBatch/writeSessionFull to compute filtered messages before upsert. Add "All" time range preset to the analytics date picker. Update Gemini insight model from gemini-3-pro-preview to gemini-3.1-pro-preview. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change ALL_FROM from 2020-01-01 to 1970-01-01 so the "All" date range preset is truly universal regardless of session age. Add integration tests verifying that both writeBatch (SyncAll) and writeSessionFull (SyncSingleSession) persist post-filter message counts when sessions contain empty user+tool_result messages that get removed by pairAndFilter. Add ClaudeToolResultUserJSON helper to testjsonl for constructing user messages with only tool_result content blocks. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Corrupt stored counts and clear file_mtime between SyncAll and SyncSingleSession so the skip logic doesn't short-circuit. This ensures writeSessionFull runs and the assertion verifies it writes correct post-filter counts, not stale values from SyncAll. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Check RowsAffected() == 1 after the UPDATE so a mismatched session ID causes a clear failure instead of a silent no-op. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
roborev: Combined Review (
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
parser_test.go) into per-agent files (claude_parser_test.go,codex_parser_test.go,gemini_parser_test.go)internal/parser/testdata/Test plan
make testpassesmake vetpasses🤖 Generated with Claude Code