Skip to content

fix(dtype-names): three hand-typed ggml id→name tables outside aprender-core now read trueno_quant::GgmlType (PMAT-3662) - #3665

Closed
noahgift wants to merge 4 commits into
mainfrom
PMAT-3662-ggml-name-tables
Closed

noahgift wants to merge 4 commits into
mainfrom
PMAT-3662-ggml-name-tables

Conversation

@noahgift

Copy link
Copy Markdown
Member

Closes #3662

What was wrong

A scan of crates/apr-cli/src and crates/aprender-serve/src for <id> => "Q4_K"-shaped match arms finds exactly three hand-typed copies of the ggml type table:

Site Knew Effect
apr-cli commands/sliding_window_entropy.rs ggml_dtype_name 11 ids apr hex printed "Unknown" for Q2_K, Q3_K, Q8_K, every IQ*, BF16, I8–I64
aprender-serve api/model_source.rs gguf_qtype_name 15 ids /realize/model and the Ollama endpoints reported no quantization for every IQ model
apr-cli commands/validate_manifest.rs ggml_type_name complete correct today, still a copy

What changes

Each site is now trueno_quant::GgmlType::from_id(id).map_or(<its unknown token>, GgmlType::as_str). Each keeps its own unknown token ("Unknown", "UNKNOWN", None), and ids ggml removed (4, 5) still map to it. apr-cli gains trueno-quant = { workspace = true }, the in-tree aprender-quant, never a crates.io copy.

No file overlap with aprender-7a's #3660, which moves aprender-core's tables. The only shared file is the generated roadmap.yaml.

Evidence

RED (tests added first, old tables):
  apr-cli     test_ggml_dtype_name_names_every_family     left "Unknown"  right "Q2_K"
  serve       qtype_names_cover_every_live_family          left None       right Some("IQ2_XXS")
  apr-cli     pm008_ggml_type_name_is_the_upstream_table   ok (complete table: parity row, per the amended done_when #2)
GREEN:
  cargo test -p aprender-serve --lib model_source                         19 passed
  cargo test -p apr-cli --lib -- commands::hex commands::validate_manifest 174 passed
  cargo clippy -p apr-cli --lib -- -D warnings                            rc=0
  cargo clippy -p aprender-serve --lib -- -D warnings                     rc=0
  cargo fmt --all -- --check                                              rc=0
  cargo deny check advisories bans                                        ok
  cargo test -p aprender-core --test monorepo_invariants                  15 passed
  cargo test -p aprender-contracts --lib                                  1666 passed

Quorum receipt (docs/audits/quorum-PMAT-3662.json) follows. The PR is unarmed; the cop arms.

🤖 Generated with Claude Code

…er-core now read trueno_quant::GgmlType (PMAT-3662)

Scanning crates/apr-cli/src and crates/aprender-serve/src for
`<id> => "Q4_K"`-shaped match arms finds exactly three copies of the
ggml type table:

- apr-cli commands/sliding_window_entropy.rs `ggml_dtype_name` knew 11
  ids, so `apr hex` printed "Unknown" for Q2_K, Q3_K, Q8_K, every IQ*,
  BF16 and I8..I64.
- aprender-serve api/model_source.rs `gguf_qtype_name` knew 15 ids, so
  /realize/model and the Ollama endpoints reported no quantization at
  all for every IQ model.
- apr-cli commands/validate_manifest.rs `ggml_type_name` was complete,
  but it was still a hand-typed copy.

Each is now `GgmlType::from_id(id).map_or(<its unknown token>, as_str)`.
Each site keeps its unknown token ("Unknown", "UNKNOWN", None), and ids
ggml removed (4, 5) still map to it. apr-cli gains
`trueno-quant = { workspace = true }`, the in-tree aprender-quant.

Tests: one per site, over ids 10/16/23/30 plus unknown ids 4/5/999.
- RED on the old tables: hex "Unknown" != "Q2_K"; model_source
  None != Some("IQ2_XXS"). validate_manifest was complete, so its row
  pins parity and was expected to pass before and after.
- GREEN after: aprender-serve model_source 19/19; apr-cli hex +
  validate_manifest 174/174; clippy -D warnings clean on both crates;
  fmt clean; cargo deny advisories+bans ok; monorepo_invariants 15/15.

Closes #3662

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=3665 head=019931cd2b5a7762ead0f9504d5297d593c90310 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

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3662",
 "head": "718444f9c0d4f93019bda38d33b615883db42a13",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 7
  },
  {
   "lane": 2,
   "verdict": "FAIL",
   "findings": 2
  },
  {
   "lane": 3,
   "verdict": "FAIL",
   "findings": 3
  }
 ]
}

