Skip to content

P0: nightly publishes 1 of 28 [[bin]]s (apr CPU only) and is RED today — build every bin at main head + publish a SHA manifest for lambda #4189

Description

@noahgift

Operator, verbatim (relayed by the cop, aprender-cf, 2026-09-24): "fix these critical issues with aprender binaries" and "lambda-labs should always dogfood latest soveirgn stack nightly binaries".

This ticket is the PRODUCER side. #4186 is the consumer side: apr_bin.sh and pv_bin.sh refuse anything that isn't the latest green nightly. #4186 has nothing to consume until this lands, because only apr (CPU) has a nightly today.

Measured 2026-09-24 ~08:05Z (main @ aa7c6ef)

cargo metadata --no-deps lists 28 distinct [[bin]] names (apr is declared twice: by the root facade and by apr-cli).

bin nightly workflow last run artifact
apr (CPU, x86_64 + aarch64) nightly.yml, 04:00 cron, cargo build -p apr-cli 09-24 run 35942026798 FAILURE. The gx10 aarch64 job died with the runner's No space left on device, and release: needs: build then skipped the publish even though x86_64 was green. Last green: 09-23 @ 8c7822f GH prerelease nightly: apr-{x86_64,aarch64}-unknown-linux-gnu.tar.gz + .sha256, published 09-23 01:22Z, one day behind main
apr (CUDA) cuda-nightly.yml builds --features cuda --bin apr scheduled 09-23 and 09-22: failure (falsifiers on blackwell-gb10) none. Only witness JSON is uploaded. The cuda tarball exists only on tagged releases (v0.69.1)
apr (qwen-story) qwen-story-daily.yml, cargo install onto the runner 09-24 failure, 09-23 and 09-22 cancelled none. The binary never leaves the runner
pv none. binary-release.yml builds it on a tag only release v0.69.1 09-23: success tagged release assets only (gnu + musl, both arches). No nightly
alimentar, apr-corpus-ingest, apr-qa, apr-qa-readme-sync, aprender-cbtop, aprender-cgp, aprender-compute-xtask, aprender-db, aprender-explain, aprender-orchestrate, aprender-profile, aprender-ptx-debug, aprender-test-cli, aprender-train-{bench,distill,inspect,lora,shell}, aprender-zram-generator, presentar, ptop, score, simular, trueno-rag, trueno-zram, verificar (26) none — none, nightly or tagged

Nightly coverage: 1 of 28 bins, and it's red today. Every consumer except apr builds its binary from source, or has no binary at all.

Operator shape (verbatim via the cop, 2026-09-24): "nightly binary built is hard requirement for soveriegn stack, but intelligent: don't build if no work, only build working and passing CI and flag broken as tickets: this is arbiter job"

The arbiter (infra-8d) owns the decision; this repo's nightly.yml is the builder it drives. The gate, in order:

  • No work: main's head SHA == the green_sha in the published nightly-manifest.json → SKIP. No build, no ticket. This replaces nightly.yml's current "any commit in the last 24h" check, which rebuilds the same SHA and can't tell "no work" from "already built".
  • Red head: the required checks (ci / gate, workspace-test) are not all success on that exact SHA → no build, no publish. One ticket, deduped by SHA: its title carries the short SHA, and the arbiter searches for it before opening another.
  • Build failure: any bin fails to build, or its --version SHA doesn't match → no publish for that target. One ticket per SHA, listing every failing bin. The last green manifest stays in place, so consumers keep the last good build and never get a partial one.
  • Open decision for the cop: where the gate runs. (a) The arbiter checks CI and dispatches nightly.yml with sha=<head>; nightly.yml refuses unless github.sha == inputs.sha. This needs no change to the workflow's permissions. (b) nightly.yml checks for itself; reading check-runs needs checks: read added to its permissions: block, which is a permission change and so falls outside the standing yes. Recommended: (a).

