From 6174960ebfee189bbd150465a382716d137af35b Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Thu, 5 Nov 2026 15:25:38 -0400 Subject: [PATCH 1/2] docs/laya-first: say which template check runs today, and that the per-row digest is step 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The section ended with a present-tense claim the tree does not meet: that `~/.local/share/1bit/laya-first.json` "ships with the digests measured on 2026-11-05" and that "the table's validator (§8 step 3) fails" a row that skips one. Measured on main: `config/laya-first.json` — the file compiled in as `laya_first_default.h` — has no `template_sha256` in any of its four rows, nothing in `app/`, `src/`, `tests/`, `include/` or `os/` reads one, and no installed `/laya-first.json` exists on the c25/c26 media, the staging trees or the box (§8 step 3 is where that field and the pull-time check are scheduled). A design note that asserts a check which does not run is the exact failure this row is supposed to prevent, so the paragraph now states what is true: - the one template check on a routed pull today is the load-time one, against the engine's `config/template-pins.json` — 7 names, three of them these rows; - that check warns unless the row ships `--template-pin-strict` (§9), and it catches one thing: the same name carrying a different template; - the field, the per-row requirement and the pull-time refusal are §8 step 3, and the digests they will need are already measured — `models/pins.json` records 57f1fd00f0… (short), b55ecfbbbc… (prose), 87710339d2… (code), 12827f24b7… (long_doc). Doc only; no code, no table and no operand changed. --- docs/laya-first.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/docs/laya-first.md b/docs/laya-first.md index 4011376cf..68edc0db1 100644 --- a/docs/laya-first.md +++ b/docs/laya-first.md @@ -173,7 +173,7 @@ So a GGUF row gains one required field, and a Q4NX row the same field read from | field | meaning | |---|---| -| `template_sha256` | the sha256 of the exact `tokenizer.chat_template` bytes the row expects (a GGUF's metadata key, or a Q4NX container's `tokenizer_config.json` string); `"none"` for a row that must carry no template. Omitting it is a table error, not a default — a row with no expectation is a row nothing checks ([template-publishing.md](template-publishing.md)) | +| `template_sha256` | the sha256 of the exact `tokenizer.chat_template` bytes the row expects (a GGUF's metadata key, or a Q4NX container's `tokenizer_config.json` string); `"none"` for a row that must carry no template. Omitting it is a table error, not a default — a row with no expectation is a row nothing checks ([template-publishing.md](template-publishing.md)). **Required when §8 step 3 lands; no row carries it today — see the last paragraph of this section.** | Two checks, in order, and both are refusals of *that row*, never of the request: @@ -193,12 +193,24 @@ the table), and the load-time check is the only one that covers a model loaded b router, months later. Neither is a trust anchor for a model nobody has pinned — for those the line is the deliverable, and it is what makes the difference visible in a log. -`~/.local/share/1bit/laya-first.json` ships with the digests measured on 2026-11-05 for the rows above -(`zaya1-8b-Q4_K_M.gguf`, `Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf` and `Qwen3.8-27B-UD-Q4_K_XL.gguf` -are the same files the engine's `config/template-pins.json` already pins; a Q4NX row is checked from -its `tokenizer_config.json` because it has no GGUF). Adding a row means adding its digest — the table -is not allowed to grow a row that skips that step, and the table's validator (§8 step 3) fails one that -does. +**What runs today, and what does not.** The field and the pull-time check are §8 step 3, and neither is +in the tree yet: `config/laya-first.json` (compiled in as `laya_first_default.h`) carries no +`template_sha256`, nothing in `app/`, `src/`, `tests/` or `os/` reads one, and no installed +`/laya-first.json` ships with digests. So a routed pull is checked at exactly **one** place +today — **load time**, against the engine's own `config/template-pins.json`, which pins 7 model names, +three of them the rows above (`zaya1-8b-Q4_K_M.gguf` `b55ecfbbbc…`, +`Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf` `87710339d2…`, `Qwen3.8-27B-UD-Q4_K_XL.gguf` +`12827f24b7…`; the `short` row's `Qwen3-0.6B-Q8_0.gguf` is not in that table). That check warns unless +the row ships `--template-pin-strict` (§9), and it catches one thing only — the same name carrying a +different template. A file under a new name, or a row whose digest nobody recorded, is visible only as +the load line; that is the gap step 3 closes. + +When step 3 lands, the digests are already measured — `models/pins.json` records the template of every +file we serve and publish, including all four rows here (`57f1fd00f0…` short, `b55ecfbbbc…` prose, +`87710339d2…` code, `12827f24b7…` long_doc; a Q4NX row is read from its `tokenizer_config.json` +because it has no GGUF). Adding a row then means adding its digest: the table is not allowed to grow a +row that skips that step, and the validator that fails one is part of step 3, not something to assume +today. ### Device: HRX by default, and the NPU only when the GPU is busy or hot From e7eedb0c0c3b57525ecd7fd1c6f0d21a9b03bad5 Mon Sep 17 00:00:00 2001 From: bong-water-water-bong Date: Thu, 5 Nov 2026 17:03:05 -0400 Subject: [PATCH 2/2] docs/laya-first: cite the digests that are in this tree, not one an open PR would add MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The reviewer's blocker, and it is the same class as the text being fixed: the paragraph said the digests for the four rows "are already measured — models/pins.json records the template of every file we serve and publish", and `models/pins.json` does not exist in this tree (`ls` fails, `git cat-file -e origin/main:models/pins.json` fails). It is engine #1148, open, so a reader on `main` was sent to a path that is not there, and the "already measured" claim rested on an unmerged working tree — including the one digest that exists nowhere else yet (`short`'s 57f1fd00f0…). Now the paragraph says what a reader can check today: - three of the four rows are in `config/template-pins.json` **now** — zaya1-8b-q4_k_m.gguf b55ecfbbbc…, qwen3-coder-30b-a3b-instruct-q4_k_m.gguf 87710339d2…, qwen3.8-27b-ud-q4_k_xl.gguf 12827f24b7… — because they are the same files the load-time check already pins (verified against the tree at this head); - the fourth, `short`'s Qwen3-0.6B-Q8_0.gguf 57f1fd00f0…, is **not in any table in this tree yet**; it is measured, it is added by #1158, and it is recorded with every other served/published file in #1148's models/pins.json — said as such rather than implied to be here. The Q4NX sentence now links docs/npu-chat-template.md, which is in this tree (#1115). Nothing else in the paragraph changed: what runs today, what it catches, and what step 3 adds all verified in the review. --- docs/laya-first.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/laya-first.md b/docs/laya-first.md index 68edc0db1..f2dff1d2b 100644 --- a/docs/laya-first.md +++ b/docs/laya-first.md @@ -205,12 +205,15 @@ the row ships `--template-pin-strict` (§9), and it catches one thing only — t different template. A file under a new name, or a row whose digest nobody recorded, is visible only as the load line; that is the gap step 3 closes. -When step 3 lands, the digests are already measured — `models/pins.json` records the template of every -file we serve and publish, including all four rows here (`57f1fd00f0…` short, `b55ecfbbbc…` prose, -`87710339d2…` code, `12827f24b7…` long_doc; a Q4NX row is read from its `tokenizer_config.json` -because it has no GGUF). Adding a row then means adding its digest: the table is not allowed to grow a -row that skips that step, and the validator that fails one is part of step 3, not something to assume -today. +When step 3 lands it will need one digest per row, and three of the four are in the tree **today** in +`config/template-pins.json` — `zaya1-8b-q4_k_m.gguf` `b55ecfbbbc…`, +`qwen3-coder-30b-a3b-instruct-q4_k_m.gguf` `87710339d2…`, `qwen3.8-27b-ud-q4_k_xl.gguf` `12827f24b7…` — +because those rows are the same files the load-time check already pins. The fourth, `short`'s +`Qwen3-0.6B-Q8_0.gguf` `57f1fd00f0…`, is not in any table in this tree yet: it is measured, and it is added +by #1158 (and recorded with every other file we serve and publish in `models/pins.json`, #1148). A Q4NX row +is read from its `tokenizer_config.json` because it has no GGUF ([npu-chat-template.md](npu-chat-template.md)). +Adding a row then means adding its digest: the table is not allowed to grow a row that skips that step, and +the validator that fails one is part of step 3, not something to assume today. ### Device: HRX by default, and the NPU only when the GPU is busy or hot