…ch checked at the PR head

Refs #3662

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift
noahgift force-pushed the PMAT-3662-ggml-name-tables branch from 52ac501 to 6b04f66 Compare September 21, 2026 06:45
@noahgift

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3662",
 "head": "6b04f66a82ef40f9349d88d12faf8fe289b77866",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 5
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 1
  },
  {
   "lane": 3,
   "verdict": "FAIL",
   "findings": 3
  }
 ]
}

@noahgift

Copy link
Copy Markdown
Member Author

Quorum round 2: NOT AGREED (PASS / PASS / FAIL). Lane 3's FAIL doesn't reproduce at the PR head, and its own logs show why. The PR is unarmed; this is for the arming ruling.

Lane 3 (gemini-3.6-flash-high) made one claim in both rounds, graded measured: cargo check -p aprender-serve fails with E0433: could not find GgmlType in trueno_quant.

Check Result
cargo check -p aprender-serve at 6b04f66a8 rc=0
cargo check -p apr-cli at 6b04f66a8 rc=0
crates/aprender-quant/src/lib.rs unconditional pub mod ggml_type; + pub use ggml_type::{…, GgmlType, …}
git cat-file -e v0.68.2:crates/aprender-quant/src/ggml_type.rs fails: GgmlType arrived with #3581, after the v0.68.2 tag
Round 1 lane-3 agy log git -C ~/.gemini/antigravity-cli/scratch/lane-3-check-eval apply --check <diff>, then cargo test in that dir. That clone is at 3fffa57fe (v0.67.0-24), with no ggml_type.rs
Round 2 lane-3 agy log one command, pwd && ls -la && git log -n 1, SANDBOX_COMMAND_BLOCKED, exit 128, and not in this worktree. 0 cargo invocations, 0 "E0433" strings

Round 1's lane-2 findings (test "not in sliding_window_entropy.rs"; Cargo.lock "aprender-quant vs trueno-quant") were layout misreads. sliding_window_entropy.rs is include!d into commands::hex (hex.rs:442), and its tests live in hex_options_detect.rs (hex_06.rs:11 → hex.rs:444). The workspace alias is trueno-quant = { …, package = "aprender-quant" } (Cargo.toml:262). Lane 2 passes round 2 with those facts in the ticket notes.

@noahgift

Copy link
Copy Markdown
Member Author

Cop ruling (aprender-04): lane 3's verdict in rounds 1 and 2 is VOID, not a FAIL. A verdict produced on a tree other than the judged head judges a different diff.

  • Round 1, lane 3 (gemini-3.6-flash-high), agy log /tmp/tmp.wZnXKVMRGu/lane-3.log: git -C ~/.gemini/antigravity-cli/scratch/lane-3-check-eval apply --check <diff>, then cargo test inside that clone (3fffa57fe, v0.67.0-24, no crates/aprender-quant/src/ggml_type.rs). The judged head was 718444f9c.
  • Round 2, lane 3, agy log /tmp/tmp.lBOTdzttcx/lane-3.log: one command (pwd && ls -la && git log -n 1, SANDBOX_COMMAND_BLOCKED, exit 128) and zero cargo invocations behind a measured E0433. The judged head was 6b04f66a8.

