Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rust-standard alignment wayfinding map

Destination

Cerebro’s quality gates match ~/Projects/rust-standard: every gate defined exactly once in the justfile, mirrored by lefthook and Woodpecker calling those same targets. The lint table is deny/forbid (not warn), the panic classes are denied in production and permitted in tests, the supply chain has a cargo-deny gate with a declared platform promise, the four test layers run in CI, prose is gated at error level, and commit grammar is enforced. Divergences from the standard exist only where an ADR argues for them.

Notes

  • Standard source: ~/Projects/rust-standard/docs/standard/*.md (overview, toolchain, lints, tasks-and-hooks, testing, prose, supply chain, ci-and-release).
  • Cerebro is a 4-crate workspace on Codeberg, Woodpecker CI, nightly toolchain, Rust 2024, MSRV 1.85. See ADR-0002.
  • Standing preference (AGENTS.md): never commit to main; work in worktrees; rebase before PR; no suppressions that cheat the linter; warnings are fixed at root cause. Every phase lands green under just quality.
  • The full gap analysis (tools present / partial / missing) is in the session that produced ADR-0016/0017/0018; the map below is the executable version.
  • Sequencing principle: config-only gates before mass code edits; mechanical reformatting before the big lint PRs; dated toolchain pin before any deny/forbid flip (nursery/pedantic denies are only safe under a pin).

Decisions so far

Ruled 2026-10-26 via T16: all three accepted with adrs status.

  • ADR-0016, keep adr-tools compatible mode; do NOT migrate to the standard’s NextGen/docs/adr. Links stay hand-written.
  • ADR-0017, refactor XDG config to an injected env so the 14 test unsafe blocks disappear, THEN adopt forbid(unsafe_code). Prerequisite gate for the lint-table phase.
  • ADR-0018, do not adopt cargo-dist’s host/CI layer (GitHub-only, upstream #1781 open); close the platform-promise + cross-check gaps with deny.toml [graph].targets + a Woodpecker cross-check step instead.

Closed task findings:

  • T01, dated pin nightly-2026-09-19 live; just rust-roll-forward bumps from the dist release date (version strings report the commit date, one day behind).
  • T07, nursery deny in cerebro-core is 15 findings; pedantic deny was already enforced by CI’s -D warnings. Correction from T08: the “15 total” undercounted: core’s own failure masked the dependent crates; real volume was ~250, and 136 of those are macro-generated trivial_regex in the cucumber harness.
  • T02, rustfmt.toml + clippy.toml live; one-time import-grouping reflow landed on main via #89 (50 files, mechanical commit).
  • T08, deny/forbid table adopted; clippy is clean without any -D flag. Remaining exceptions by plan: missing_docs (T11), unsafe_code (T12), one scoped test-only trivial_regex allow.
  • T12, Env/ProcessEnv seam in cerebro-core; zero-arg public API kept, tests run on injected maps, forbid(unsafe_code) live. Closes the last hold on the T08 table.
  • T09, panic classes denied workspace-wide; the “~460 backlog” was grep noise (test code + unwrap_or shapes), real production fixes were 9 call sites plus a command-line crate-root print allow and four scoped, reason-carrying test allows. exit/todo/dbg had zero findings.
  • T03, cargo-deny live (just deny, pre-push on graph files, CI deny step). Five advisory fixes taken in-range; three unreachable git2 0.19 unsound advisories ignored with reasons, tracked for retirement by T18.
  • T10, indexing/arithmetic/as_conversions denied workspace-wide; ~169 sites fixed at root cause (saturating math, get-with-default on layout rects, slice patterns, usize::from, chrono checked/signed_duration_since). No per-crate split needed. Measurement lesson: a denied lint in a dependency stops the dependents from being linted at all; measure per crate in dependency order.
  • T05, MD013 off by adopting the standard (the cap only ever fired on GSD-generated AGENTS.md lines); rumdl fmt fixed 119 findings, 3 by hand; gate defined once as just md-lint, wired to lefthook *.md and a Woodpecker md-lint step. Scope drift recorded for T13/T06: rumdl gates README+AGENTS, vale still docs-only.
  • T11, missing_docs denied; 309 findings fixed at declaration sites across all four crates, zero suppressions. cargo doc --workspace now builds clean (three pre-existing private-link findings de-linked along the way). Two new doctest examples for core’s pure functions; the doctest layer runs 3 and passes.
  • T06, the justfile defines every gate once: just ci is fmt-check lint test doctest deny docs, lefthook and the Woodpecker steps call those targets, and the clippy --all-targets drift between hook and CI is gone. nextest is the runner with the ADR 11 cucumber shim landed (415 tests, 0 skipped), .config/nextest.toml records retries = 0 and the sixty-second slow-timeout, and the CI test step drops the redundant separate cucumber line. The dead check-cortex hook (root: "Content/", a directory that does not exist; the gate never ran) and lefthook’s duplicate manual command groups are deleted.
  • T04, nextest against the cucumber binary with no shim errors (exit 104), it never silently greens the binary itself; the ADR-11 shim verified working (76/409 scenarios pass, failures flip red) with two gotchas: no libtest count footer in terse output, and the --ignored list pass must return empty or nextest skips the unit and reports green anyway. Baselines: 415 tests, nextest about 25 seconds vs cargo test about 40 seconds, slowest test 12.6 seconds. Feeds T06’s just test shape; doctest layer mandatory (nextest runs 0 doctests).

Not yet specified (fog)

  • Vale error-level findings count today: the gate moves from warning to error; how many findings that hides (and whether any are real) is unmeasured.
  • Whether .adr-dir legacy marker should stay (ADR-0016 says yes for adr-tools consumers), revisit only if a consumer actually breaks.
  • Whether to pin mdbook-mermaid builds alongside mdbook versions: local mdbook build warns the preprocessor was built against 0.5.0 while 0.5.4 calls it. It predates T06 and is harmless today; unmeasured otherwise.

Out of scope

  • Migrating cerebro to the rust-standard template wholesale (cargo-generate).
  • Changing the four-collector data model (ADR-0003/0015), unrelated to gates.
  • mdBook→other doc engine; mdBook stays (ADR-0004).
  • Criterion/PPU benchmarking beyond the standard’s just bench libtest floor.

Tickets (the frontier)

Open, unblocked tickets are the frontier. A ticket is unblocked when every depends_on entry is status: complete.

Roll-up