Enforce graph-checkable dependency invariants with cargo-deny #152
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier#152
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The dependency invariants in
ARCHITECTURE.md("Invariants" section) arecurrently upheld only by review. The graph-checkable ones could be asserted
mechanically with
cargo-deny(or per-package workspace lints), so a violatinguse/dependency fails CI instead of slipping past a reviewer.Invariants worth enforcing
Expressible from the dependency graph alone:
domaindepends on no other Vernier crate, and on neitheraxumnorsqlx.configdepends on no other Vernier crate and pulls in no domain logic or ports.apalis/apalis-sqlappear only ininfraandserver.weborserver).Out of scope
"Persistence behind ports" (
webperforms no database access) is notgraph-checkable:
web -> infraputssqlxin web's transitive tree, so nocargo-denyban can distinguish a legitimate transitive presence from a straydirect query. That one stays a review-only rule.
Suggested approach
deny.tomlwith[bans]entries scoped per package, or use[workspace.lints]/[package.metadata]-driven bans.cimise task.ARCHITECTURE.mdshould note the enforcement.