repositories / smith

smith

There are many coding harnesses - but this one is fast

owned by bugabinga

Split standing prototype CI from the p34 evidence run, fix the pup recipe

910e4a0f918a31f5b58ac8f44894b9f668685962

Claude <noreply@anthropic.com> ·

SSH signature · not checked

Browse filesCompare with HEAD

The first arch-gate run's "cargo-pup unpublished" verdict was wrong: the crate
is DataDog's `cargo_pup` (underscore), and `cargo install` matches the name
literally rather than normalizing the hyphen the way manifest resolution does,
so `cargo-pup` read as missing. It also needs rust-src/rustc-dev/llvm-tools on
the pinned nightly to link rustc internals. Corrected here; §3.5's two-gate
design needs no change, so PLAN.md's finding is downgraded from a spec defect to
a recipe bug.

The workflow also conflated two concerns. prototypes.yml is now a standing
bit-rot guard that builds+tests every prototype crate and fails on any
regression — the evidence base is cited by the spec and must keep exiting 0.
ci-prototype.yml keeps only the p34-specific cross-build and arch-gate evidence,
path-scoped so it no longer reruns on unrelated prototype edits. Surface: two
files under .github/workflows and the p34 result block.

Changed files (3)

+113 / −61 text lines

Diff layout

.github/workflows/ci-prototype.yml

Modified

+25 / −44 text lines

1# TEMPORARY CI prototype (p34) — evidence for SPEC §14 cross-build, §11
2# arch-gate, and §13.1 cold-build sub-budget. Not the production pipeline:
3# it targets the prototype crates because no production crate exists yet.
4# Delete once its PLAN.md result block is recorded.
1# p34-ci-pipeline evidence run — §14 cross-build and §11 arch-gate. Path-scoped
2# to the p34 dir and this file, so it only runs when that evidence changes, not
3# on every prototype edit (the standing guard is prototypes.yml). Not the
4# production pipeline; it targets prototype fixtures because no production crate
5# exists yet.
56#
6# Note: every cargo *compile* runs with its CWD under prototypes/, because the
7# Every cargo *compile* runs with its CWD under prototypes/, because the
78# prototype cap-lints=warn exemption (prototypes/.cargo/config.toml, §18) is
8# resolved by working directory, not by --manifest-path. Building a prototype
9# from the repo root picks up the root's -D warnings / -D missing_docs policy
10# and fails.
9# resolved by working directory, not by --manifest-path.
1110name: ci-prototype
1312on:
2625 cancel-in-progress: true
2827jobs:
29 # §13.1 cold-build sub-budget + §17.10 hermeticity: build and test every
30 # prototype crate on a clean runner, record per-crate wall-clock.
31 prototypes:
32 runs-on: ubuntu-latest
33 steps:
34 - uses: actions/checkout@v4
35 - name: toolchain
36 run: rustup default stable && rustc -V && cargo -V
37 - name: build + test each prototype, timed
38 run: |
39 echo "## Prototype cold build+test (§13.1)" >> "$GITHUB_STEP_SUMMARY"
40 echo "| crate | build+test | seconds |" >> "$GITHUB_STEP_SUMMARY"
41 echo "|-------|-----------|---------|" >> "$GITHUB_STEP_SUMMARY"
42 total=0
43 for d in prototypes/p*/; do
44 name=$(basename "$d")
45 [ -f "$d/Cargo.toml" ] || continue
46 start=$SECONDS
47 if ( cd "$d" && cargo test --quiet ) >/dev/null 2>&1; then
48 status="ok"
49 else
50 status="FAIL"
51 fi
52 dur=$((SECONDS - start))
53 total=$((total + dur))
54 echo "| $name | $status | $dur |" >> "$GITHUB_STEP_SUMMARY"
55 done
56 echo "| **total** | | **$total** |" >> "$GITHUB_STEP_SUMMARY"
5828 # §14 cross-build (un-gates P30): does the heavy native tree cross-compile?
5929 cross-build:
6030 runs-on: ubuntu-latest
10979 - name: build + run cross bin natively
11080 run: cargo run
112 # §11 arch-gate (un-gates P32): the stable-metadata gate is the hard
113 # assertion; cargo-pup is attempted best-effort as the nightly source gate.
82 # §11 arch-gate (un-gates P32): two gates, exactly as §3.5 specifies.
83 # 1. stable `cargo metadata` gate — always-on boundary enforcement (hard).
84 # 2. cargo_pup — pinned-nightly source-level gate (needs rustc-dev
85 # components). Best-effort here while its pup.ron rule schema is pinned
86 # down from the generated sample; captured, not guessed.
11487 arch-gate:
11588 runs-on: ubuntu-latest
11689 defaults:
130103 fi
131104 cp /tmp/wcore.bak wcore/Cargo.toml
132105 echo "gate correctly rejected the injected wcore->wai edge"
133 - name: cargo-pup on pinned nightly (best-effort P32 probe)
106 - name: cargo_pup source gate on pinned nightly (P32 probe)
134107 id: pup
135108 continue-on-error: true
136109 run: |
137 rustup toolchain install nightly-2026-01-22 --profile minimal || rustup toolchain install nightly --profile minimal
138 cargo +nightly-2026-01-22 install cargo-pup --locked || cargo install cargo-pup --locked
139 cargo +nightly-2026-01-22 pup || cargo pup
110 set -x
111 rustup toolchain install nightly-2026-01-22 --profile minimal
112 rustup component add --toolchain nightly-2026-01-22 rust-src rustc-dev llvm-tools-preview
113 cargo +nightly-2026-01-22 install cargo_pup --locked
114 echo "=== generate-config sample (reveals the real pup.ron schema) ==="
115 cp pup.ron pup.ron.mine
116 cargo +nightly-2026-01-22 pup generate-config || true
117 echo "--- generated pup.ron ---"; cat pup.ron || true
118 echo "=== print-modules ==="; cargo +nightly-2026-01-22 pup print-modules || true
119 echo "=== lint the legal 3-crate workspace with the generated config ==="
120 cargo +nightly-2026-01-22 pup
140121 - name: pup outcome
141122 run: |
142 echo "cargo-pup probe outcome = ${{ steps.pup.outcome }}" >> "$GITHUB_STEP_SUMMARY"No final newline
123 echo "cargo_pup probe outcome = ${{ steps.pup.outcome }}" >> "$GITHUB_STEP_SUMMARY"

