…e private-card design, its options and the open owner decision (engine#3385)
Engine#3385 asks where a private Loom card could come from: cards from 1bit-MONSTER/loom-kernels, pinned by
sha, for the route table `1bit serve` reads. No route entry, parser, tool or config names a source kind today,
and the issue says "design note only; no code until the orchestrator says", so this lands the design as
`docs/loom-route.md` "Card sources". It changes no behaviour: no schema, no pin, no parser, no test row.
What the note records, each point cited in the tree:
- a card reaches the cards directory by `loom-fetch` from a published Hugging Face repo, or in the 1bit OS
payload, which pins every file's sha256 and size but downloads from a URL with no credential path
(os/v3/puppy/stage-loom.sh:96-111, os/v3/puppy/loom-cards.pin:21-101);
- serve resolves a card by name and checks no provenance (app/serve.cpp:1662-1688, :1708-1712), so a private
card is servable today on a box that has it, and a missing card is a skip, never a failure;
- a card is `.loom` source that `loom-serve` compiles at load - the opposite of the policy for our closed-source
kernels (docs/hrx.md:1794-1803) - so a package that carries one publishes it;
- the three build-placement options (private builds only / a compiled card artifact / server-side only) and,
for each, where the pin lives, who can verify it and what a leak looks like;
- the three ways the table could name a source, with the two gates each needs: app/loom_route.h:161 refuses a
route key it does not know (:164-171, held by tests/loom_route_test.cpp:89-91) while tools/loom_cards.py
--check passes one (measured below), so a `card_source` key added today would stop serve and pass CI;
- `commit` + `path` is already the content pin in git's object model (scripts/fetch-private.sh:52-56); the
proposed `tree_sha256` is a second identifier that has to be defined exactly, and the per-file
`<sha256> <size> <path>` shape the OS payload already verifies is the existing form to reuse;
- the code list if the owner says introduce it, including the negative release/OS row - a public artifact does
not carry the private card - that nothing asserts today.
The decision is the owner's and is RFC-gated: CONTRIBUTING.md:51-70 puts "a change to how pins move" in
Discussions, with a maintainer recording accept or decline in the thread. This section is the draft that RFC
would link; #3385 stays open.
Evidence
--------
Control. A design note has no failing-before arm to add, so the control is that its claims are the tree's state.
Every file the probes below read is untouched by this diff (`git diff --stat`: docs/loom-route.md only), so the
outputs are the base tree's state as well.
$ git diff --stat
docs/loom-route.md | 154 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 153 insertions(+), 1 deletion(-)
$ git show origin/main:docs/loom-route.md | grep -c '^## Card sources' # 0 (base)
$ grep -c '^## Card sources' docs/loom-route.md # 1 (branch)
$ git grep -n card_source origin/main -- . ':!third_party' # no match, rc 1
(nothing in the tree names a card source; the note's own paragraph says so and dates the measurement)
$ python3 - <<'PY' # the shipped table's key set
import json
d=json.load(open('config/loom-routes.json')); keys=set(); m=set()
for r in d['routes']: keys|=set(r); m|=set(r.get('match') or {})
print('routes:', len(d['routes'])); print('entry keys:', sorted(keys)); print('match keys:', sorted(m))
PY
routes: 9
entry keys: ['args', 'card', 'device', 'gate', 'id', 'match', 'preset']
match keys: ['gguf_sha256', 'gguf_size', 'model']
$ # a copy of config/loom-routes.json with "card_source" added to entry 0 of 9, checked the way CI checks it:
$ python3 tools/loom_cards.py --check --routes ~/.cache/scratch-3385/routes-with-card-source.json --pins models/pins.json
loom-cards check: 0 errors
$ python3 tools/loom_cards.py --check # the tool, unmodified
loom-cards check: 0 errors
The first result is the asymmetry the note names: CI passes a route key that app/loom_route.h:161 refuses at
serve startup, which is why the note's code list changes both gates in one commit.
Gate: `scripts/pre-pr-checks.sh --tree-only --base origin/main` -> "all 16 check(s) green, 2 skipped, 0 could not
be told, 2 open-PR row(s) not run (--tree-only)" - the same summary as the run before the change. The two skips are
hip_f16_audit and kernel_id_selftest: no gpu-kernels tree here ($GPU_KERNELS_DIR unset). No ctest row was added or
run, because this PR changes no code.
Not verified: everything the note records about a private card. No private card was fetched, no pin moved, no
`card_source` implemented, and the hrx-loom 0.3.0 premise for a compiled-only card (which the issue records for
0.2.0) was read in the pinned tree, not measured.
Co-authored-by: bong-water-water-bong <[email protected]>
Lands the design for engine#3385 as a new section,
docs/loom-route.md"Card sources": where a private Loom card could come from, which builds may carry one, how the route table would name a source, and how a pin would be verified. Refs #3385, not Closes: the issue is a DESIGN/RFC request whose closure criterion is a maintainer-recorded decision in a Discussions RFC ("accepted with the chosen option implemented and documented, or declined with the reason indocs/loom-route.md"). That decision — which builds may carry a private card — is the owner's and is not in this PR. No private source is implemented, no pin is moved, no schema is added, and no test row changes.Why the deliverable is a document
The issue says "design note only; no code until the orchestrator says", and CONTRIBUTING's RFC rule (
CONTRIBUTING.md:51-70) makes "a change to how pins move" RFC-gated before code. So the honest state is: an owner decision with no code change now. The note is landed in the tree becausedocs/is where this repo records a design that a reader will need after the issue queue moves on (docs/template-publishing.mdcarries a "Proposal:" section the same way), and because the issue itself namesdocs/loom-route.mdas the place its outcome is written.Two things the reading found that the note states as facts, because they change what a reviewer would otherwise assume:
app/serve.cpp:1662-1688,:1708-1712), so the open question is which installer may install one and which build or image may carry it — not how serve loads it.app/loom_route.h:161refuses any key it does not know (:164-171, held bytests/loom_route_test.cpp:89-91), so acard_sourcekey added to the table makes serve refuse the whole table at startup — whiletools/loom_cards.py --checkpasses it (measured below). Any option that names a source in the table has to change both in one commit.The note
loom-fetchfrom a published Hugging Face repo, or in the 1bit OS payload, whose staging pins every file's sha256 and size but downloads from a URL with no credential path (os/v3/puppy/stage-loom.sh:96-111,os/v3/puppy/loom-cards.pin:21-101)..loomsource thatloom-servecompiles at load (a missing leaf registersfailed, "no alternate source directory or precompiled artifact can satisfy a missing leaf" at theconfig/loom.config:61pin), which is the opposite shape to our closed-source kernels shipping only as compiled code objects (docs/hrx.md:1794-1803). ZAYA1-8B (engine#3322) is measured-only on two independent grounds — private card and the gate's decode bar — so a private source removes the distribution blocker only.card_source/ a source map), including the disclosure question the proposal raises: the tree already keeps private repositories out of the public pins file (tools/pin_watch.py:285-296,docs/model-pins.md:200-202).commit+pathalready fixes content in git's object model (scripts/fetch-private.sh:52-56); the proposedtree_sha256is a second identifier whose definition has to be written down, and the OS payload's per-file<sha256> <size> <path>form is the existing shape that names the file on a mismatch. What no pin proves is listed too (not review, not the weights, not build presence, and nothing to a user of a distributed build).kKeyschange in the same commit as the table key, the loader unchanged, the installer onfetch-private.sh's pin shape, the CI arm that refuses a route key the runtime refuses, the negative release/OS row (a public artifact does not carry the private card) that nothing asserts today, and the gate.Control
A design note has no failing-before arm to add. The control is that the note's claims are the tree's state: every file the probes below read is untouched by this diff, so the outputs are the base tree's state as well.
The shipped table's key set — no entry names a source:
The asymmetry: a copy of
config/loom-routes.jsonwithcard_sourceadded to entry 0 of 9, checked the way CI checks it — passes, whileapp/loom_route.h:161would refuse the table at serve startup:Gate
The same summary as the run on the branch before the change. The two skips are
hip_f16_auditandkernel_id_selftest: no gpu-kernels tree here ($GPU_KERNELS_DIRunset). No ctest row was added or run: this PR changes no code.Not verified
Everything the note records about a private card. No private card was fetched, no pin moved, no
card_sourceimplemented, and the hrx-loom 0.3.0 premise for a compiled-only card (which the issue records for 0.2.0) was read in the pinned tree, not measured. Whether strixhalo has the credentials a private-card gate row would need is not established here.Refs #3385