Skip to content

chore(ci): scaffold Rust + static-analysis gates before implementation - #5

Merged
adust09 merged 6 commits into
mainfrom
ci/static-analysis-scaffold
Jul 23, 2026
Merged

chore(ci): scaffold Rust + static-analysis gates before implementation#5
adust09 merged 6 commits into
mainfrom
ci/static-analysis-scaffold

Conversation

@adust09

@adust09 adust09 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Context

Verity is pre-implementation — the only working component is the mdBook docs site, gated by docs.yml. This PR establishes CI and static-test gates now, so the first implementation PR passes through a complete set of checks instead of retrofitting them later.

What this adds

Rust quality gate.github/workflows/rust.yml

  • cargo fmt --check, cargo clippy -D warnings, cargo test, cargo build, path-filtered to Rust paths, with Swatinem/rust-cache.
  • Runs against a minimal verity-types canary crate (one trivial fn + test) so the gate has real code from day one — the first real PR replaces it.
  • Toolchain pinned to 1.94.0 via rust-toolchain.toml (matches the project's "pin the exact version" philosophy, cf. mdBook 0.4.40). Workspace lints: unsafe_code = "deny", clippy::all = warn.

Supply-chain audit

  • cargo-deny (deny.toml: advisories, license allowlist, bans) as a job in rust.yml.
  • .github/dependabot.yml for github-actions + cargo (weekly, grouped).

Docs quality — added to existing docs.yml as a lint job

  • markdownlint (.markdownlint.jsonc) on docs/src (SUMMARY.md excluded — its multiple H1s are mdBook TOC convention).
  • lychee --offline internal/relative link check (deterministic on PRs).

Quality workflow.github/workflows/quality.yml

  • typos repo-wide spell-check on every push/PR (_typos.toml).
  • Weekly online lychee link check (cron) — kept off PRs to avoid flaky external rate-limits.

Secret scanning.github/workflows/secret-scan.yml

  • betterleaks (Gitleaks successor by Gitleaks' original author) via the pinned ghcr.io/betterleaks/betterleaks:v1.3.1 image; --exit-code 1 fails CI on findings.

.gitignore for Rust/Lean build artifacts (/target, .lake/, *.olean).

Out of scope

  • Lean proof CI — the Verified Core (Verity Consensus) lives in a separate repo; its CI belongs there.
  • Repo-meta layer (CODEOWNERS / templates / .editorconfig / docs.yml hardening) — not requested.

adust09 and others added 2 commits May 27, 2026 11:34
Establish CI and static-test gates now, so the first implementation PR passes
through a complete set of checks rather than retrofitting them later.

- Rust quality gate (rust.yml): cargo fmt / clippy -D warnings / test / build
  over a minimal verity-types canary crate; toolchain pinned to 1.94.0,
  Swatinem/rust-cache for speed.
- Supply-chain: cargo-deny (deny.toml) + Dependabot (github-actions + cargo).
- Docs quality: markdownlint + offline lychee link check added to docs.yml.
- Quality workflow: repo-wide typos spell-check + weekly online link check.
- Secret scanning: betterleaks pinned image (secret-scan.yml).
- .gitignore for Rust/Lean build artifacts.

Lean proof CI is intentionally out of scope: the Verified Core (Verity
Consensus) lives in a separate repository.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- secret-scan: inject `safe.directory=/repo` via GIT_CONFIG_* env so betterleaks'
  in-container git accepts the bind-mounted, differently-owned working tree
  (was failing with "detected dubious ownership").
- lychee.toml: drop unsupported `exclude_mail` (mail is excluded by default in
  lychee 0.23) — it broke config parsing and failed the docs link check.
- secret-scan + quality: restrict the `push` trigger to main so feature-branch
  pushes don't double-run alongside the pull_request trigger.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
adust09 added 4 commits June 23, 2026 15:23
Drop Dependabot version updates entirely (github-actions + cargo ecosystems).
Dependency and action update PRs will no longer be auto-opened.
- edition 2021 -> 2024, resolver 2 -> 3 (kickoff toolchain decision)
- pin toolchain to current latest stable 1.97.1 (was 1.94.0, latest at
  PR creation time)
- rename the canary crate verity-types -> verity-consensus: kickoff
  settled on a single starting crate with shared types as a module;
  the ARCHITECTURE.md workspace layout is what it later splits into
- typos: exclude vendored mdbook-mermaid assets (minified JS false
  positives)
- markdownlint: don't treat frontmatter title as the page H1 (it is
  stripped by the preprocessor before rendering) and allow bold
  lead-in labels (MD036)
@adust09
adust09 merged commit cebc8a2 into main Jul 23, 2026
8 checks passed
@adust09
adust09 deleted the ci/static-analysis-scaffold branch July 23, 2026 06:55
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