README Source History Refs Reviews Compare Notes Search Review guide Stand up a throwaway CI to un-gate cross-build and the arch rule 577b55311f0d24159b16fe7ec2e2e6b844977a07
Claude <noreply@anthropic.com > · 17 Jul 2026
SSH signature · not checked
Browse files Compare with HEAD
Two Campaign 7 claims — §14's cross-build matrix and §11's arch-gate — were
marked tooling-gated because the local sandbox has no cross toolchain and no
cargo-pup. Asserting them on faith is exactly the kind of unvalidated boundary
the prototype policy exists to catch, so this stands up a real GitHub Actions
run that exercises them on hardware that has the tools.
The workflow cross-compiles a bin pulling the two heaviest native trees
(vendored LuaJIT via mlua, gix) to the musl and windows-gnu triples, builds the
same bin natively on the three required OS runners, and enforces a forbidden
wcore->wai edge — hard via a stable `cargo metadata` gate, best-effort via
cargo-pup so its real schema outcome is captured rather than guessed. It also
times a cold build+test of every prototype crate to seed the §13.1 sub-budget.
Deliberately temporary: it targets the prototype crates because no production
crate exists yet, and is deleted once its evidence lands. Surface:
prototypes/p34-ci-pipeline and .github/workflows/ci-prototype.yml.
Changed files (15) Diff layout Auto Unified Split
.github/workflows/ci-prototype.yml Added new file mode 100644+125 / −0 text lines
9 + branches : ["claude/specs-progress-n5u27n" ]11 + - ".github/workflows/ci-prototype.yml" 12 + - "prototypes/p34-ci-pipeline/**" 13 + workflow_dispatch : {}22 + runs-on : ubuntu-latest 24 + - uses : actions/checkout@v4 26 + run : rustup default stable && rustc -V && cargo -V 27 + - name : build + test each prototype, timed 29 + echo "## Prototype cold build+test (§13.1)" >> "$GITHUB_STEP_SUMMARY" 30 + echo "| crate | build+test | seconds |" >> "$GITHUB_STEP_SUMMARY" 31 + echo "|-------|-----------|---------|" >> "$GITHUB_STEP_SUMMARY" 33 + for d in prototypes/p*/; do 34 + name=$(basename "$d") 35 + [ -f "$d/Cargo.toml" ] || continue 37 + if cargo test --manifest-path "$d/Cargo.toml" --quiet >/dev/null 2>&1; then 42 + dur=$((SECONDS - start)) 43 + total=$((total + dur)) 44 + echo "| $name | $status | $dur |" >> "$GITHUB_STEP_SUMMARY" 46 + echo "| **total** | | **$total** |" >> "$GITHUB_STEP_SUMMARY" 50 + runs-on : ubuntu-latest 52 + - uses : actions/checkout@v4 53 + - name : toolchain + targets 55 + rustup default stable 56 + rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl x86_64-pc-windows-gnu 57 + - name : zig + cargo-zigbuild 60 + cargo install cargo-zigbuild --locked 61 + - name : cross x86_64-unknown-linux-musl 63 + continue-on-error : true 64 + run : cargo zigbuild --target x86_64-unknown-linux-musl --manifest-path prototypes/p34-ci-pipeline/cross/Cargo.toml 65 + - name : cross aarch64-unknown-linux-musl 67 + continue-on-error : true 68 + run : cargo zigbuild --target aarch64-unknown-linux-musl --manifest-path prototypes/p34-ci-pipeline/cross/Cargo.toml 69 + - name : cross x86_64-pc-windows-gnu 71 + continue-on-error : true 72 + run : cargo zigbuild --target x86_64-pc-windows-gnu --manifest-path prototypes/p34-ci-pipeline/cross/Cargo.toml 73 + - name : per-target summary 75 + echo "## §14 cross-build (mlua vendored + gix)" >> "$GITHUB_STEP_SUMMARY" 76 + echo "| target | result |" >> "$GITHUB_STEP_SUMMARY" 77 + echo "|--------|--------|" >> "$GITHUB_STEP_SUMMARY" 78 + echo "| x86_64-unknown-linux-musl | ${{ steps.musl_x64.outcome }} |" >> "$GITHUB_STEP_SUMMARY" 79 + echo "| aarch64-unknown-linux-musl | ${{ steps.musl_arm.outcome }} |" >> "$GITHUB_STEP_SUMMARY" 80 + echo "| x86_64-pc-windows-gnu | ${{ steps.win_gnu.outcome }} |" >> "$GITHUB_STEP_SUMMARY" 88 + os : [ubuntu-latest , macos-latest , windows-latest ]89 + runs-on : ${{ matrix.os }} 91 + - uses : actions/checkout@v4 92 + - run : rustup default stable 93 + - name : build + run cross bin natively 94 + run : cargo run --manifest-path prototypes/p34-ci-pipeline/cross/Cargo.toml 99 + runs-on : ubuntu-latest 102 + working-directory : prototypes/p34-ci-pipeline/archgate 104 + - uses : actions/checkout@v4 105 + - run : rustup default stable 106 + - name : metadata gate PASSES the legal graph 107 + run : python3 gate.py 108 + - name : metadata gate FAILS once the forbidden edge is injected 110 + cp wcore/Cargo.toml /tmp/wcore.bak 111 + printf 'wai = { path = "../wai" }\n' >> wcore/Cargo.toml 112 + if python3 gate.py; then 113 + echo "BUG: gate passed an illegal graph"; cp /tmp/wcore.bak wcore/Cargo.toml; exit 1 115 + cp /tmp/wcore.bak wcore/Cargo.toml 116 + echo "gate correctly rejected the injected wcore->wai edge" 117 + - name : cargo-pup on pinned nightly (best-effort P32 probe) 119 + continue-on-error : true 121 + rustup toolchain install nightly-2026-01-22 --profile minimal || rustup toolchain install nightly --profile minimal 122 + cargo +nightly-2026-01-22 install cargo-pup --locked || cargo install cargo-pup --locked 123 + cargo +nightly-2026-01-22 pup || cargo pup 125 + run : echo "cargo-pup probe outcome: : ${{ steps.pup.outcome }}" >> "$GITHUB_STEP_SUMMARY" prototypes/p34-ci-pipeline/NOTES.md Added new file mode 100644+24 / −0 text lines
3 + One prototype, three SPEC claims that only a real CI toolchain can settle:5 + - **§14 cross-build** (was P30, tooling-gated): does the heavy native tree6 + (vendored LuaJIT via `mlua`, `gix`) cross-compile to the required musl and7 + Windows triples through `cargo-zigbuild`? `cross/` is a minimal bin pulling8 + those deps; the `cross-build` job attempts the §14 matrix and reports the9 + first per-target link/build error.10 + - **§11 arch-gate** (was P32, tooling-gated): can `cargo-pup` on the pinned11 + nightly express and enforce a forbidden inter-crate edge? `archgate/` is a12 + tiny 3-crate workspace with a `pup.ron` forbidding `wcore -> wai`. The job13 + proves the gate PASSES the legal graph and FAILS once the edge is injected.14 + The same job runs the stable-metadata fallback (`§3.5 xtask arch`) so §11 has15 + an enforcement path even if `cargo-pup` proves unusable.16 + - **§13.1 cold-build sub-budget + §17.10 hermeticity**: the `prototypes` job17 + builds and tests every existing prototype crate on a clean runner and records18 + per-crate wall-clock — the first real cold-build numbers the §13.1 budget is19 + meant to be seeded from, and a check that the mocked-everything test policy20 + actually runs green with no TTY / no network.22 + The workflow lives at `.github/workflows/ci-prototype.yml`. It is temporary23 + evidence, not the production pipeline: it targets the prototype crates because24 + no production crate exists yet (spec/planning phase). Result block: `../PLAN.md`.prototypes/p34-ci-pipeline/archgate/Cargo.lock Added new file mode 100644+19 / −0 text lines
prototypes/p34-ci-pipeline/archgate/Cargo.toml Added new file mode 100644+8 / −0 text lines
8 + members = ["wcore" , "wai" , "wharness" ]prototypes/p34-ci-pipeline/archgate/gate.py Added new file mode 100644+39 / −0 text lines
13 + FORBIDDEN = [("wcore" , "wai" )] 17 + out = subprocess.run(18 + ["cargo" , "metadata" , "--format-version=1" , "--no-deps" ],19 + capture_output= True , text= True , check= True ,21 + meta = json.loads(out)22 + by_name = {p["name" ]: p for p in meta["packages" ]}24 + for src, dst in FORBIDDEN:25 + pkg = by_name.get(src)28 + if any (d["name" ] == dst for d in pkg["dependencies" ]):29 + violations.append((src, dst))31 + for s, d in violations:32 + print (f "ARCH VIOLATION: {s} -> {d} is forbidden by §11" , file= sys.stderr)34 + print ("arch gate clean: no forbidden inter-crate edges" )38 + if __name__ == "__main__" :prototypes/p34-ci-pipeline/archgate/pup.ron Added new file mode 100644+16 / −0 text lines
1 + // Best-effort cargo-pup config expressing the §11 forbidden edge wcore -> wai.2 + // P32's open question is exactly whether cargo-pup's schema can state this; the3 + // CI job runs pup as `continue-on-error` and captures the real outcome, while4 + // the stable-metadata fallback gate (§3.5) is the hard assertion. If this RON5 + // shape is wrong, that error IS the evidence that §11 should lean on the6 + // metadata gate rather than the nightly source lint.10 + name: "core-must-not-depend-on-ai",12 + (from: "wcore", to: "wai"),prototypes/p34-ci-pipeline/archgate/wai/Cargo.toml Added new file mode 100644+6 / −0 text lines
prototypes/p34-ci-pipeline/archgate/wai/src/lib.rs Added new file mode 100644+1 / −0 text lines
1 + pub fn ai_marker () -> &'static str { "wai" }prototypes/p34-ci-pipeline/archgate/wcore/Cargo.toml Added new file mode 100644+7 / −0 text lines
prototypes/p34-ci-pipeline/archgate/wcore/src/lib.rs Added new file mode 100644+1 / −0 text lines
1 + pub fn core_marker () -> &'static str { "wcore" }prototypes/p34-ci-pipeline/archgate/wharness/Cargo.toml Added new file mode 100644+9 / −0 text lines
8 + wcore = { path = "../wcore" }9 + wai = { path = "../wai" }prototypes/p34-ci-pipeline/archgate/wharness/src/lib.rs Added new file mode 100644+1 / −0 text lines
1 + pub fn wire () -> String { format! ("{}+{}" , wcore::core_marker(), wai::ai_marker()) }prototypes/p34-ci-pipeline/cross/Cargo.toml Added new file mode 100644+13 / −0 text lines
12 + mlua = { version = "0.10" , features = ["luajit" , "vendored" ] }13 + gix = { version = "0.85" , default-features = false , features = ["blame" , "revision" , "sha1" ] }prototypes/p34-ci-pipeline/cross/src/main.rs Added new file mode 100644+16 / −0 text lines
6 + let lua = mlua::Lua::new();8 + .load ("return _VERSION .. ' ok'" )10 + .expect ("luajit eval" );11 + println! ("lua: {v}" );14 + let oid = gix::hash::ObjectId::empty_blob(gix::hash::Kind::Sha1);15 + println! ("gix empty-blob oid: {oid}" );