Open
Conversation
This is now in the project-local settings file.
Apply consistent pattern for pre-compare key normalization to handle both hyphenated and underscored variants, matching the approach used for package_dirs. This improves robustness of config key canonicalization. Resolves: #18
Update all code comments and docstrings to consistently use "pre-compare transforms" (hyphenated) when referring to the feature conceptually, while `pre_compare` (underscored) continues to be used for the actual config key and code elements. This improves clarity between user-facing feature names and internal implementation details. Fixes: #16 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Transforms intentionally use a hardcoded dict rather than the plugin architecture (runners/fixtures). They are core comparison utilities with no current extensibility need. This decision is now documented with a migration path if custom transforms become necessary in the future. Resolves: ARC-6
Introduces a `pre-compare` frontmatter option that normalizes test output before comparison, allowing tests with non-deterministic ordering to pass reliably. Usage in TQL/shell/Python tests: --- pre-compare: [sort] --- Or in test.yaml for directory-level configuration: pre-compare: [sort] The initial transform is `sort`, which sorts output lines lexicographically. Transforms apply only at comparison time - baselines store original output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
a6eac94 to
bc34fbb
Compare
3 tasks
Mypy correctly identifies statements after _raise_config_error() calls as unreachable since the function is typed as NoReturn. Removed these dead statements. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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
This PR addresses code review feedback on the pre-compare feature for normalizing test output before comparison with baselines. All 159 tests pass with these changes.
Key changes:
apply_pre_comparea public API for use by runnersArchitecture
The pre-compare feature transforms both actual output and baseline expectations before comparison, allowing tests to handle non-deterministic output like unordered result sets. Transforms only affect comparison—baseline files remain unchanged on disk and
--updatecontinues to store original output.Test Coverage
Related PRs
🤖 Generated with Claude Code