Skip to content

docs: decompose dragon-curve spec into four spec packets #80

docs: decompose dragon-curve spec into four spec packets

docs: decompose dragon-curve spec into four spec packets #80

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
docs-guard:
name: Docs staleness guard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# Numbered reference docs must not cite crate paths the project removed in
# Packet 69 (slicer-host -> slicer-runtime, slicer-cli deleted) or the
# top-level wit/ deleted in Packet 72. History/status docs are excluded:
# 07_*, DEVIATION_LOG (legitimately describe the rename), and specs/.
- name: Ban stale crate/binary/WIT paths in reference docs
run: |
set -euo pipefail
files=$(ls docs/*.md | grep -Ev 'docs/(07_|DEVIATION_LOG)')
# Dead paths: crates/slicer-host|cli/, slicer_host|cli::, bare `wit/<subdir>
pattern='crates/slicer-(host|cli)/|slicer_(host|cli)::|`wit/(deps|world-|host-api|root)'
if hits=$(grep -REn "$pattern" $files); then
echo "::error::Stale crate/WIT path(s) found in reference docs. Use crates/slicer-runtime, crates/pnp-cli, or crates/slicer-schema/wit/. See docs/00_project_overview.md Code Map."
echo "$hits"
exit 1
fi
echo "OK: no stale crate/WIT paths in numbered reference docs."
- name: Type Check
run: cargo check --workspace
- name: Deviation status + config docs in sync
run: cargo run -q -p xtask -- check-deviations --check
- name: Struct-literal gate
run: cargo run -q -p xtask -- check-literals
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --workspace
- name: Install wasm-tools
uses: taiki-e/install-action@v2
with:
tool: wasm-tools
- name: Build guest WASMs
run: cargo xtask build-guests
- name: Check guest freshness
run: cargo xtask build-guests --check
- name: Test Core (narrow)
run: cargo test -p slicer-runtime --test contract core_module_ir_access_contract_tdd
- name: Test All Crates (not workspace)
run: cargo test -p slicer-runtime && cargo test -p pnp-cli && cargo test -p slicer-helpers
dist-editions:
name: Dist editions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
- name: Install wasm-tools
uses: taiki-e/install-action@v2
with:
tool: wasm-tools
- name: Dist developer edition (debug)
run: cargo xtask dist --edition developer --debug
- name: Dist hybrid edition (debug)
run: cargo xtask dist --edition hybrid --debug
# ADR-0056 disjointness invariant: an edition must never stage an
# external copy of a module it integrates. Verify the staged artifact
# matches the plan for both editions.
- name: Verify edition disjointness invariant
shell: sh
run: |
set -e
for e in developer hybrid; do
cargo xtask dist --edition "$e" --plan > "plan-$e.txt"
for m in $(grep -P '^integrated\t' "plan-$e.txt" | cut -f2); do
if [ -e "target/dist/$e/modules/$m" ]; then
echo "::error::disjointness invariant violated: integrated module '$m' staged externally in edition '$e'"
exit 1
fi
done
staged=$(ls "target/dist/$e/modules" | wc -l)
planned=$(grep -cP '^external\t' "plan-$e.txt")
if [ "$staged" != "$planned" ]; then
echo "::error::disjointness invariant violated: staged module dirs ($staged) != external plan lines ($planned) in edition '$e'"
exit 1
fi
done
echo "OK: disjointness invariant holds for developer and hybrid editions"