Repository navigation
Closed
Description
Problem
The linker is intentionally dependency-constrained, but CI currently has no guard against an agent adding a new direct, development, build, or transitive Rust crate while implementing logging or other features.
Proposed check
- Commit a machine-readable baseline of direct manifest dependency edges and resolved crate identities.
- Add a CI script that compares the current metadata and lockfile graph with that baseline.
- Allow version changes only when they do not introduce a new crate identity; fail on every newly introduced direct or transitive crate.
- Protect baseline updates through developer review/ownership so an agent cannot approve its own dependency addition.
- Keep the check deterministic, offline after dependency metadata is available, and test it with fixtures for direct, dev, build, feature-gated, target-specific, and transitive additions.
Required failure message
New Rust dependency detected: <crate>.
Adding crates to the reld linker requires explicit developer approval.
Agents must not update the dependency baseline to bypass this check.
Use the standard library or an already-approved dependency, or obtain developer approval and update the baseline in the same reviewed change.
Acceptance criteria
- Pull requests fail when a manifest gains any dependency kind without a reviewed baseline update.
- Pull requests fail when a lockfile change introduces a new transitive crate identity.
- Existing dependency version updates that introduce no new identity remain possible.
- The failure output lists the added dependency and gives the explicit developer-approval guidance above.
- DESIGN.md and AGENTS.md link to or describe the same policy.
Judgment calls
- Treat target-specific and feature-gated dependencies as dependencies even when the current host does not select them.
- Track both direct edges and resolved identities: either view alone misses meaningful graph expansion.
- Do not let automated agents regenerate the baseline as a routine fix; a developer must explicitly approve the new crate.
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(diagnostics): colorize native diagnostics behind one helper (rel…
zackees commentedon Sep 17, 2026
Closing: the acceptance list is met and the guard is proven in production use.
ci/dependency-baseline.jsonrecords bothdirect_edges(per-manifest, per-kind, per-target) andresolved_crates(name|version|source|checksum).ci/check_dependencies.py, wired into thehygienejob ofci.yml("Enforce approved Rust dependency graph").Cargo.lockonly.ci/tests/test_dependency_policy.pycovers the current graph, the CI wiring, every dependency kind and target section, new direct and transitive crates, and same-name version/source substitution.Proven twice in real use this week: it blocked
windows-sysin reld#144 until the owner approved it explicitly, and it accepted the approved edge only once the baseline was updated in the same PR. It also caught the version-string churn when[workspace.package].versionmoved off0.0.0in reld#148.Tracked in the burn-down meta #153 (Wave 0).