.github/workflows/prototypes.yml

Added
new file mode 100644

+66 / −0 text lines

1# Standing guard for the prototype evidence base. Prototypes are kept as
2# evidence for docs/SPEC.md (prototypes/CLAUDE.md, §18): locked deps and verify
3# commands that must keep exiting 0. This builds+tests every prototype crate on
4# a clean runner and FAILS if any regresses — a bit-rot guard against yanked
5# deps, pre-1.0 churn (jj-lib, kstring), and stable-compiler bumps.
6#
7# The p34-ci-pipeline dir is excluded: it is not a normal single-crate
8# prototype (it holds cross/ and archgate/ sub-crates) and is exercised by
9# ci-prototype.yml instead.
10name: prototypes
12on:
13 push:
14 branches: ["claude/specs-progress-n5u27n"]
15 paths:
16 - "prototypes/**"
17 - "!prototypes/p34-ci-pipeline/**"
18 - ".github/workflows/prototypes.yml"
19 workflow_dispatch: {}
21permissions:
22 contents: read
24concurrency:
25 group: prototypes-${{ github.ref }}
26 cancel-in-progress: true
28jobs:
29 build-test:
30 runs-on: ubuntu-latest
31 steps:
32 - uses: actions/checkout@v4
33 - name: toolchain
34 run: rustup default stable && rustc -V && cargo -V
35 - name: build + test every prototype (fail if any regresses)
36 run: |
37 # Each cargo compile runs with CWD inside the prototype tree so the
38 # cap-lints=warn exemption (prototypes/.cargo/config.toml) applies;
39 # building via --manifest-path from the root inherits -D warnings.
40 echo "## Prototype build+test" >> "$GITHUB_STEP_SUMMARY"
41 echo "| crate | result | seconds |" >> "$GITHUB_STEP_SUMMARY"
42 echo "|-------|--------|---------|" >> "$GITHUB_STEP_SUMMARY"
43 failed=""
44 total=0
45 for d in prototypes/p*/; do
46 [ -f "$d/Cargo.toml" ] || continue
47 case "$d" in prototypes/p34-ci-pipeline/) continue;; esac
48 name=$(basename "$d")
49 start=$SECONDS
50 if ( cd "$d" && cargo test --quiet ) >/tmp/proto.log 2>&1; then
51 status="ok"
52 else
53 status="FAIL"
54 failed="$failed $name"
55 echo "::group::$name FAILED"; cat /tmp/proto.log; echo "::endgroup::"
56 fi
57 dur=$((SECONDS - start))
58 total=$((total + dur))
59 echo "| $name | $status | $dur |" >> "$GITHUB_STEP_SUMMARY"
60 done
61 echo "| **total** | | **$total** |" >> "$GITHUB_STEP_SUMMARY"
62 if [ -n "$failed" ]; then
63 echo "prototype regressions:$failed"
64 exit 1
65 fi
66 echo "all prototypes green"

