chore(fixtures): align Rust fixture editions to main; document the rule#81
Merged
Merged
Conversation
The three pre-existing Rust fixtures (broken-rust, perfect-rust, source-only) were on edition 2021; main is edition 2024. The drift is harmless today because the audits parse fixture sources via tree-sitter and never invoke cargo build, but a fixture lagging the main crate is a silent skew that could mask audit regressions on edition-specific syntax in future. Adds an AGENTS.md note under Testing > Test fixtures explaining: - fixtures are intentionally not workspace members (so Cargo's edition.workspace = true inheritance is unavailable); - every fixture Cargo.toml's edition must be set explicitly and must match the main crate's; - bump every fixture in lockstep when main's edition changes. Surfaced during PR #80 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
PR #80 review surfaced that the three pre-existing Rust fixtures lag the main crate by one edition. This PR aligns them and documents the convention so future fixtures don't drift again.
tests/fixtures/broken-rust/,tests/fixtures/perfect-rust/, andtests/fixtures/source-only/were onedition = "2021". Main isedition = "2024". The audits parse fixture sources via tree-sitter and never invokecargo build, so the drift is harmless today, but a fixture lagging the main crate is a silent skew that could mask audit regressions on edition-specific syntax in future.Why not Cargo workspace inheritance?
Cargo's
field.workspace = truerequires the sub-crate to be a workspace member. The fixtures here are intentionally NOT workspace members. Making them members would havecargo buildfrom the root compile every fixture, and would apply workspace-level lints, dependencies, and profile overrides to them, changing what the audits see. Inheritance was investigated and rejected; documenting the convention inAGENTS.mdis the practical alternative.Type of Change
chore: Maintenance tasks (dependencies, config, etc.)Related Issues/Stories
AGENTS.md > Testing > Test fixturesfor the new convention.Testing
Test Summary:
cargo test: 847 passed, 2 ignored (same baseline as PR fix(code-unwrap): cfg(not(test)) polarity; add missing negative-case tests #80 merge, no regression).cargo clippy --all-targets -- -Dwarnings: clean.test_broken_fixture,test_perfect_fixture,test_source_only_fixture,test_binary_only_fixture): all 4 pass.Files Modified
Modified:
tests/fixtures/broken-rust/Cargo.toml: edition 2021 → 2024.tests/fixtures/perfect-rust/Cargo.toml: edition 2021 → 2024.tests/fixtures/source-only/Cargo.toml: edition 2021 → 2024.AGENTS.md: new "Test fixtures" subsection under "Testing" documenting the lockstep edition rule and the workspace-inheritance non-option.Created:
Renamed:
Deleted:
Breaking Changes
Deployment Notes
Checklist