Skip to content

batch/0.70.0: 0.70.0 fold batch (#4352, #4020, #4062, …) - #4372

Closed
noahgift wants to merge 385 commits into
mainfrom
batch/0.70.0
Closed

noahgift wants to merge 385 commits into
mainfrom
batch/0.70.0

Conversation

@noahgift

Copy link
Copy Markdown
Member

Fold batch for 0.70.0, opened under the cap (slot 10) on the cop's relay of the operator: "yes, you need to be proactive in your role as cap to MERGE clogged PRS into batches".

Folded so far (base 196f1ba):

More folds to come: #4058, #4060 ×2, #4079, then the cop's 0.70.0 order.

Known pre-existing reds on the base (not from these folds): check_cb200_tdg_grade, check_ont_complete, check_roadmap_fragment_required.

🤖 Generated with Claude Code

noahgift and others added 30 commits September 24, 2026 21:02
# Conflicts:
#	Cargo.lock
#	crates/aprender-contracts-cli/tests/ont_release_readiness.rs
… invisible to the scan and to git diff (quorum r5, sonnet-5)

C18 + mutant nul-skip; SELF-TEST PASSED (29 rows and mutants); re-pinned the two ticket records whose notes changed.

Refs #3741

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le to the scan and to git diff (quorum r6, sonnet-5)

C19/C19b + mutant utf8-only; R3 reads the decoded text; SELF-TEST PASSED (32 rows and mutants).

Refs #3741

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…same-family quorum fallback)

Refs #3668

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…; agy 429)

Refs #3741

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…MoE gates (Refs #3714)

The MoE work was measured green on gx10+lambda (r2, 92/92 cosine 1.000000) but never
landed in main, batch/0.70.0 or any v0.69.x tag. golden_output.rs: kept batch's
cuda_device_present() (#3711) and r2's 8-byte magic read (#3750). Row reassigned
from aprender-eb (no live session) to aprender-1c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…yaml)

Refs #3668

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
book-contracts.yml had no concurrency group. Every push to a PR ran the
~18 min chapter suite to completion even after the next push had started.
In the 24 h to 2026-09-24 19:15Z, about 1650 of its ~3700 PR wall-minutes
came after a newer push. book.yml had one repo-wide "pages" group that held
every PR's mdBook check in a single queue. That group now lives on the
deploy job only, so deploys still never overlap and are never cancelled.
install-script.yml gets the same per-PR group that ci.yml uses.

New guard scripts/check_pr_workflows_cancel_superseded.sh: any workflow
triggered by pull_request needs a workflow-level group keyed to the PR
number, with cancel-in-progress on PRs. A workflow holding a perf-<host>
job group is exempt by structure (PP-19). It ships an 8-row --self-test
table (3 RED). It has no cargo, so guard_tree --no-cargo picks it up.

Refs #3676

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…perf blanket exemption

The perf exemption skipped a whole workflow when any one job held a perf-<host> group. ci.yml carries both, so the exemption was never needed there, and it would have hidden a regression. It is replaced by two rules:
- a structural skip for triggers whose types omit synchronize (no push can supersede those runs)
- a shrink-only ALLOW with reasons. Its one entry is pr-review-quorum.yml, the base-owned receipt gate.

cancel-in-progress must be true or exactly the ci.yml expression, so an inverted '!=' now goes RED. The group must be a ${{ }} expression that reads the PR number. pull_request_target is now covered. The self-test grows from 8 rows to 12.

Refs #3676

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…piles every tarball, autopilot T-4 stops on red

The autopilot dryrun step ran `cascade-publish.sh --check` (a version report) and never
stopped, so nothing compiled a tarball before the first upload. `--verify` drops
--no-verify from the one-invocation cascade package walk: cargo builds each publishable
crate's tarball against the local overlay, i.e. `cargo publish --dry-run` for the
whole cascade. The autopilot's dryrun step now runs it on the tagged tree and dies on red.
rc-cut.yml keeps the fast --no-verify walk (verify is hours: every tarball rebuilds its
deps). Self-test: fake-cargo mechanism rows (mutant 'verify stays --no-verify' is killed)
and a wiring row on autopilot.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ts keys from Σ, #3777 then added a type

#3624 makes the shapes gate refuse (exit 3) any entity type Σ marks implemented and no arm counts; #3777
registered cli-surface in Σ. Folded together, every lint of a tree with Σ refused. Count cli-surface as the
release surface's leaf commands, 0 without --surface (rule 0, as release-evidence).
ont_release_readiness: #3610 x #3777 — sixteen armed shapes, less the vacuous .refusal = 15; rustfmt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0 (PMAT-3296 drift)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…atchet + name its instrument

check_baseline_ratchets.sh (#2706) went red on batch/0.70.0 after #3809 landed: its new baseline
was unclassified and carried no tool_version line. It is a SHRINK-ONLY exact set, so kind=set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fresh one, ONT counters are measured never stamped (#3569)

- scripts/check_census_derived.sh (new, guard_tree auto-runs it): a non-train
  branch whose diff against the comparand (working tree included) touches
  contracts/census.json is RED; --census FILE checks the invariants of a fresh
  `pv census` (partition sums, parse-error count, anchoring keys, id-set sha).
  27-row self-test; 5 mutants killed.
- make contracts: fresh census into a temp file -> invariants -> README check
  against it. `make census` is the train's writer.
- readme_sync / check_readme_claims: the contract count walks the tree
  (contract_files_only), not the lagging snapshot.
- batch_fold: no longer regenerates or stages census.json.
- check_ont_ratchet: counters measured at the comparand tree AND the working
  tree; never-down in both directions. lint-baseline.json keeps DECISIONS only
  (armed_gates, armed_shapes, the Rust gates' foreign keys). 32-row self-test,
  4 mutants killed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…isions-only --write

--write no longer stamps consumer_present, so #3679's refuse-unmeasured rows become
'writes decisions, stamps no consumer'. lint-baseline.json keeps decisions only.
Self-test 42/42.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…retired

batch's #3718 clamp read `canonical_arch`, which r2 replaced with the
moe_forward_handles() predicate; bind the predicate once before `model` moves and
use it for both the dispatch and the clamp, so run and budget cannot disagree.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-on-070

# Conflicts:
#	docs/roadmaps/roadmap.yaml
…ain; push runs name their branch; a zero count reaches its own message

- check_census_derived: is_train refuses a pull_request whose head repo is not
  its base repo (event payload); current_branch reads GITHUB_REF_NAME on a push
  (detached HEAD). The self-test pins GITHUB_EVENT_PATH empty so the runner's
  own payload cannot decide a row. 31 rows; both new rows kill their mutant.
- readme_sync / check_readme_claims: `grep -c . || n=""` turned a 0 into '';
  `|| true` keeps the 0 so the zero-count refusal is reachable. Stale
  "census.json .n_files" wording removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d 1e-6

The WGSL RMSNorm computed sqrt(mean(x^2) + 1e-6) regardless of config, so
Llama-family models (eps 1e-5) ran every wgpu norm — finetune, instruct
training, serve, batch and GGUF/APR generate — with the wrong epsilon while
the CPU final norm used the right one. Found by the adversarial quorum lane
on the #4056 compile fix.

WgslForwardPass now carries rms_norm_eps (default 1e-6, unchanged behaviour
for anyone who does not set it) and passes it as params.y (f32 bits); the
shader reads bitcast<f32>(params.y). All six constructors set it from config.

Verified: clippy -D warnings on apr-cli[wgpu], aprender-serve[gpu],
aprender-train[gpu]; fmt; unit test rmsnorm_params_carry_eps_bits; the
shader validates under naga 27.0.3 (wgpu 27's) offline, and a planted
params.q break is rejected. The on-device test rmsnorm_shader_validates_on_device
was NOT run: gpu-q queue held 3 deep for 9 min.

Refs #4056

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit b3354fc)
noahgift and others added 10 commits September 25, 2026 11:46
…erence::forward::forward_pass never existed

Rebound to realizar::gguf OwnedQuantizedModel::forward (pub, forward_fused_q4k.rs:17), with signature; notes record the [V] vs [B,S,V] codomain gap.

Pmat-Ticket: PMAT-4094

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….<Domain>.<Stem> (#4351)

content.contains("sorry") denied every theorem in files whose only 'sorry'
is a doc comment ("compiles sorry-free"): TensorTranspose/Roundtrip,
Metrics/RegressionAnalytic, AbsolutePosition/Core. lean_has_sorry matches
the token outside -- and nested /- -/ comments; strings/char literals are
skipped only so they cannot open a fake comment, a sorry inside a string
still counts, and EOF inside a comment/string counts (fail closed).

insert_domain_theorems now also registers Theorems.<Domain>.<Stem>, the
form apr-gguf-export-symmetry-v1.yaml:44 cites. Grounding stays
equation-level; obligation-level citations are ONT-2a's question.

19-row case table + an in-tree test pinning the three files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…prender-a2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uard was red on it (7 tests)

`apr ptx-debug` (#4062) mounts trueno_ptx_debug::cli::Command, the former
aprender-ptx-debug binary's enum. foreign_mounts() did not probe it, so its
four raw PathBuf args (analyze file/html, gen-fkr file/output) read as apr's
own undeclared free-form args and 7 surface::guard tests failed on
origin/batch/0.70.0 (measured). Probe it like pv, cgp and the other
mounted CLIs; the roles of a foreign crate's args are its own to declare.

Measured: cargo test -p apr-cli --lib -- surface ptx_debug: 37 passed
(base: 7 failed); clippy -D warnings clean with and without defaults.

Refs #4062
Pmat-Ticket: PMAT-3745
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…not enforce; one tested key builder (#2699)

Three of #2699's four upstream causes, without breaking any build that
compiles today (cargo check --workspace --all-targets: clean).

1. The docs said a missing env var is a compile error; the code uses
   option_env!, so it is a silent no-op. lib.rs's crate doc and the
   attribute doc now say what happens.
3. A condition the producer emitted but that is not a Rust expression
   was skipped silently. It is now a compile_error! naming the var, and
   so are an unparseable _COUNT and a _COUNT whose numbered var is
   missing. Conditions parse as syn::Expr, not a bare TokenStream, so
   `x > 0, "msg"` is refused instead of becoming debug_assert!'s message.
   All 1473 pre + 502 post conditions aprender-contracts emits parse.
4. build_helper's key builder is now `pub fn env_key`, tested equal
   over a case table to the new `contract_env_key!`, which expands to
   the key the attribute reads. A producer can call it instead of
   re-deriving the format.

NOT done here, needs scoping (#2870 P-1.1): cause 2, where "no producer"
and "producer emitted nothing for this key" still look the same.
Telling them apart needs a registry sentinel from every producer. Also
not done: moving the 12 hand-rolled build.rs key derivations onto
env_key, and apr-cli's 65 #[contract] sites, which have no producer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 7633ed6)
(cherry picked from commit f4a800f)
…once the registry ran (#4368)

#2699 cause 2. `#[contract(c, equation = "e")]` could not tell "no registry"
(a crates.io build: do nothing) from "the registry ran and has no row for
c/e" (a misspelt or unbound name). Both expanded to zero assertions, silently.

The sentinel is the var producers already emit: CONTRACT_BINDING_SOURCE,
`binding.yaml` once the registry was read and a CONTRACT_<C>_<E> var emitted
for every row, `none` when no binding.yaml was found. At `binding.yaml`, a
site whose key has no binding var, no _PRE_COUNT and no _POST_COUNT is a
compile_error! naming the contract, equation and key. Unset or `none`
stays silent.

Evidence:
- Case table registry_miss_is_an_error_only_when_the_registry_ran, 7 rows.
  Mutants M1 never-error, M2 ignore-sentinel, M3 binding-var-only and
  M4 prefix-match are each RED on the row they target (MISS, NO_SENTINEL,
  PRE_ONLY, OTHER_KEY).
- Real-path control in aprender-contracts, the one producer whose registry
  runs: a planted site `softmax-kernel-v1`/`softmaxx` fails with the #4368
  error. The same site spelled `softmax` passes the registry check and
  instead hits its real YAML precondition.
- `cargo check --workspace --all-targets`: rc 0, zero #4368 errors.

FINDING (why zero): nine of the ten producer build.rs files (compute, core,
db, orchestrate, present-cli, present-core, rag, serve, train) still look for
binding.yaml at the pre-monorepo sibling path
../../../provable-contracts/contracts/<crate>/binding.yaml, so they emit
CONTRACT_BINDING_SOURCE=none and no binding vars. Their #[contract] sites
(53 in aprender-core alone) bind nothing. The sentinel is correct and silent
for them until they are repointed at the in-tree contracts/<crate>/binding.yaml.
Reported to the cop; not in this change.

Refs #2699 #2870

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit ba895e0)
…= 24 (#4373)

* fix(dogfood): #4252 the lambda CPU fallback is opt-in and refused at load1 >= 24

Operator, via the cop (2026-09-25): lambda fans are loud; lambda CPU runs only when
load1 < 24 (infra#1087 row 5); no new lambda-CPU apr runs. `ask` now tries lambda
only with --allow-lambda/--force-lambda and load1 < 24, else records the lambda attempt
as not tried with the reason. The lane stays advisory: the receipt says unavailable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(dogfood): #4252 AC amended to the 2026-09-25 operator directive; receipt round 7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(dogfood): #4252 the ticket entry pmat reads carries the amended AC; receipt step 3 dated before the opt-in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(dogfood): #4252 round 7 live proof — a real gx10 gpu-lock hold, default ask unavailable, lambda not tried

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(dogfood): #4252 receipt names the step-3 rows; the rejected quorum artifact is not shipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(dogfood): #4252 drop the NOT-AGREED r4 quorum artifact from the diff

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(audit): PMAT-4252 quorum r5 — 3/3 PASS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…solve CI's pin or refuse

The fleet runs nightly bashrs (7.4.2 on lambda, 2026-09-25) while tools.toml
pins CI at 7.4.1. baseline_require_tool_version and check_shell_lint_ratchet.sh
both read `command -v bashrs`, so the same tree was measured by a different
instrument on every box and a drifted box went red on the tree.

scripts/bashrs_pin.sh resolves the version tools.toml pins, installed with
`cargo install bashrs --version =<pin> --locked --root
/mnt/nvme-raid0/tmp/tool-pins/bashrs-<pin>` under flock on first use. It
refuses loudly (rc 4, one line) when the pin is missing, the install fails,
or the binary reports another version. No branch falls back to PATH.

check_baseline_ratchets.sh --self-test gains 5 pin rows and 2 mutants:
- pinned 9.9.1 with PATH drifted to 9.9.2 passes, so PATH is ignored.
- MISMATCH: the pinned root and the header both at 9.9.2 against pin 9.9.1 is rc 4.
- A missing pin with a matching bashrs on PATH is rc 4, so there is no fallback.
- A 9.9.0 header against the 9.9.1 pin is rc 4.
- A tools.toml with no [bashrs] is rc 4.
- Mutant A, the resolver swapped back to PATH, turns the no-fallback row green.
- Mutant B, the pin comparison deleted, turns the MISMATCH row green.
Mutant B needed the restamped-header input: with a 9.9.1 header, the header
check already backstops a 9.9.2 binary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahgift and others added 4 commits September 25, 2026 14:31
…d had diverged (#2582 G0.5)

The root facade's src/bin/apr.rs calls apr_cli::cli_main(); crates/apr-cli/src/main.rs
re-implemented the same prologue (SIGPIPE, FZ16, NO_COLOR, --version --json, parse,
dispatch) by hand, and the dhat `#[global_allocator]` + heap profiler existed ONLY in
that copy — so `--features dhat-heap` profiled one `apr` and silently not the other.

- The dhat allocator and profiler move into lib.rs next to cli_main; apr-cli's main.rs
  is now `apr_cli::cli_main()` and nothing else. The moved unsafe blocks carry the
  SAFETY comments the copy had.
- `entry_point_is_shared` (lib.rs, cfg(test)) reads BOTH bin sources and fails on any
  prologue token (Cli::parse, execute_command, emit_version_json, global_allocator,
  set_override, SIGPIPE, fpcr) or a missing cli_main() call; comments are stripped so
  main.rs's header naming them is not code. Case table: the pre-fix shape, an
  allocator-only copy, and the clean shim.
  Mutation: restoring the pre-fix main.rs -> RED with all 8 violations; restored -> GREEN.
- dispatch.rs: the --backend cuda refusal told users only the ROOT facade can enable
  CUDA ("build the root, not -p apr-cli"). False: apr-cli defines `cuda` directly and
  the nightly CUDA asset builds `-p apr-cli`; with one shared entry point both are the
  same program. The message now names both builds (#2586's text, still present).

Verified (lambda): cargo test -p apr-cli --lib entry_point_is_shared 2/2; clippy
-p apr-cli --lib --bins -D warnings rc0; check --features dhat-heap rc0; built apr:
--version, --version --json, --help, and `run --backend cuda` refusal text.

Refs #2582 #2586

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#4369)

12 producer build.rs files each hand-rolled the CONTRACT_<C>_<E> env key
the #[contract] macro reads. They now call the one builder,
provable_contracts::build_helper::env_key (tested equal to the macro's
contract_env_key!). aprender-contracts' own build.rs cannot build-depend on
itself, so it include!s the same src/env_key.rs that build_helper.rs does.

Guard: build_helper::tests::no_build_rs_hand_rolls_the_contract_key scans
the root build.rs + crates/*/build.rs (floor: >=12 files scanned) and fails
naming file:line on a CONTRACT_{ / "CONTRACT_" literal; ships a case table.
Mutant (format!("CONTRACT_{}_{}") planted in rag/build.rs) -> RED naming
aprender-rag/build.rs:52.

Key equality: 3510/3522 contract/equation pairs identical old vs new; the
12 that differ are binding entries whose contract is "../gguf-format-..."
-- unreadable by the macro under BOTH builders (pre-existing data defect).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed inputs (#3140)

Adds on top of the parity-chain script (rmsnorm, online_softmax and
swiglu are the earlier PMAT-3140 commits, unchanged here):

- stub_exp returns exactly 1.0 for exp(0). Before this, every element
  could be tiny at once, so 1/sum overflowed and the softmax/attention
  harnesses failed on outputs no real exp produces.
- stub_sqrt brackets sqrt(x) between x and 1 for x >= 0, so sqrt(d_k)
  can no longer be 0 and divide the attention scores by zero.
- ACT_BOUND (|x| <= 1e4) replaces is_finite() preconditions on
  gqa x3, rope, attention_weights and log_softmax: near f32::MAX the
  products overflow and inf - inf is NaN (a real finding, not a stub
  artifact). GQA unwind 5 -> 9.
- [package.metadata.kani] unstable stubbing, for crate-dir runs.
- kani_parity_chain.sh lists 17 harnesses (+7: softmax_bounded,
  log_softmax_upper_bound, rope_norm_preservation,
  attention_weights_normalize, gqa_convex_bound, gqa_mha_equivalence,
  gqa_weight_normalization).

Measured: the script ran 16/17 ok at load 88-112. The 17th,
online_softmax_2tiles, timed out at 600 s and verified alone in 444 s
(upstream stubs: 451 s), so the timeout came from load, not the stubs.

Pmat-Ticket: PMAT-3140

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…Q4_K (#3850)

`resolve_qtype` and the lm_head fallback in `dispatch_lm_head_and_download`
both did `.and_then(from_ggml_type).unwrap_or(Q4K)`, so "no type recorded"
and "type recorded, no GPU kernel" (Q5_1, Q8_1, Q2_K, Q3_K, IQ*, F16, BF16)
took the same branch. The second case ran the Q4_K kernel over bytes of
another layout: garbage logits, no error. The APR streaming path records
exactly these types (dtype_to_ggml_qtype admits Q5_1/Q8_1/Q2_K/Q3_K/IQ*).

Now one rule, `resolve_recorded_qtype`: absent keeps the legacy Q4K
default, a recorded unknown type is a GpuError naming the weight and the
type. build_indexed_weights / index_output_weights propagate it.

Proof: table test resolve_recorded_qtype_3850 (13 rows); restoring the
unwrap_or(Q4K) mutant turns it RED at recorded=Some(1). clippy
-p aprender-serve --features cuda --lib -D warnings clean. GPU-resident
tests not run here (4090 held by another job).

Refs #3850

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahgift and others added 5 commits September 25, 2026 14:55
…n tripped the complexity ratchet (cognitive 92)

check_complexity_ratchet.sh went RED on batch/0.70.0 @844aac1fb: lean_has_sorry
entered the over-threshold set at cyclomatic 26 / cognitive 92. Same scan, one
helper per lexeme (block comment, line comment, raw/plain string, char literal,
token); lean_sorry_token_case_table and the doc-comment grounding test pass
unchanged (aprender-contracts --lib: 1775 passed).

Refs #4351

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cument the unsafe blocks clippy flagged (#4152)

`cargo clippy -p aprender-serve --all-targets` (never run by any gate) reported
1280 excessive_precision + 5 undocumented_unsafe_blocks. Writing the SAFETY
comments exposed a soundness bug: falsification_tests guarded a
#[target_feature(enable = "avx2,fma")] call with is_x86_feature_detected!("avx2")
alone — UB on an avx2-without-fma CPU. Now checks both.

The 1280 are the %.9e ggml reference dumps in the iq* test modules; they are
exact in f32 and kept byte-for-byte to diff against ggml, so the lint is allowed
on those five consts only (a Cargo.toml [lints] allow is overridden by the
crate-level #![deny(clippy::all)]).

Refs #4152

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity fix into batch/0.70.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…refused the whole list (rc 2)

Fold 88fd138 brought 455-aprender-contracts-cli-shapes-vacuity.cmd next to
455-aprender-contracts-cli-ont7-valid-under-gate.cmd. ci_run_explicit_test_commands.sh
refuses a shared ordinal (ambiguous order), so on batch/0.70.0 every full-tier
Integration tests step ran zero commands and exited 2. Renumbered to the free 457.

--list: rc 2 before, rc 0 after; check_explicit_test_commands.sh --check: PASS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rywhere (#4369)

The 10 producer build.rs read their binding from
../../../provable-contracts/contracts/<name>/binding.yaml -- the archived
pre-monorepo sibling. That path resolves only on a checkout with the
sibling beside it, so every worktree and CI built with
CONTRACT_BINDING_SOURCE=none and the #4368 registry check never ran;
the one main checkout that did resolve it enforced a stale (Aug 18) copy
and, with #4368's sentinel, now fails to compile aprender-compute.

- Each producer reads CARGO_MANIFEST_DIR/../../contracts/<name>/binding.yaml.
- The 8 sibling bindings are vendored as contracts/<name>/binding.yaml;
  core keeps the in-tree contracts/aprender/binding.yaml (1395 lines, newer
  than the sibling's 895).
- Measured with the registry on: 33 #[contract] sites had no row
  (trueno 1, aprender 26, realizar 6; +1 entrenar under --features cuda). Rows added naming each site;
  5 cite contracts with no YAML in-tree (forward-pass-v1, gemm-v1, backward-pass-v1,
  sampling-v1, wgpu-forward-pass-v1) and are status: partial, not
  implemented.
- Guard build_helper::tests::producer_bindings_are_in_tree; mutant
  (rag repointed at the sibling) -> RED on both checks.

Out of scope, still sibling reads: serve's architecture-requirements-v1
codegen (falls back to the hand-written file) and tensor-names-v1
(read for rerun-if-changed only).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahgift added a commit that referenced this pull request Sep 25, 2026
…ix merge-introduced guard reds; fleet waivers

Scope: 20 commits reached the car through the local reconcile lineage but are in
neither batch/0.70.0@596f06db2 (#4372) nor main — #4352 jq rewrites (host_receipt,
preflight, publish_strict, promote_rc, rc_cut, autopilot/ledger, fleet_cells_gate),
ONT-10 #4079 release-policy, binary-debt #4058, zram --format #4060. Reverse-applied;
check_publish_preflight.sh takes the reconcile's main∪batch form (5338b5b34).
Every touched file now equals main, batch, or the reconcile's resolution of the two.

Guards (merge-introduced reds, green on main and on the batch alone):
- no_silent_truncation: display slices print in full or say "... and N more chars";
  hash prefixes named *_sha/digest
- comparator_consumers_resolve R1: check_crux_greedy_rows reaches the stub via a variable
- guards_are_wired: clean once release-policy.sh (non-batch) is gone

Waivers: scripts/release/fleet-waivers.tsv dated rows per cop ruling (via infra-64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahgift and others added 4 commits September 25, 2026 17:19
…e binary + an admitted nightly

The --scope release / --nightly judge #4117 was blocked on already existed on
feat/4045-release-gate-normal (PR #4187), but that branch is based on the
closed 0.69.1 merge-back (#4046) and never reached batch/0.70.0. This ports
the ladder/release-gate subsystem by file onto batch:

- check_model_ladder.sh: --scope release --nightly N --crux C --cut-commit;
  #4051 timing gaps are RED from 0.70.
- model_ladder.sh: every apr call stamped (stamp_call); batch's #3964
  apr_exclusive GPU leg kept and stamped too — gpu_exclusive_run.sh writes
  the lock-acquired epoch to GPU_ACQ_STAMP so t_acquired is the real one.
- check_publish_preflight.sh: rule_r7_release — from release_gate.from R7
  asks the release judge with the models step's handoff and NEVER falls back
  to the full ladder. Kept batch's #4286 R4 (release/X.Y.Z ancestry) and
  #4287 rule_r6/--graph-only; F's squash-content R4 rows dropped (superseded).
- release/models_t1.sh, gather_nightly.sh, certify_nightly.sh,
  nightly_admission, ladder_carry, crux_smoke_scope + case tables.

Not ported (separate tickets): the shift-left gate classes / candidate watch
/ bookkeeping autofix (#4040/#4037), and the 0.69.1 Rust fixes + Cargo bump
(merge-back debt).

Case tables: check_model_ladder --self-test 155/155 (3/3 exclusive mutants);
check_publish_preflight --selftest 62/62 + 3/3 mutants (falls-back-to-ladder
killed by r7_release_gate_green); check_release_models_t1 39 rows;
check_certify_nightly PASS; nightly_admission 23, ladder_carry 45.
bashrs gate at batch baseline (7); shell-lint ratchet PASS.

Pmat-Ticket: GH-4117
Rebased onto batch/0.70.0 @7014b28fd by aprender-88 (orig c84e629, 96 commits behind).
Conflicts: model_ladder_cells.py took batch's CB-200 split (#4101) and re-applied the port's
3 hunks (_loud, NOT ARMED, _loud in _judge_row); check_model_ladder.sh kept batch's re-indented
rungs-floor mutant. Re-run: ladder 155/155, preflight 65/65, models_t1 39, certify PASS,
nightly_admission 23, ladder_carry 45.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er existed (#4117)

Quorum lane a on 13abb20: the comment says the partial-cells branch is
proven by a 'cells-partial' case; no such case exists, and no mutant ever
deleted the branch. The partial case exists as red-cells-no-cells (gx10
carries cells, lambda none -> rc 1). Name it, and add cmutant not-armed
(`if receipts and not carrying:` -> `if receipts:`), killed by that case.
Self-test 155/0 bad.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…no F32 passthrough (#4418)

`apr quantize -s q4k --format gguf` on Qwen3.5-4B used to write HF names and
738/739 tensors as F32. Hybrid (Gated-DeltaNet + full attention) checkpoints
now take a dedicated exporter, a port of llama.cpp d1d3c3396's
`Qwen3_5TextModel`:

- name map HF -> `blk.*`/`token_embd`/`output*` (QWEN35_LAYER_NAME_MAP), with
  MTP and vision tensors dropped (as unsloth does) and tied lm_head skipped
- value transforms: +1 on zero-centred RMSNorms (not ssm_norm), A_log -> -exp,
  value-head regrouping of qkv/z/a/b/dt/conv1d/out_proj, conv1d squeeze
- Q4_K_M policy: token_embd Q6_K, attn_qkv/ssm_out Q5_K, use_more_bits
  ffn_down/attn_v Q6_K, rest Q4_K (ssm_alpha/beta stay F32: no Q8_0 encoder)
- qwen35.* metadata (ssm.*, mrope sections, full_attention_interval),
  gpt2/qwen35 tokenizer, added-token holes + CONTROL typing from
  tokenizer_config.json, chat template
- import: config.json `text_config` merged (multimodal nesting), linear-attn
  hparams carried in APR custom metadata; GH-279 completeness gate gets a
  hybrid-aware check (the dense qwen3 key demanded self_attn in every layer)

Evidence:
- tiny seeded Qwen3.5 (4 layers): all 55 shared tensors equal llama.cpp's own
  convert_hf_to_gguf.py output within 1e-6; every tokenizer KV equal; only
  diffs are the deliberate MTP drop (block_count, nextn) and general.name
- real Qwen3.5-4B@851bf6e8: 426/426 tensor names+shapes identical to unsloth
  Q4_K_M; types identical except ssm_alpha/beta (F32 vs Q8_0)
- llama.cpp d1d3c3396 llama-completion (CPU, temp 0) on apr's GGUF:
  "The capital of France is" -> "Paris."; Japan -> "Tokyo"; "2 + 2 =" -> "4";
  same output as the unsloth control on 2/3 prompts, fibonacci differs only
  in the base case (<= 1 vs <= 0)
- mutation: deleting the in_proj_z row of QWEN35_LAYER_NAME_MAP turns
  qwen35_name_map_is_pinned RED

Refs #4418, #4400

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Member Author

Folded: superseded by #4429, the sealed 0.70.0 car (cop ruling 16:15: recut, REPLACES #4372). Commits already in #4318 were excluded by patch-id. GH-4117 x3, pushed here after the freeze, await a cop ruling. Branch kept. Closed per cop PRCAP ruling (cap 10).

@noahgift noahgift closed this Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant