Add architecture drift ratchets#174
Merged
Merged
Conversation
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
There was a problem hiding this comment.
Pull request overview
Adds an “architecture drift ratchet” to keep oversized Rust modules from growing unintentionally, surfaces a few drift-related metrics in CI output, and starts splitting crates/calciforge/src/commands.rs by extracting command parsing/suggestion helpers into a dedicated submodule with unit tests.
Changes:
- Introduces
scripts/check-architecture-ratchets.rbto enforce per-file Rust line budgets and report counts of watched drift patterns. - Wires the ratchet script into the CI
docsjob. - Extracts command parsing + fuzzy suggestion helpers into
crates/calciforge/src/commands/parser.rsand updatescommands.rsto use it. - Updates
AGENTS.mdand Copilot/Rust review instructions to explicitly call out architecture drift patterns worth flagging.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/check-architecture-ratchets.rb | New CI ratchet enforcing Rust module line budgets + reporting drift pattern counts. |
| crates/calciforge/src/commands/parser.rs | New commands submodule for token/arg parsing and command suggestion, with tests. |
| crates/calciforge/src/commands.rs | Wires in the new parser submodule and removes duplicated helper implementations. |
| AGENTS.md | Adds contributor guidance about large-file budgets and architecture drift patterns. |
| .github/workflows/ci.yml | Runs the architecture ratchet script as part of docs checks. |
| .github/instructions/rust.instructions.md | Adds explicit review guidance around boundary hygiene and owned background work. |
| .github/copilot-instructions.md | Elevates “architecture drift” in review priorities and documents the new ratchet tool. |
36698ac to
fe1309c
Compare
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
commands.rsby moving parser/token helpers intocommands/parser.rswith focused testsStack
issue-151-placeholder-main) because the placeholder PR still touches security-proxy and config files used by the ratchet baseline.Validation
ruby scripts/check-architecture-ratchets.rbruby scripts/check-docs-site.rbcargo fmt --all -- --checkgit diff --check pr-172-latest..HEAD