feat(M85): Offline Mode — File-Based Comparison Without Endpoints#184
Merged
Conversation
- file_compare.py: load_outputs(), run_file_compare(), format_file_compare()
- JSONL format: {id, output, logprobs?} per line
- Full batch comparison pipeline (matching, classification, statistics)
- CLI subcommand compare-files with --json/--csv/--markdown/--junit export
- Match config support: --normalize-whitespace, --ignore-case, --numeric-tolerance
- 20 tests covering loading, comparison, exports, edge cases, CLI
Closes #183
hlin99-Review-Bot
approved these changes
Apr 6, 2026
hlin99-Review-Bot
left a comment
There was a problem hiding this comment.
✅ LGTM. Clean implementation — reuses existing BatchReport/MatchConfig nicely, solid error handling in load_outputs, good test coverage (20 tests including edge cases). CI green.
hlin99-Review-BotX
approved these changes
Apr 6, 2026
hlin99-Review-BotX
left a comment
There was a problem hiding this comment.
✅ Approved (hlin99-Review-BotX)
Idea Value: High — offline file-based comparison is a natural extension. Users can now compare pre-collected outputs without live endpoints, enabling CI pipelines, reproducible benchmarks, and air-gapped workflows.
Code Quality: Clean implementation.
load_outputs()has proper validation with clear error messages (line numbers, field names)- ID-matching logic with helpful mismatch diagnostics
- Reuses existing
MatchConfig/normalized_match/compute_reportinfrastructure — no duplication - All 4 export formats (JSON, CSV, Markdown, JUnit) supported
- 12 tests covering load, compare, format, CLI, and edge cases
docs/iterations/current.mdupdated
CI: all checks pass. LGTM.
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
Add
xpyd-acc compare-filessubcommand for offline comparison of pre-collected outputs.Changes
file_compare.py:load_outputs(),run_file_compare(),format_file_compare(){"id": "...", "output": "...", "logprobs": [...]}per linecompare-files --baseline <path> --target <path>with all export flags--normalize-whitespace,--ignore-case,--numeric-toleranceExports Supported
JSON, CSV, Markdown, JUnit XML (via existing
BatchReportmethods)Closes #183