Skip to content

chore(fixtures): align Rust fixture editions to main; document the rule#81

Merged
brettdavies merged 1 commit into
devfrom
chore/fixture-edition-align-to-main
Jun 4, 2026
Merged

chore(fixtures): align Rust fixture editions to main; document the rule#81
brettdavies merged 1 commit into
devfrom
chore/fixture-edition-align-to-main

Conversation

@brettdavies

Copy link
Copy Markdown
Owner

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/, and tests/fixtures/source-only/ were on edition = "2021". Main is edition = "2024". The audits parse fixture sources via tree-sitter and never invoke cargo 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 = true requires the sub-crate to be a workspace member. The fixtures here are intentionally NOT workspace members. Making them members would have cargo build from 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 in AGENTS.md is the practical alternative.

Type of Change

  • chore: Maintenance tasks (dependencies, config, etc.)

Related Issues/Stories

Testing

  • Existing tests
  • All tests passing

Test Summary:

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:

  • None.

Renamed:

  • None.

Deleted:

  • None.

Breaking Changes

  • No breaking changes

Deployment Notes

  • No special deployment steps required

Checklist

  • Code follows project conventions and style guidelines
  • Commit messages follow Conventional Commits
  • Self-review of code completed
  • Tests added/updated and passing
  • No new warnings or errors introduced
  • Changes are backward compatible

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.
@brettdavies brettdavies merged commit 47aba9a into dev Jun 4, 2026
8 checks passed
@brettdavies brettdavies deleted the chore/fixture-edition-align-to-main branch June 4, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant