Skip to content

PROMETHEUS rex/001: PRM C9/C10/C12/C13/S1/S2/04/09 + #4026 serve top_logprobs + C11 prep - #4459

Closed
noahgift wants to merge 82 commits into
mainfrom
rex/001
Closed

noahgift wants to merge 82 commits into
mainfrom
rex/001

Conversation

@noahgift

Copy link
Copy Markdown
Member

PROMETHEUS (PRM-001 v3) branch rex/001: the rows landed since the reviewed PRM-L head fb367bf7f (#4451, which this PR contains and which shrinks out of the diff once it merges).

Closes #4446 (PRM-C12 terms/provider tagging, RED→GREEN at d59de74/e7e80cc43). Refs #4354 #4447 #4026.

Rows

  • PRM-C12 / C13 / C9 / C10: trace terms tagging, pool admission (hosted/untagged/non-gold refused), trace-split-guard-v1, trace-outcome-join-v1. Each RED against a stub, then GREEN.
  • PRM-S1 / S2: review-replay-v1 set builder and runner; workload-profile-v1.
  • PRM-09: rex ladder v2 tie-breaker rung; S-4 reason names the primary cell.
  • PRM-04: admission re-run under parity.oracle; C4 is a receipted refusal (7 < min_positions 64).
  • apr run: payload trace / --logprobs must record per-step top-k logits (no CLI path today; found on #4004) #4026 serve: /v1/chat/completions logprobs + top_logprobs ≤ 20 on the Qwen3.5 session, each token carrying logprob of the chosen id and full-vocab logsumexp_full. Named 400 refusals: k > 20, top_logprobs without logprobs, stream, non-Qwen3.5 backend.
  • PRM-C11 prep: sparse_logits::from_chat_completion turns that body into sparse-logits-v1 and refuses what it cannot record honestly.

Live control (#4026, CPU, Qwen3.5-0.8B-Q4_K_M vs llama.cpp 60b06ab9a)

docs/audits/prm-001/c11-4026-live/RECEIPT.md. Top-1 28/29, top-20 overlap ≥16 28/29. The positive control and 2 planted controls behave, and the 3 refusals return 400. The pre-registered |Δlogprob| ≤ 0.25 bar is RED on 25/29. That is filed as a forward-parity finding, not a defect in the report. The bar is unchanged.

Findings

docs/findings/2026-09-26-aprender-84.jsonl: CPU forward-parity gap (P2); /tokenize splits <|im_end|> (P3).

Tests

Targeted aprender-serve (session, logprobs, chat_logprobs, openai_handlers) and aprender-review-experiment tests pass; clippy and fmt are clean. The full qwen35 serve suite is left to CI (it loads a real model in debug).

🤖 Generated with Claude Code

noahgift and others added 30 commits September 25, 2026 11:01
Freezes spec §2–§5, the analysis code (stats.rs), the analysis plan and
prompt v1 under prereg_sha ef51087dc79b… before any measurement (S-1).
New crate aprender-review-experiment (publish = false); harness CLI is an
example, not a [[bin]]. Planted §3 edit turns prereg-check and
FALSIFY-REX-PREREG-001 RED; restore → GREEN. Receipt:
docs/audits/rex-001/rex-00-receipt.md.

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

Phase 0: no declared label admits apr-serve review jobs on any host; cells
stay NotRun{NoDeclaredExecutor} until infra#1088 lands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ation check — Refs #4357

corpus_version review-corpus-v1@787d2026256cc08b. P 50 (cargo-mutants listing,
markers stripped), R 50 (revert-the-fix, comment-only hunks dropped), G 50
(green, unreverted, pre-cutoff). 45 dev / 105 test; 70 test defect items.
Diffs are outside git (items-v1.tar sha256 70dffe56…). Contracts
review-corpus-v1 (FALSIFY-RCV-001..003) and review-corpus-contamination-v1
(FALSIFY-RCC-001..003); planted train leak RED (rc=101) -> GREEN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…FY-RXR-001..003) — Refs #4358

Harness drives apr serve /v1/chat/completions at greedy/seed 4354/512 tokens, never
truncates (context refusal -> NotRun{ContextOverflow}), seeded run order + 10% rerun.
Scorer denominators are the EXPECTED item set; raw outputs are sha-checked and the
verdict re-parsed. Receipts verify with minisign when --pubkey is given. Three
falsifiers planted RED and restored GREEN (docs/audits/rex-001/rex-03-receipt.md).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…03) — 6/6 NotRun{NoDeclaredExecutor}, S-7 — Refs #4359

Every §2.1 cell has exactly one admission row; a silent cell rejects the file, Admitted
needs a parity receipt at or above a cited threshold, and no admitted cell raises S-7
(`rex admission-check` exits 10). With infra#1088 open, all six cells are NotRun, so S-7
fires and the experiment STOPs. The §7 premise "apr parity vs llama.cpp" is false at
v0.69.3 (GPU-vs-CPU only); the oracle is an explicit field. The S-6 operator ruling is
recorded in the receipt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`rex score --pilot --split dev` projects the test-split Wilson half-width
on recall at the pilot estimate (design p = 0.5 when the pilot has no
defect in its denominator) and grows the corpus above 0.12 or when the
width cannot be computed. Runtime counts the 10 % re-run; no warm sample
is None, not zero. The spec's ~0.117 is the Wald width; the frozen Wilson
width is ~0.114. Contract rex-pilot-projection-v1 (FALSIFY-RXP-001..003),
each planted RED at pilot_tests.rs:22/:29/:38 and green after restore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 4B shadow lane already runs inside the quorum rail (paiml-implement
#420, advisory-lane.sh); `rex ledger` reads what it records in each
quorum receipt and holds it to REX-07: every quorum carries a shadow row
(no advisory_lane, or lane `off`, is missing), a lane that did not answer
is Unknown{LaneUnavailable}, and the shadow is uncounted and leaves the
width at the counted lanes. On the live PMAT-405 receipt it emits a
correct row (gx10-cuda PASS, width 3) and exits 0. Contract
review-ledger-v1, FALSIFY-RXL-001..003 each planted RED at
ledger_tests.rs:49/:66/:85 and green after restore.

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

`rex ladder REPORT_JSON` reads only a locked, confirmatory
rex-001-report-v1 and returns the 4B lane's rung: shadow by default,
tripwire on H4 (explicit holds + CI lower bound ≥ 0), vote on H4 ∧ H5,
capped by the §4.5 hardware ruling. H5 alone stays shadow (R-11).
Contract rex-promotion-ladder-v1; FALSIFY-RXG-001..003 each planted RED
at ladder_tests.rs:31/:55/:72 and green after restore.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g is RED (Refs #4365)

review-lane-perf-ratchet-v1 (§5.1). `rex ratchet record` turns a tag's warm,
non-rerun receipts on the primary cell into per-item wall times; `rex ratchet
check` arms after 3 tags and compares each later tag with the best earlier
one by a paired bootstrap of the Harrell–Davis p95 ratio (ALPHA from the
prereg). Exit 10 on RED.

Finding (FALSIFY-RXR-002): the §4 unpaired CI-overlap rule, and a paired
nearest-rank p95, both miss a planted +10% at n=130; the HD paired rule
catches it 40/40 with 0/40 false alarms at 3% per-item run noise.

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

- champion.rs: five fail-closed §5.4 gates, 20 evaluations per sealed test
  version (refusals spend nothing, R-6), pin-bump promotion with rollback sha,
  two-consecutive-gold-escape demotion.
- fewshot.rs: B1b retrieval from non-test gold only (R-2), never the query;
  guard() scans each fenced block alone. Finding: a gold `- defect at` line
  after a fence joins the last hunk, so a whole-text scan missed a sealed
  test diff in a rendered prompt (RXF-003 pins it).
- `rex challenge` (exit 0 promoted / 10 rejected / 11 refused); score_cmd
  uses verify_signed.
- contracts/review-champion-challenger-v1.yaml (RXC-001..003, RXF-001..003).

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

- b2.rs: one review-b2-loop-v1 row per B2 tier from the refusal ledger
  (refusal-receipt-v1): ready only on an acceptance receipt, verb_refused
  on a ledger row, unledgered otherwise — an absent refusal is not
  acceptance. teacher_receipt(): sha, count, k, m=1, 0 test hits over the
  non-test pool; fails closed on an empty sealed index.
- `rex b2 status|teacher-receipt` (status exits 11 while any row is NotRun).
- contracts/review-b2-loop-v1.yaml (FALSIFY-RXB-001..003).
- At HEAD all four rows read unledgered: distill/finetune/merge/quantize
  have no measured qwen35 refusal row (EPIC #4002 owns the verbs).

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

The session engine now ranks the raw logits at every decode step, before any
repeat penalty, and records (token_id, logit, logprob) for the top K together
with the chosen token. The records reach `apr run --json` as
`logprobs: {top_k, prompt_token_ids, steps}` through a thread-local, the same
way GENERATION_START already does, because dense_turn drops the Turn.

Recording turns off the device-greedy shortcut, since that path never returns
the logits to the host. A route that cannot record refuses the flag by name and
never reports an empty list: --trace (the legacy instrumented loops), qwen3_moe,
and every non-GGUF path.

top_k_logprobs breaks ties the way ops::argmax does (lower id first) and never
ranks NaN. Tests: a case table, logprob_of agreement and sum-to-one, a
positive control (top-1 == chosen at every step), a negative control (moving
the forward's argmax moves the record), pre-penalty ranking, the device-argmax
bypass, and a refusal case table.

Not yet run: the real-model controls on Qwen3.5-0.8B-Q4_K_M (#4004 ids).
Parked to backlog per the cop's operator relay (0.71.0 staffing).

Pmat-Ticket: PMAT-4026

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t dispatch time only (Refs #4354)

Operator ruling 2026-09-25 (cop-inbox/handoff/ruling-r9-b.md, sha b6db6866c604).
lambda-cuda may run the apr SHADOW lane only as rung 2: rung 1 (gx10-cuda)
returned NotRun and the GPU lock is free at dispatch. No resident serve, no
preloaded weights, no REX cells, no teacher/finetune jobs; other R-9
exclusions stand. A lock taken mid-round = NotRun{Busy}, ladder continues,
no retry on the same cell. Fallback order gx10-cuda -> lambda-cuda ->
intel-wgpu -> mini-metal -> intel-cpu -> NotRun{NoExecutor}. S-4, G7 and the
lambda-minutes metric follow R-9. R-9 is §6, outside the §2-§5 prereg span:
FALSIFY-REX-PREREG-001..003 pass, the lock is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ha carried; holds() needs identity_gaps == 0 (Refs #4354)

- Shadow is now Verdict{verdict,cell,backend} | NotRun(NoExecutor|Busy|
  Timeout|ContextOverflow|TrainActive) | Refused{cell,removed_by:
  ladder|gpu-proof|parse}, deny_unknown_fields. Unknown::LaneUnavailable
  {why: free text} is gone: one spelling with receipt-lint.
- The receipt's advisory_lane.row carries it; a missing or unparsable row
  is a violation, never a silent Unknown.
- weights_sha256 is read from the receipt, and Coverage::holds() requires
  identity_gaps == 0.
- FALSIFY-RXL-004 (no weights sha => holds() false) and RXL-005 (free-text
  reason fails to parse), each killed by its mutant (holds() clause
  dropped; deny_unknown_fields dropped).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a row (Refs #4354)

Operator ruling PRM-001 v2 items 3, 4 and 6 (cop-inbox/handoff/ruling-prm-v2.md).
v1 was locked with 0 data rows, so nothing becomes exploratory (R-1).

Locked (§3-§4, stats.rs, analysis plan):
- H1 = VERDICT identity across cells (verdict_divergence); bytes descriptive.
- H4 = one rule: paired bootstrap of p4B - min(pHaiku, pAgy), min taken
  inside each resample (bootstrap_vs_min_voter); Holm-adjusted one-sided p
  decides, CI report-only. ladder.rs reads p_holm (report schema v2).
- H5 decided on class-R recall only; per-class P/R recall + precision
  descriptive (paired_parsed_class; Scored carries its class).
- §4.1 admission oracle = the cell's parity.oracle; llama.cpp@d1d3c3396
  where declared (#4444), else apr-parity-gpu-cpu + H1 verdict check.
- §4.6 train-active falls through the dispatch ladder, never blocks;
  lane rows use the #436 Verdict|NotRun|Refused spelling.
- κ on per-item errors, apr vs each voter (error_kappa, kappa_andon).

Unlocked: §0.4/R-11 zero-weight shadow; R-9/S-4/§9.1 lambda accounting
(experiment cells, teacher, resident serve: 0 min; shadow rung 2 measured).

Falsifiers: min-inside-resample differs from pick-once on tied voters;
byte-only diff does not reject H1; RXG-004 CI is report-only; prereg 001-003.
90/90 lib tests; pv validate both contracts; clippy -D warnings clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ith the cop's pending-instrument ruling; §9 report IN_PROGRESS

Spec copied from the cop handoff (sha e8764b72adbe) and amended with §1.1: T0 found
none of the §1 verify commands exist; G1/G7/G10/G11/G13 are [U]-pending-instrument
tied to T1/T10/T1/T6/T16; G2/G4 are #436 scope; G12's command replaced (apr has no
--model-arch).

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

Five fleet hosts, 2026-09-25: cleanupPeriodDays 36500 on all five; files older than 30 d
lambda-labs 3278, intel 290, gx10 1, mini 0, yoga 0 (matches infra#1135 T0). An unreachable
host prints UNREACHABLE and exits 1. Case table: unset/numeric/no-settings key, planted old file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ruling agent-trace item 6. FALSIFY-TPA-001 (planted AWS key quarantined) and TPA-002 (planted test-split diff refused) fail 4/4 against admit() admitting everything.

Refs #4354

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…aled-test hit refuses

Ruling agent-trace item 6. src/pool.rs: admit() gives each JSONL row one verdict. Admitted | Quarantined (secret hit, held byte-identical, never redacted) | Refused (sealed-test diff or sha, via contamination::Index, checked first) | Unchecked (empty sealed index admits nothing). The scanner has no regex dependency, scans JSON-unescaped strings, and uses whole-word prefixes. Contract training-pool-admission-v1 (TPA-001..004; pv validate: 0 errors). RED->GREEN: 4/4 fail on the stub at b177c3af8, 4/4 pass here; crate lib 87/87; clippy -D warnings clean. Mutants killed: no-unescape, no-refuse, no-quarantine, empty-index-admits, no-boundary.

Refs #4354

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

PRA-001 T6. Secret scan = union of builtin detectors and the gitleaks
v8.30.1 ruleset vendored verbatim as data (MIT, sha256-pinned), interpreted
in-process in Rust. 20 run-time-built canaries, per-rule ablation, AWS doc key
(gitleaks-allowlisted) caught by builtin only. Contract renamed from
training-pool-admission-v1.

This commit's scan() clears its hits: TAS-001/003/004 and both case tables
are RED (5 failed, 91 passed).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Refs #4354
scan() returns its hits. Mutation table (tests run: secret + pool):
killed no-gitleaks, no-builtin, no-allowlists, no-entropy, no-unescape,
no-translate, and-allows; survived no-keywords (equivalent: the keyword
prefilter is a speed-up, every upstream regex already requires its keyword).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Refs #4354
…ash-only index

PRA-001 T7. FALSIFY-RCC-004 plants a sealed diff with whitespace, blank-line,
partial-rename and re-base perturbation into a candidate pool. The exact
checks (diff sha, hunk sha) miss it; the Index stores sketches but does not
scan them yet, so RCC-004 is red (110/111). cluster.rs (MOSS-normalised
12-token shingles, bottom-64 MinHash, 0.7 containment), RCC-005/006 and the
contract v1.1 land here with it.

Refs #4354

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…item is refused

PRA-001 T7. Index::scan now checks each text's shingles against the sealed
sketches: >= 0.7 of an item's bottom-64 sketch present is a `cluster` hit, so
the perturbed sealed item is Refused at pool admission (111/111).
False-positive probe, 391 real .rs commit diffs from origin/main, all 152,490
ordered pairs: 7 clustered at k=12 (0.005%), all one family of templated beat
test files (copies with renamed identifiers); k=5 gave 469. Mutation table:
whitespace skip, rename, header skip, marker, min-shingles, blank-line skip,
threshold and scan removal are all killed.

Refs #4354

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…pend-only outcome joins; v1 rows still read (Refs #4354)

v1 kept each counted lane's findings as a count, so every quorum lost its
(input, output, findings) triple. v2 keeps the text verbatim and the lane's
agent-trace-v1 input/output shas. Text that was never captured is None, a
trace gap, never an empty list that would train as 'no issues'.

- read_row dispatches on schema; both v1 shapes written under that name
  (402aff8 tagged shadow, 89d994b typed #436 shadow) still parse.
- v1::Row::migrate keeps the count, leaves text/shas None, and refuses a
  legacy shadow (no cell/backend, so no typed #436 form).
- OutcomeJoin: the latest join by at wins; the row is never rewritten.
- contracts/review-ledger-v2.yaml carries FALSIFY-RXL-001..008; v1's stale
  Unknown{LaneUnavailable} equation now points at the typed form.

Mutants killed (3/3): migrate invents Some(vec![]), trace_gap ignores
missing text, an unknown schema read as v1. Crate lib 103/103, clippy -D
warnings clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Top-k=20 teacher-logit blob per PRA-001 §2.7: u32 ids, T=1 log-softmax
(f16), logsumexp_full (f32), retained mass M (f16) so 1−M is the true
tail. Closed JSON header, zstd LE columns, one shared validator for
encode and decode. Raw 130 B/token at k=20; encoded M6 needs real apr
serve rows (top-k capture not yet in apr serve).

FALSIFY-SPL-001..004 in contracts/sparse-logits-v1.yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…te in a valid frame) (Refs #4354)

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

New module kappa_probe.rs (stats.rs, spec §2–§5 and analysis-plan.md are
untouched: prereg-locked). κ_err = the frozen stats::error_kappa on per-item
error indicators vs GOLD, shadow lane vs every counted lane, over matured gold
rows of one split. Unparsed verdicts, silver/pending/quarantined rows and
pending/closed_unmerged outcomes are excluded, never counted as errors. A pair
under min_n, or with κ undefined, is `insufficient` and prints no number.

`rex lane-kappa` prints the scoreboard; with --candidate it gates: δ and min_n
come only from the run manifest's lane_independence block, registered strictly
before training started. Exit 12 = S-14 andon (κ rise > δ on any counted lane,
a lane missing or insufficient on either side, an unusable manifest, or
--candidate without --manifest).

FALSIFY-LIND-001..004 were planted RED against a stub (4/4 failed), then GREEN.
Four mutants each kill the falsifier they target: gate `>`→`>=` (003), no gold
filter (001), registered_at `>=`→`>` (004), gate ignores the manifest's min_n
(002; it first survived and got its own assertion). CLI smoke: exit
0 scoreboard, 12 on a voter-copying candidate, 12 with no manifest, 2 usage.
`make lane-kappa ROWS=F [SPLIT=val] [MIN_N | MANIFEST CANDIDATE]` wraps it.

Refs #4354

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…g_sha f0b4e4ac) (Refs #4354)

- docs/specifications/PRM-001-prometheus.md = handoff v3, sha256 c9b52d08d7eb.
- rex-prereg-v2 now locks v3 §2–§5 + stats.rs + analysis plan v2 + prompt v1
  in docs/audits/prm-001/prereg.lock. The 17:09Z draft lock (1f4acb3d) is void.
- v1 lock docs/audits/rex-001/prereg.lock (ef51087d) restored byte-exact from
  5f0ae10 and never edited again (operator). The v1 spec §2–§5 and v1 plan are
  restored byte-exact too; FALSIFY-REX-PREREG-004 keeps them verifying.
- v1 spec gains a superseded banner above §0 (outside §2–§5).
- stats.rs: H7 max-pair gate `h7_holds` (δ-free, undecided on any undefined κ);
  the v2 silver-step `kappa_andon` is removed (v3 has no silver pool).
- A planted §3 edit on disk: `rex prereg-check` rc=1 (DRIFT spec_s2_s5).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	README.md
#	contracts/census.json
… own cluster (Refs #4354)

FALSIFY-TDD-001..004 fail 4/4 against the one-cluster-per-item stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
noahgift and others added 17 commits September 25, 2026 23:16
…s written, not Some("lambda-cuda")

Refs #4354

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…, H4+H5+H7 → tie-breaker, lambda primary → refused (S-4); S-4 reason names the cell

Follow-ups named, not wired: pi#428 (quorum gate), infra#1095 (arbiter).

Refs #4354

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…5/5 FALSIFY-TOJ fail

G-MAT: gold only after the 14 d outcome window; pending is never a
negative. TOJ-001 plants the v3 row's own check (a 3-day-old outcome
refused as gold); TOJ-005 the weekly matured count. split_guard gains
date(), the inverse of day().

Refs #4354

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the 14 d window (Refs #4354)

resolve(): merged/closed/reverted/escape events per repo#PR give the v3
outcome. A revert <= 14 d after the merge is reverted_le14d; a later
revert or any escape is regression_escape. Anything dated before the
merge does not count. Until 14 UTC dates have passed the row reads
pending with no matured date. gold() emits matured outcomes plus the
latest HRQ ruling per round, and refuses forged immature rows and
rulings with no ruler. matured_between() gives the weekly count.

FALSIFY-TOJ-001..005 GREEN; 170/170 crate tests; clippy -D warnings clean.
Mutation table: 19/19 killed (after adding before-merge revert/escape cases).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y (Refs #4354, #4447)

Frozen 4-stratum set (2k/8k/16k/32k, 50 each) of real quorum diffs, sealed
items excluded by sha/hunk/cluster, one per repo#PR, sha256(seed||sha) order,
short strata refused. Summary refuses mixed sets, GGUF/cell/tag mismatch,
unequal coverage, not-run rows; ratios are apr/llama_cpp; queue budget is the
slowest voter's p95. Contract review-replay-v1 (FALSIFY-REPLAY-001..006).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tests (Refs #4354, #4447)

examples/replay.rs: build counts composed tokens via llama-server
/apply-template + /tokenize, requires the sealed manifest AND sketch file;
run replays each item through apr serve or llama-server (same GGUF/cell);
voters extracts consultations.<lane>.duration_seconds from quorum receipts;
summary prints the §9 speed block. Mutants on replay.rs: 20/20 killed after
these tests (15/20 before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #4026 #4354

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

The step record now carries chosen_logprob and the full-vocab logsumexp_full,
both taken from the logits the top-k is ranked from, before any penalty. A
sampled token outside the top k keeps a defined logprob, and sparse-logits-v1
can derive the tail mass (PRM C11).

Chat requests take logprobs:true plus top_logprobs (0..=20). The Qwen3.5 buffered
path returns choices[0].logprobs.content[] with token, token_id, logprob,
top_logprobs[] and logsumexp_full. These are refused with 400, never ignored:
top_logprobs without logprobs, more than 20, stream with logprobs, and any
backend other than the Qwen3.5 session (the refusal names the architecture).

Not yet: streamed logprobs, /v1/completions logprobs, and live controls on a
real Qwen3.5 GGUF.

Refs #4026 #4354

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

sparse_logits::from_chat_completion reads choices[0].logprobs.content from a
#4026 apr serve chat body and returns one TokenLogits per output token, ready
for encode(). It refuses, by name, anything it cannot record honestly: no
logprobs, no logsumexp_full (a hosted or foreign body, whose tail mass is
unknowable), fewer than k alternatives, logprobs that don't descend, a
logprob above 0, or a missing token_id.

Tests: a serve-shaped body captures to the same record as
TokenLogits::from_full_logits on the full row (70k vocab, so u32 ids are
exercised), and it round-trips through encode/decode. There is a planted-case
table for every refusal, with an unplanted control.

Refs #4026 #4354

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

apr serve (6f909ca, CPU, backend=cpu) chat top_logprobs=20 was compared with
llama-server (60b06ab9a, -ngl 0) on Qwen3.5-0.8B Q4_K_M. The oracle ran the
official template (enable_thinking false), took ids, and was teacher-forced on
apr's generated ids. 6 prompts, 29 steps.

Results: top-1 28/29 and overlap ≥16 28/29 (both misses are p1 step 0,
" Paris" vs "Paris"). max |Δlogprob| was 0.19–1.65, and the pre-registered 0.25
bar fails on 25/29 steps.

Controls: the oracle against itself passes (Δ 0); a one-step shift and a
cross-prompt comparison both fail; three refusals return 400.

Findings for the cop: a forward-parity gap between apr and llama.cpp on CPU
Q4_K, and POST /tokenize not parsing special tokens.

Refs #4026 #4354

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#4026 live control

Refs #4354

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lit, <|im_start|> parsed

Refs #4354

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

Refs #4354

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s, hash-verified (Refs #4354, #4447)

corpus v1 (REX-02) predates the T7 sketch step, so docs/audits/review-corpus
had a manifest and no sketch file, and `replay build` refuses without one:
with no sketches the contamination scan is exact-hash only and a near-dup of
a sealed item could enter the replay set.

`replay sketch --items DIR` writes the file from items-v1.tar, and only when
every test-split diff hashes to its sealed diff_sha256. Run on
/mnt/nvme-raid0/rex-corpus/v1/items-v1.tar: 105/105 test items verified and
sketched.

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

The /tokenize reply for a large PRM-S1 candidate diff exceeded 10 MB and
replay build aborted with 'response too big for into_string'.

Refs #4354

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

200/200 replay rows have null prompt_ms/prompt_tps/decode_tps for apr on
gx10; llama.cpp d1d3c3396 returns timings on the same set and cell.

Refs #4354

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

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=4459 head=c861b4b0695a2dac5ecc34a76b189304d65efef0 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

noahgift and others added 5 commits September 26, 2026 05:07
The receipt asserted 'oracle vs itself: pass, max Δ 0' with no script or file
behind it (sonnet-5 quorum seat, FAIL INV-4/5). positive_control.sh extracts
compare() from c4026_live.sh unchanged and runs it on p2/p3/p5 oracle data
reshaped into apr's response shape: pass, max Δ 0 on 7/8/8 steps. A 0.3-nat
plant in one alternative fails it (Δ 0.30).

Refs #4354

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

read_bounded is extracted from post() unchanged; the case table fails on the >cap rows (exit 101).

Refs #4354

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

read_bounded reads cap+1 bytes and returns Err when the body ran over. A cut-off reply returned as Ok would have been scored as the whole one. aprender-review-experiment --lib: 191 passed.

Refs #4354

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… limit (#4459 quorum r3)

cap.saturating_add(1) left no headroom at cap = u64::MAX (agy r3). Read exactly cap bytes, then probe the underlying reader: Ok now means EOF for every cap. Invalid UTF-8 is refused via String::from_utf8. aprender-review-experiment --lib in a private target dir: 192 passed.

Refs #4354

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

Copy link
Copy Markdown
Member Author

Closed to bring open PRs under the cap of 10 (18 open). The branch is kept (not deleted), and so is its head. Reopen this PR, or re-cut it from the branch as a PR of at most 4 rows, after the 0.70.0 FINAL, when merge-main is allowed again.

Why it was not landed or folded: the required checks gate and workspace-test are red at this head. The PR is behind or conflicting with main, and no bulk merge-main is allowed before FINAL. No legal fold target exists (PRCAP plan, 22:15Z).

Head c861b4b069 on rex/001. The owner has held this PR as branch-only since #4502 opened. Its rex/PRM commits (bounded reads, PRM-S1 replay, #4026 receipt) share no patch with any open PR. Closes #4446 when it is re-cut.

@noahgift noahgift closed this Sep 29, 2026
auto-merge was automatically disabled September 29, 2026 03:52

Pull request was closed

@noahgift
noahgift deleted the rex/001 branch October 9, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner:aprender-84 owning session (cop inbox claims)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PRA-001 T12: agent-trace terms/provider tagging + provider/channel-excluding pool rebuild (P-TERMS)

1 participant