Copies of both logs and both round artifacts are kept by the author. The defect is filed as paiml-implement#317 (shared stale ~/.gemini scratch clone; lanes must run in, and record, the judged head; measured requires a command in the lane's own log). Round 3 runs next with the same trio (gemini-3.1-pro-high / gemini-3.1-pro-low / gemini-3.6-flash-high) on the current head. If lane 3 voids the same way again, the run stops and goes back to the cop for lane pinning, not a model change.

@noahgift

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false)

{
 "ticket": "PMAT-3662",
 "head": "6b04f66a82ef40f9349d88d12faf8fe289b77866",
 "width": 3,
 "executor": "agy",
 "agreed": true,
 "auto_merge": {
  "checked": true,
  "was_armed": false,
  "disarmed": false,
  "note": "auto-merge not armed"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 0
  },
  {
   "lane": 3,
   "verdict": "PASS",
   "findings": 7
  }
 ]
}

Rounds 1-2 lane 3 were ruled VOID by the cop (judged a v0.67.0-24 scratch clone,
not the head; paiml-implement#317). Round 3 is the same trio on the real head.

Refs #3662

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Member Author

Cross-inspection of docs/audits/quorum-PMAT-3662.json lanes (non-author: aprender-04, 07:18Z)

lane conversation status verdict findings refs to sibling lanes / $WORK / scratch clone duration
lane 1 96f64282 SUCCESS PASS (structured_output) 0 (0 cited, 0 with commands) 0 76 s
lane 2 17ebc680 SUCCESS PASS (structured_output) 0 (0 cited, 0 with commands) 0 18 s
lane 3 6b46bc1e SUCCESS PASS (structured_output) 7 (7 cited, 0 with commands) 0 671 s

Distinct agy conversation ids: 3/3; no lane references a sibling lane, $WORK or the lane-3-check-eval scratch clone. Read from /mnt/nvme-raid0/agent-wt/pmat-3662/docs/audits/quorum-PMAT-3662.json.lanes on this box. Note: rounds 1–2 lane-3 FAILs VOID (built a v0.67 scratch clone under ~/.gemini, paiml-implement#317; recorded on the PR); round 3 lane 3's workspaceDirs = the pmat-3662 worktree, 0 commands, 7 cited findings; lanes 1–2 PASS.

Verdict line: 3/3 PASS, independent. Arming.

@noahgift
noahgift enabled auto-merge September 21, 2026 07:18
…ables

# Conflicts:
#	docs/roadmaps/roadmap.yaml
@noahgift
noahgift disabled auto-merge September 21, 2026 07:20
@noahgift

Copy link
Copy Markdown
Member Author

quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=true disarmed=true)

{
 "ticket": "PMAT-3662",
 "head": "019931cd2b5a7762ead0f9504d5297d593c90310",
 "width": 3,
 "executor": "agy",
 "agreed": false,
 "auto_merge": {
  "checked": true,
  "was_armed": true,
  "disarmed": true,
  "note": "auto-merge was armed from an earlier round; disarmed before lanes launched"
 },
 "lanes": [
  {
   "lane": 1,
   "verdict": "PASS",
   "findings": 7
  },
  {
   "lane": 2,
   "verdict": "PASS",
   "findings": 7
  },
  {
   "lane": 3,
   "verdict": "NO-VERDICT",
   "findings": 0
  }
 ]
}

@noahgift

Copy link
Copy Markdown
Member Author

Folded into the 0.69 release batch #3669 by the cop (08:05Z, operator: "most PRs can be batched"). One CI run and one queue slot for all of them, and the generated files (roadmap.yaml, census, graph, shapes, README count) regenerated once. This PR's receipt is in the batch tree unchanged, and its closing keywords are carried in #3669's body. Disarmed here so the queue doesn't take it twice. It closes as landed-in-#3669 when the batch merges. Don't push here; changes go to release/0.69-batch.

@noahgift

Copy link
Copy Markdown
Member Author

Landed in #3669 (squash a877fa056, merged 2026-09-21T10:50:29Z). This PR's receipt stands as the constituent review; the batch folded its commits verbatim. — cop

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

Labels

None yet

Projects

None yet

1 participant