prototypes/PLAN.md

Modified

+22 / −17 text lines

22752275 and no network — the first real seed for the cold-build sub-budget.
22772277### Disproved
2278- **§3.5 / §15 `cargo install cargo-pup`**: cargo-pup is NOT published on
2279 crates.io. `cargo +nightly-2026-01-22 install cargo-pup --locked` and the
2280 stable fallback both fail with `error: could not find cargo-pup in registry
2281 crates-io with version *`. The documented install path for the nightly source
2282 gate does not exist; §11 cannot lean on it as written.
2278- Nothing in the spec. An earlier draft of this block claimed cargo-pup was
2279 unpublished; that was a defect in this prototype's recipe, not the spec —
2280 see the correction below. §3.5's two-gate design stands.
2282### Correction (recipe bug, not a spec defect)
2283- The first arch-gate run reported `cargo install cargo-pup` "not in registry".
2284 Root cause: the crate is published by DataDog as **`cargo_pup`** (underscore);
2285 `cargo install` matches the name literally and does not normalize the hyphen
2286 the way `Cargo.toml` dependency resolution does, so `cargo-pup` (hyphen) was
2287 "not found". Secondary cause: the source gate needs
2288 `rust-src rustc-dev llvm-tools-preview` on `nightly-2026-01-22` (it links
2289 rustc internals), which the minimal nightly lacked. cargo_pup's own README
2290 pins the same `nightly-2026-01-22` the spec uses. So §3.5/§11/§15 are correct
2291 as written; no demotion. The corrected pup recipe is validated in the re-run
2292 recorded below.
22842294### Spec Issues
2285- `docs/SPEC.md §3.5, §11, §15 (pup)` + `docs/PROJECT-INVARIANTS.md §11`
2286 - Issue: the architecture gate is specified as `cargo-pup` on pinned nightly,
2287 but cargo-pup is unpublished on crates.io, so `cargo install cargo-pup`
2288 fails. The load-bearing §11 gate should be the stable `cargo metadata`
2289 check (proven here); cargo-pup should be demoted to optional and, if kept,
2290 installed from a pinned git rev, not crates.io.
2291 - Evidence: run 29595424305 arch-gate job — metadata gate discriminates
2292 legal/illegal graphs; `cargo install cargo-pup` errors "not in registry".
2293 - Severity: P1
22942295- `docs/SPEC.md §14`
22952296 - Issue: cross-build is proven only for the LuaJIT+gix trees. `jj-lib`
22962297 (+ prost) and the `aws-lc`/reqwest-TLS tree named in §13.1/P30's risk were
23212322- arch: `python3 gate.py` (pass), inject edge → `python3 gate.py` (fail)
23232324### Next Steps
2324- Owner decision: make the stable `cargo metadata` check the load-bearing §11
2325 gate; demote cargo-pup to optional (git-pinned) or drop it (§3.5/§11/§15).
2325- Prove cargo_pup end-to-end with the corrected recipe (`cargo_pup` underscore
2326 + `rust-src rustc-dev llvm-tools-preview` on nightly-2026-01-22): install,
2327 run against the 3-crate workspace, and confirm it flags a source-level
2328 forbidden import. Keep the stable metadata gate as the always-on companion
2329 (§3.5 already specifies both). No spec change.
23262330- Extend the cross bin with `jj-lib` and the TLS/aws-lc tree to close the P30
23272331 gap, or accept it as a release-time risk.
2328- Decide whether ci-prototype.yml stays as the seed of the real pipeline or is
2332- Split standing prototype CI (`prototypes.yml`, evidence bit-rot guard) from
2333 the p34-specific cross/arch evidence (`ci-prototype.yml`, path-scoped).
23292334 deleted now that its evidence is recorded.