Fix (proposal). Workflow edit under the standing yes: quorum + green CI, no runs-on/secret/permission changes

  1. nightly.yml builds every shipped bin at the trigger SHA, in the same rust:1.93.0-bullseye container: cargo build --release --locked --workspace --bins (and --exclude for the GPU crates if they can't build CPU-only). Internal tools (e.g. aprender-compute-xtask, aprender-test-cli) go on an explicit denylist in the repo, not left out silently.
  2. A coverage guard in the job: the set of bins in the manifest ∪ the denylist == the cargo metadata bin set. A new [[bin]] added without a decision turns the nightly RED.
  3. A SHA manifest nightly-manifest.json published as an asset of the nightly release: {green_sha, built_at, run_id, tools: {<bin>: {target, sha256, version_output}}}. The job runs each binary's --version and fails if the SHA it reports isn't github.sha (proves the mechanism, not the label). This is the file P0: dogfood hosts run ONLY the latest green nightly apr/pv — apr_bin.sh + pv_bin.sh refuse anything older (arbiter manifest, fail closed) #4186's resolvers and the arbiter (infra-8d) consume on lambda.
  4. Per-arch independence: a red aarch64 (gx10) must not withhold a green x86_64 (lambda's arch). The release job publishes each green target, and the manifest records each target's own green_sha, or RED with the run URL, so a consumer never mistakes a stale arch for current.
  5. The CUDA apr goes into the same manifest from the nightly x86_64 cuda build. It is RED rather than absent when that build fails.
  6. Two consecutive red nightlies auto-open an issue via Nightly producers feeding a T-2 row: ≥2 consecutive failures auto-open an issue on the next milestone and report NIGHTLY-RED in §7 (operator 2026-09-17) #3416's mechanism.

Out of scope, infra-side: the full gx10 disk that caused today's red (see memory: gx10 /mnt/nvme-raid0 is its root disk). Reported to infra-8d.

done_when

  1. A workflow_dispatch run of the new nightly.yml is green on main and the nightly release lists every non-denylisted bin for x86_64 (and aarch64 where built) + nightly-manifest.json.
  2. Coverage guard mutation: remove one bin from the build → the job goes RED naming it. Add a bin whose --version SHA is wrong → RED.
  3. infra-8d confirms the manifest format and that lambda installs from it. P0: dogfood hosts run ONLY the latest green nightly apr/pv — apr_bin.sh + pv_bin.sh refuse anything older (arbiter manifest, fail closed) #4186's resolvers read the same file.
  4. Quorum (sonnet-5 + agy gemini-3.1-pro-high + haiku-4-5) receipt committed. The cop arms.

Related: #4186 (consumer), #3416 (nightly-red alerting), #4059 (dark CLI tests of kept binaries), #2582.

Activity

  1. added this to the 0.70.0 milestone on Sep 24, 2026
  2. noahgift commented on Sep 24, 2026

    @noahgift
    ContributorAuthor

    Folding a gap in here instead of opening a new issue (measured 2026-09-24): pv has no nightly binary. It is one of the [[bin]]s this issue covers, and the nightly release (published 2026-09-23T01:22Z) still ships only apr-{x86_64,aarch64}-unknown-linux-gnu and no pv asset. #4186 already requires dogfood hosts to run only the latest green nightly pv, which cannot happen until one is published.

    Operator rule: "nightly binary built is hard requirement for sovereign stack".

    Acceptance criterion: a scheduled nightly workflow that

    • builds only when main moved since the last nightly and CI is green on that exact SHA;
    • publishes the binary with a sha256 (to the nightly prerelease, stamped with the SHA it was built from);
    • when red, publishes no binary, and the red night is tracked (visible in the run and in fleet lane liveness), not silently skipped.
  3. noahgift commented on Sep 24, 2026

    @noahgift
    ContributorAuthor

    Debug run: every workspace [[bin]], --version, at aa7c6ef (aprender-48, 2026-09-24)

    Built in a detached worktree at aa7c6ef03 with cargo build --bins (debug profile, default features). Then each executable ran <bin> --version. Columns: bin, rc, first line.

    alimentar	0	alimentar 0.69.0
    apr	0	apr 0.69.0 (aa7c6ef03)
    apr-corpus-ingest	0	apr-corpus-ingest 0.69.0
    apr-qa	0	apr-qa 0.69.0
    apr-qa-readme-sync	0	apr-qa-readme-sync 0.69.0
    aprender-cbtop	0	cbtop 0.69.0
    aprender-cgp	0	cgp 0.69.0
    aprender-compute-xtask	0	aprender-compute-xtask 0.69.0
    aprender-db	0	trueno-db 0.69.0
    aprender-explain	0	trueno-explain 0.69.0
    aprender-orchestrate	0	batuta 0.69.0
    aprender-profile	0	renacer 0.69.0
    aprender-ptx-debug	0	aprender-ptx-debug 0.69.0
    aprender-test-cli	0	probador 0.69.0
    aprender-train-bench	0	entrenar-bench 0.69.0
    aprender-train-distill	0	entrenar-distill 0.69.0
    aprender-train-inspect	0	entrenar-inspect 0.69.0
    aprender-train-lora	0	entrenar-lora 0.69.0
    aprender-train-shell	0	entrenar-shell 0.69.0
    aprender-zram-generator	0	trueno-zram-generator 0.69.0
    presentar	0	presentar 0.69.0
    ptop	NOBIN
    pv	0	pv 0.69.0 (aprender provable-contracts verifier)
    score	NOBIN
    simular	0	simular 0.69.0
    trueno-rag	0	trueno-rag 0.69.0
    trueno-zram	0	trueno-zram 0.69.0
    verificar	0	verificar 0.69.0
    

    Manifest (consumer contract, schema aprender-nightly-manifest/v1): asset nightly-manifest.json on the nightly release. Fleet local copy at ${APR_NIGHTLY_MANIFEST:-$HOME/.cache/aprender/nightly-manifest.json}. Accept rule: sha256(exe) == bin_sha256, and a non-null version_sha must appear as a prefix in --version; otherwise REFUSE.

  4. noahgift commented on Sep 24, 2026

    @noahgift
    ContributorAuthor

    Cop requirement for the 0.70.0 all-binaries gate (2026-09-24): ptop and score are built WITH their features (-p aprender-present-terminal --features ptop,score), both on the nightly and at the release commit. A bin skipped for missing features counts as RED, not exempt. The manifest records each tool's feature set. This lands in the follow-up PR after #4206.

  5. noahgift commented on Sep 24, 2026

    @noahgift
    ContributorAuthor

    Follow-up shape agreed with aprender-75 (#4218): tools["apr@cuda"] = {asset, sha256, bin_sha256, version_sha, version_output, features:["cuda"], cuda_arch:"sm_121"} on aarch64-unknown-linux-gnu (gx10). Every tool gains a features list (ptop/score: ["ptop","score"]). Until this lands, #4218 builds apr@cuda from the tag SHA and marks it manifest_identity: absent.

  6. noahgift commented on Sep 24, 2026

    @noahgift
    ContributorAuthor

    #4189 follow-through: every [[bin]] on batch/0.70.0 @ c91ae0d (aprender-88, lambda-vector x86_64, CPU)

    29/29 bin targets (28 names; apr declared by apr-cli and the root facade) build (cargo build --release --locked -p <pkg> --bin <bin> [--features <required>], one bin at a time) and smoke (--version exit 0 within 30s). Every --version line carries c91ae0dae. Negative control: a wrong SHA gets 0 matches.

    bin package build smoke sha in --version sha256[:16]
    alimentar aprender-data PASS PASS(version) yes 64ffdcea7d40c5d2
    apr apr-cli PASS PASS(version) yes 0d6099aacd9d9c2a
    apr aprender PASS PASS(version) yes 0dcc4f9dc30b55c8
    apr-corpus-ingest apr-cli PASS PASS(version) yes 49b341a064c45131
    apr-qa aprender-qa-cli PASS PASS(version) yes 65379470c4e539e0
    apr-qa-readme-sync aprender-qa-certify PASS PASS(version) yes bd7194328cdb4386
    aprender-cbtop aprender-cbtop PASS PASS(version) yes 36dccfbd44cc4c4e
    aprender-cgp aprender-cgp PASS PASS(version) yes 23fa435bff75e825
    aprender-compute-xtask aprender-compute-xtask PASS PASS(version) yes 145b6465ef629f36
    aprender-db aprender-db PASS PASS(version) yes 9f21620dbc62cd71
    aprender-explain aprender-explain PASS PASS(version) yes b90fb76921d51435
    aprender-orchestrate aprender-orchestrate PASS PASS(version) yes 3739f73e476654e0
    aprender-profile aprender-profile PASS PASS(version) yes 77ca7c2ee454933e
    aprender-ptx-debug aprender-ptx-debug PASS PASS(version) yes c55e7aa3c218267b
    aprender-test-cli aprender-test-cli PASS PASS(version) yes 709cfa4faccd84f1
    aprender-train-bench aprender-train-bench PASS PASS(version) yes 4fdc63453ec5175f
    aprender-train-distill aprender-train-distill PASS PASS(version) yes a140e728335950a0
    aprender-train-inspect aprender-train-inspect PASS PASS(version) yes 35a4ce881b5074fb
    aprender-train-lora aprender-train-lora PASS PASS(version) yes b1aa1122784edfea
    aprender-train-shell aprender-train-shell PASS PASS(version) yes 175d2c8458869f74
    aprender-zram-generator aprender-zram-generator PASS PASS(version) yes 6fbf24fb3edf9d18
    presentar aprender-present-cli PASS PASS(version) yes bda51b6d76962e5d
    ptop aprender-present-terminal PASS PASS(version) yes c107c5838e6bc01e
    pv aprender-contracts-cli PASS PASS(version) yes 65c0a2860c235fcb
    score aprender-present-terminal PASS PASS(version) yes 36b5c65733075e70
    simular aprender-simulate PASS PASS(version) yes 2c84d5eba8520ef8
    trueno-rag aprender-rag-cli PASS PASS(version) yes bd8cbc8d8504064e
    trueno-zram aprender-zram-cli PASS PASS(version) yes e71a8e3b1e6d12b7
    verificar aprender-verify-ml PASS PASS(version) yes cc26165b603cade9

    Scope: CPU x86_64 only. The CUDA apr, aarch64 (gx10) and musl builds are not covered here. TSV: /mnt/nvme-raid0/cop-inbox/bins-4189-c91ae0dae.tsv

  7. noahgift commented on Sep 25, 2026

    @noahgift
    ContributorAuthor

    #4189 verdict — batch/0.70.0 @ e260fe5: 29/29 [[bin]] targets PASS

    Each bin: cargo build --release --locked -p <pkg> --bin <bin> → smoke --version (falls back to --help) → the short SHA must appear in the version line. build 29/29, smoke 29/29, sha_in_version 29/29.

    bin package build smoke sha
    alimentar aprender-data PASS PASS(version) yes
    apr apr-cli PASS PASS(version) yes
    apr aprender PASS PASS(version) yes
    apr-corpus-ingest apr-cli PASS PASS(version) yes
    apr-qa aprender-qa-cli PASS PASS(version) yes
    apr-qa-readme-sync aprender-qa-certify PASS PASS(version) yes
    aprender-cbtop aprender-cbtop PASS PASS(version) yes
    aprender-cgp aprender-cgp PASS PASS(version) yes
    aprender-compute-xtask aprender-compute-xtask PASS PASS(version) yes
    aprender-db aprender-db PASS PASS(version) yes
    aprender-explain aprender-explain PASS PASS(version) yes
    aprender-orchestrate aprender-orchestrate PASS PASS(version) yes
    aprender-profile aprender-profile PASS PASS(version) yes
    aprender-ptx-debug aprender-ptx-debug PASS PASS(version) yes
    aprender-test-cli aprender-test-cli PASS PASS(version) yes
    aprender-train-bench aprender-train-bench PASS PASS(version) yes
    aprender-train-distill aprender-train-distill PASS PASS(version) yes
    aprender-train-inspect aprender-train-inspect PASS PASS(version) yes
    aprender-train-lora aprender-train-lora PASS PASS(version) yes
    aprender-train-shell aprender-train-shell PASS PASS(version) yes
    aprender-zram-generator aprender-zram-generator PASS PASS(version) yes
    presentar aprender-present-cli PASS PASS(version) yes
    ptop aprender-present-terminal PASS PASS(version) yes
    pv aprender-contracts-cli PASS PASS(version) yes
    score aprender-present-terminal PASS PASS(version) yes
    simular aprender-simulate PASS PASS(version) yes
    trueno-rag aprender-rag-cli PASS PASS(version) yes
    trueno-zram aprender-zram-cli PASS PASS(version) yes
    verificar aprender-verify-ml PASS PASS(version) yes

    Nightly wiring: this check already exists in #4315 (batch/b2-ci-infra). Its nightly.yml builds every bin from cargo metadata (nightly_manifest.py bins), and its nightly_manifest.py record turns a target red on a failed build, a failed --version in an empty cwd, or a missing/wrong SHA (version-no-sha). The nightly is not wired until #4315 lands. It is blocked on a 6-file conflict with batch/0.70.0 (nightly.yml, ci.yml, binary-release.yml, check_model_ladder.sh, tree_reader_tests.txt, roadmap.yaml) and 5 red checks. Plan: take b2's nightly.yml whole; it supersedes my #4326 cuda-leg hunk.

  8. 5 remaining items

  9. added 4 commits that reference this issue on Sep 26, 2026
  10. added a commit that references this issue on Sep 29, 2026
  11. noahgift commented on Oct 4, 2026

    @noahgift
    ContributorAuthor

    The fix is on main (aprender-78 inbox). #4589 is closed. (ISSUE-TREE-001 cleanup, C297 §4, aprender-wtix-even)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Critical priority

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions