forked from EduCraft/curriculum-project-hub
3f9b60f692
The spec/ Lean semantic master had no conformance gate, no codegen, and no CI tie to implementations — alignment was carried entirely by human review, the same mechanism that carries the ADRs. In practice the ADRs plus greppable code comments were already the load-bearing artifacts, so spec/ was the most expensive kind of stale documentation. - delete spec/ and the spec-check CI workflow - README: constitution rewritten around ADRs as decision truth - AGENTS.md/CLAUDE.md: discipline re-anchored (new decisions -> new ADR, never rewrite ADR history; supersede instead) - code comments: re-anchor 'Mirrors Spec.X' invariants to ADR numbers (cph-diag, cph-check, cph-model, hub runner/capacity/org, prisma) - leave ADR bodies and .scratch audit snapshots untouched (history); fix live references in open readiness tickets
62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
name: checker check
|
|
|
|
# Builds and lints the Rust implementation crates under crates/ (the rule-based
|
|
# lesson checker).
|
|
#
|
|
# This is an INTERNAL gate on the implementation's own health
|
|
# (does it build, pass its tests, satisfy clippy + rustfmt?). There is no
|
|
# decision-to-implementation conformance gate — implementations align to the
|
|
# ADRs by human review, not by CI. See the repo README.
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
checker-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
# Keep local rustup, rustfmt output, clippy, and CI on one reproducible
|
|
# compiler release. Update this together with rust-toolchain.toml.
|
|
- name: Install Rust toolchain (1.92.0 + clippy + rustfmt)
|
|
uses: dtolnay/rust-toolchain@1.92.0
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo registry + build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
|
|
restore-keys: |
|
|
cargo-${{ runner.os }}-
|
|
|
|
- name: Install cargo-audit 0.22.2
|
|
run: cargo install cargo-audit --version 0.22.2 --locked
|
|
|
|
- name: Audit Rust vulnerabilities and unsoundness
|
|
run: cargo audit --deny unsound
|
|
|
|
# Fonts for typst compilation (WU-4 onward): the engineering files are
|
|
# CJK-heavy, so the compile-check / build tests need a CJK font present.
|
|
# Harmless before those crates exist.
|
|
- name: Install CJK fonts
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y fonts-noto-cjk
|
|
|
|
- name: Format check
|
|
run: cargo fmt --all --check
|
|
|
|
- name: Clippy (deny warnings)
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --all-features --workspace
|