Skip to content

D56 — shell: the list of models read again is taken only signed by the decider's key, now built in - #825

Merged
napkinstack-agent[bot] merged 7 commits into
mainfrom
shell-d56-list-signed-by-the-deciders-key
Nov 15, 2026
Merged

napkinstack-agent[bot] merged 7 commits into
mainfrom
shell-d56-list-signed-by-the-deciders-key

Conversation

@kitokey-marc

@kitokey-marc kitokey-marc Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

D56 — shell: the list of models read again is taken only signed by the decider's key, now built in

Taken up from #643, by dime-hermes, credited as co-author of each commit. This pull request is #643's shell part only. Its capture part is in #787. Its platform part (onnxruntime <1.24) is left out: no need for it has been shown.


Module

modules/shell — exactly one.

  • This pull request touches a single module
  • ⚠️ Cross-module — the cross-module label is required, justification below

Deliverable

Out of cycle: D56 is not among cycle 10's deliverables (D92 to D95). It is in cycle 10's What needs a person, which waited on the decider's key. The decider made that key on 2026-11-14, in their own terminal. The key an agent made on 2026-11-05 for #643 is dropped and appears nowhere here.

D56's criteria, from cycle 09:

  1. A list read again is offered only when its signature verifies under the decider's key, built in. A list unsigned, signed by another key, or changed after it was signed is refused, the shipped list stays, and one sentence says so.
  2. A pull request that changes the list is refused when its signature does not verify against the built-in key.
  3. ADR-0010 says option 4 is adopted. This was already done on main: ADR-0010, Amended by D56.
  4. The shell's tests hold the refusals with a key made for the test.

What it changes

  • The key. registry::PUBLIC_KEY is set to the decider's public key, minisign public key 28AD0E835D7AF31E. Its file, registry/kitokey-models.pub, sits beside the list. Both are public.

  • The signature. registry/models.json.minisig is the decider's signature of models.json as it is on main at 1d6ee69 (sha256 1627839e…046b). The coordinator checked it with minisign -Vm … -p kitokey-models.pub: « Signature and comment signature verified ». registry/.gitattributes (* -text) keeps both files' bytes as signed.

  • No new code path. The verifying (registry::verify, minisign-verify), the refusals and the repository's check were already on main, waiting on the key. With the key built in:

    • Settings show the button « Mettre à jour la liste (host) » again, in place of « elle attend la clé qui la signe »;
    • the_list_in_the_repository_verifies… now verifies the list in the repository against the key, in every pull request.
  • Who signs. The decider alone, in their own terminal. AGENTS.md now says it in the list's paragraph: a change to models.json is signed again by the decider (minisign -Sm modules/shell/registry/models.json) and its .minisig committed with it. An agent never holds, makes or asks for the private key, and never signs. Until the decider has signed it, the shell's tests refuse a change to the list. README.md names the key built in.

  • The e2e's scenario W read « the list waits on the key ». It now reads the list again through the window, served on this machine:

    • unsigned: refused, said;
    • changed after the decider signed it: refused, said;
    • with a signature that is none: refused, said;
    • main's list with the decider's signature: taken.

    The shipped models stay offered throughout.

Oracle

  • The success criterion was written before the implementation: three tests in tests/registry_fetch.rs (75e78d4), under registry::PUBLIC_KEY itself:
    • the_key_built_in_is_the_deciders: the key's number is 28AD0E835D7AF31E.
    • under_the_key_built_in_a_list_signed_by_another_key_changed_after_it_was_signed_or_unsigned_is_refused. Each case is refused for its signature, never for a key that is missing, and after both files are asked for:
      • signed by a key the test makes;
      • main's list changed after the decider signed it;
      • unsigned.
    • under_the_key_built_in_the_list_the_decider_signed_is_taken: main's list, with the decider's signature, is taken whole.
    • The test lists are signed by a key the test makes, or carry the signature the decider made. No test signs with the decider's key.
  • It was seen failing, for the right reason: with the signature in place and no key built in (PUBLIC_KEY = None, 75e78d4's registry.rs), all three failed.
    • « a key built in »;
    • « signed by another key: the list is not read again: it waits on the decider's key »;
    • Err("the list is not read again: it waits on the decider's key").
  • It passes now: cargo test --test registry_fetch: 14 passed, with « registry/models.json: its signature verifies against the key built in ».
  • Added after ines's verification (044856c): a_list_signed_in_minisigns_legacy_form_is_refused. verify passes LEGACY_ALLOWED, false, named. The test's key was made outside it (openssl's Ed25519, minisign's boxes, its private key not kept), because the minisign crate writes the pre-hashed form only. The same bytes are signed both ways: pre-hashed, verified; legacy, refused. With true passed, the test fails.

Kind of oracle: unit tests on a server played on this machine, and the e2e's W through the window.


Review budget

  • Lines changed (excluding generated): 157 (128 added, 29 removed); 60 of them the e2e's scenario, 71 the tests
  • Files touched: 7
  • Within budget

Contracts

  • No contract affected

Definition of Done

  • Oracle green

  • Lint, format, types: cargo fmt --check, cargo clippy --all-targets -D warnings, python3 -m py_compile scripts/e2e_window.py; ruff F,PLW2901 finds nothing new in W (the findings left are shell: the e2e scripts pass ruff's F and PLW2901, before the hook that holds them to it #820's)

  • Unit tests: as above. Two mutants of src/registry.rs, each applied alone (git diff --numstat) then restored, were both killed:

    • fetch not verifying the signature: the refusal tests failed, the test key's and the decider's;
    • another key string in PUBLIC_KEY: the key's number, the repository's check and the decider's list taken all failed.

    The shell's whole suite passes except tests/migrate.rs::a_model_written_from_home_is_named_where_it_went. That test writes in $HOME, which this sandbox refuses; it fails the same way on main, and shell: the test of a model written from the home uses a home of its own #819 fixes it.

  • E2E on critical journeys: W, the coordinator's run

  • Affected documentation updated: AGENTS.md (who signs, and how) and README.md (the key built in). ADR-0010 already records D56.

  • Diff self-reviewed line by line


Test sheet

Verifier: session bfdb23f1-1199-4cda-ab11-22e178326643

# Given · when · then Kind Result Evidence Commit Confirmed
S1 Given the shell built, when its key is read, then it is the decider's, 28AD0E835D7AF31E, and the list in the repository verifies under it automated passed cargo test --locked --test registry_fetch at 788584f, run by me: 14 passed, the_key_built_in_is_the_deciders ok, and « registry/models.json: its signature verifies against the key built in ». minisign -Vm models.json -p kitokey-models.pub: « Signature and comment signature verified »; models.json sha256 1627839e…046b; key id read from the .pub and the .minisig: 28AD0E835D7AF31E both. Hand mutant, models.json changed by one space: 3 tests failed, killed. Run again by me at 788584f (main merged in again): registry_fetch 14 passed; the mutants and probes above were run at 044856c, src/registry.rs and the registry's files unchanged since. 788584f —
S2 Given a list read again under the key built in, when it is signed by another key, changed after the decider signed it, or unsigned, then it is refused for its signature, and the shipped list stays automated passed under_the_key_built_in_a_list_signed_by_another_key_changed_after_it_was_signed_or_unsigned_is_refused ok at 788584f. Hand mutants: verify always Ok → 4 failed, killed; fetch ignoring verify → 2 failed, killed. My probes under the key built in, a list served here: a test key's signature with the decider's key id written in, the trusted comment changed, the list in CRLF, with a BOM, or one line feed more → each refused, « the list's signature does not verify (The signature verification failed) ». Run again by me at 788584f (main merged in again): registry_fetch 14 passed; the mutants and probes above were run at 044856c, src/registry.rs and the registry's files unchanged since. 788584f —
S3 Given main's list with the decider's signature, when it is read again, then it is taken whole automated passed under_the_key_built_in_the_list_the_decider_signed_is_taken ok at 788584f; my probe: main's list with models.json.minisig, served here → Ok, 2 models. Run again by me at 788584f (main merged in again): registry_fetch 14 passed; the mutants and probes above were run at 044856c, src/registry.rs and the registry's files unchanged since. 788584f —
S4 Given Settings, a list served on this machine, when « Mettre à jour la liste » is pressed, then: unsigned, changed, or with a signature that is none, it is refused and said, the models shipped still offered; with the decider's signature, it is taken automated passed The attest's full shell e2e at 788584f (evidence-825/e2e.txt, audit.json commit 788584f, verdict passed; 1825 ok, 0 FAIL, « e2e: passed »; read by me), W: « the key built in: a button offers to read the list again, its host shown, nothing said of a key awaited », « a list unsigned: refused, said, the models shipped still offered », « a list changed after the decider signed it: refused, said, the models shipped still offered », « a list its signature none: refused, said, the models shipped still offered », « the list the decider signed: taken, nothing said against it, its models offered » — each ok. 788584f —
S5 Given the repository, when it is searched, then no private key is in it, and the key an agent made on 2026-11-05 (RWS44…) is nowhere automated passed At 044856c: git grep -IE 'RWQAAEIy|RWRTY0Iy|RWS44|PRIVATE KEY' (minisign's secret-key prefixes, unencrypted and encrypted) → nothing; no .key, .sec or .pem file; git log -S RWS44 over main at 065c769, this head 788584f and the workspace's branches → no commit. The test key is made in memory each run, never written; the legacy fixture holds a public key and two signatures only. Searched again at 788584f: the same, nothing. 788584f —
S6 Given a list signed in minisign's legacy form — the list itself, not its hash —, when it is verified, then it is refused, while the same bytes signed pre-hashed by the same key verify automated passed a_list_signed_in_minisigns_legacy_form_is_refused ok at 788584f (14 passed): the same key and bytes, ED pre-hashed → Ok, Ed legacy → refused, and refused by in_the_repository. Hand mutant LEGACY_ALLOWED = true → that test failed, killed: the legacy fixture is a valid signature, refused for its form alone. Run again by me at 788584f (main merged in again): registry_fetch 14 passed; the mutants and probes above were run at 044856c, src/registry.rs and the registry's files unchanged since. 788584f —
S7 Given a pull request that changes registry/models.json, when the shell's tests run, then a list whose signature does not verify against the key built in — unsigned, signed by another key, or changed after it was signed — is refused (D56, criterion 2): the_list_in_the_repository_verifies_or_waits_on_the_key_and_the_check_says_which on the list in the tree, the_check_of_the_list_in_the_repository_refuses_a_signature_that_does_not_verify_once_a_key_is_built_in on the three refusals automated passed cargo test --locked --test registry_fetch at 788584f, run by me: 14 passed — the_list_in_the_repository_verifies_or_waits_on_the_key_and_the_check_says_which (the list in the repository, « its signature verifies against the key built in ») and the_check_of_the_list_in_the_repository_refuses_a_signature_that_does_not_verify_once_a_key_is_built_in (unsigned, another key's, changed after signing: each refused). Hand mutant at 788584f, registry/models.json changed by one space after the decider signed it: the_list_in_the_repository_verifies… and two others FAIL, 11 passed — a pull request that changes the list without signing it again is refused. 788584f —

Verifier's remarks: S2's « signed by another key » carries that key's own number, so it is refused at the key id before any curve: my P1 probe holds the forged one with the decider's number. The trusted comment (timestamp, file) is verified, never read: an older list the decider signed would be taken again — a rollback, followed in #826. D56's criterion 2 is now S7. W's « taken » is seen only as no refusal said: the list served is the shipped one, so the page draws the same models either way.


Summary

DONE

  • registry::PUBLIC_KEY is the decider's key. Their signature of the list and their public key's file sit beside the list.
  • An oracle under the key built in: another key's list, a list changed after signing, and an unsigned list are refused; the decider's list is taken.
  • The e2e's W reads the list again through the window, refused three ways and taken once.
  • AGENTS.md says that the decider alone signs the list, in their own terminal.

VERIFIED

  • The oracle red with no key, for the reason above, then green: 14 passed with the legacy form's test, which fails with true passed.
  • tests/registry.rs: 6 passed. fmt, clippy and py_compile; the pre-commit hooks.
  • Two mutants killed.
  • The shell's suite: one failure, sandbox-only, the same as on main.
  • Attested 5/5 at 788584f (nstack 0.29.0), main (36f9754) merged in: the full shell e2e green, scenario W among it; ines's sheet.

ASSUMED

  • raw.githubusercontent.com/NapkinStack/wholeheard/… (registry::ADDRESS, the name before D86) still answers. On 2026-11-14 it answered 200, as did …/kitokey/…. A follow-up may name kitokey; it is left as it is here (minimum).

NOT VERIFIED

  • An older list signed by the decider, offered again (rollback): a separate threat, in its own issue (the coordinator's), not this pull request's.
  • W through the window: the coordinator runs it. Its « taken » is read as no refusal said and both files asked for: the only list the decider signed is the one built in, so taking it changes nothing on the page. A list that differs would need the decider's signature of it; the unit test under_the_key_built_in_the_list_the_decider_signed_is_taken checks the list taken whole.
  • A list read again from main itself, once this merges: the same bytes and signature as in S3, so only the forge's answer differs.

RISKS

  • Any later change to models.json needs the decider's new signature in the same pull request, or the shell's tests are red, by design.
  • Releases ship with this key: rotating it later leaves older copies refusing lists signed by a new one (ADR-0010).
  • offered_refresh_waits and Settings' « waits » branch are now reached by no build. They are left as they are, for a build without a key.

Signals to report

  • I had to look at another module's implementation
  • A kernel or playbook rule got in my way for no good reason
  • A quality gate blocked without improving quality
  • A rule applied by hand would be worth automating

🤖 Generated with Claude Code

kitokey-marc Bot and others added 3 commits November 14, 2026 15:32
… decider's (red)

The key built in is the decider's, by its number (28AD0E835D7AF31E). Under it, a list
signed by another key, changed after the decider signed it, or unsigned is refused for its
signature; the list on main with the decider's signature is taken. The test lists are signed
by a key the test makes, or are main's with the signature the decider made of it. The e2e's
W reads the list again through the window the same way. Red: no key is built in.

Taken up from #643, by dime-hermes.

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: dime-hermes[bot] <349604419+dime-hermes[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nder it (D56)

`registry::PUBLIC_KEY`, `minisign public key 28AD0E835D7AF31E`, made in the decider's own
terminal. Settings offer the list read again from then on; one unsigned, signed by another
key or changed since is refused, and said. The list in the repository is signed by the
decider alone, its .minisig committed beside it.

Taken up from #643, by dime-hermes.

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: dime-hermes[bot] <349604419+dime-hermes[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…le (D56)

models.json.minisig, made by the decider in their own terminal over models.json at 1d6ee69
(sha256 1627839e…046b), verified by minisign -Vm against kitokey-models.pub. Both public.
A change to models.json is signed again by the decider.

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: dime-hermes[bot] <349604419+dime-hermes[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kitokey-marc kitokey-marc Bot added the out-of-cycle Work outside the current cycle: an incident, a production defect; justified in the PR label Nov 14, 2026
… says so (D56)

`LEGACY_ALLOWED`, false, named where `verify` passes it. The test's lists are signed by a
key made outside it (openssl's Ed25519, minisign's boxes; its private key not kept), the
same bytes both ways: pre-hashed, verified; legacy, refused. With `true` passed, the test
fails (ines's survivor on #825).

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kitokey-marc Bot and others added 2 commits November 15, 2026 06:15
…eciders-key

The transcription tests' children waited for as gone on main: this branch's attest no longer
carries #845's race.

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eciders-key

D60's bar waited for whole on main: confidential_kept no longer reads its height after a fixed
pause in this branch's e2e.

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eciders-key

The e2e finds a start's tray item in a second: this branch's attest saves about 20 minutes.

Agent-Session: 14f73956-90b9-46a3-9fcc-52dc45c43948
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@napkinstack-agent
napkinstack-agent Bot merged commit 22d8aeb into main Nov 15, 2026
14 of 17 checks passed
@napkinstack-agent
napkinstack-agent Bot deleted the shell-d56-list-signed-by-the-deciders-key branch November 15, 2026 13:32
kitokey-lina Bot added a commit that referenced this pull request Nov 15, 2026
…built it in — and #825's scenario unfolds « Modèles à télécharger » first (#782)

With the decider's key in `registry::PUBLIC_KEY` since #825, `registry_waits` was always false and
« La liste ne peut pas encore être mise à jour : elle attend la clé qui la signe » never said:
removed, with its flag, its field in both languages and its test. WITHOUT_COMMENT lowered to 596.
list_refreshed now unfolds « Modèles à télécharger », folded since this pull request, before it
reads and presses « Mettre à jour la liste ».

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
napkinstack-agent Bot pushed a commit that referenced this pull request Nov 15, 2026
…ement asked for this computer, « cet ordinateur » said (#782, #859, #775) (#866)

* shell: test — Settings' follow-up of D95: « Modèles à télécharger » folded, no agreement for this computer, « cet ordinateur » said (#782, #859, #775), the oracle alone

BN: « Modèles à télécharger » a disclosure, closed at first, kept as left when drawn again; « Refaire
le réglage » in « Général » (already so: held). BG: no agreement asked for the stand-in on this
computer, nor for one's own address there, one for a host elsewhere (#859); the save said « cet
ordinateur », not an address and a port (#775).

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* shell: Settings' follow-up of D95 — « Modèles à télécharger » folded, no agreement asked for this computer, the save said « cet ordinateur » (#782, #859, #775)

- « Modèles à télécharger » is a disclosure (ARIA APG), as « Avancé »: closed at first, the list, its
  refresh and its sentence under it, kept as the user left it over the page's drawings (#782).
- A transcription service on this computer asks for no agreement, chosen above or typed under
  « Avancé »: none is owed there, as the shell already judges (#859).
- Saved there, it says « cet ordinateur transcrira… », never its address and port (#775); a new
  sentence, service_saved_here, commented on its field.

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* shell: e2e — BG writes this computer's Whisper models itself, so that it reads the same alone as in the whole run

Played alone (KITOKEY_E2E_ONLY), BG found no model on this computer: main() writes them in K, which
a partial run does not play. Seen in the coordinator's runs of the Settings follow-up, at ce2ed51 and
cd3c244 alike: « on this computer: the models said by name… », got []. K's, when it ran, are kept.

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* shell: e2e — Z saves OpenRouter's stand-in on this computer with no agreement to tick, as #859 has it (#866)

#866's attest at 2e02fa7 stopped in Z: it ticked the agreement for the stand-in on 127.0.0.1, which
#859 now hides, and the click raised (ElementNotInteractableException). Z now checks that no
agreement is asked there and saves; a host elsewhere is still agreed to above, under « Avancé ».

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* shell: the list's sentence for a key not yet built in removed — #825 built it in — and #825's scenario unfolds « Modèles à télécharger » first (#782)

With the decider's key in `registry::PUBLIC_KEY` since #825, `registry_waits` was always false and
« La liste ne peut pas encore être mise à jour : elle attend la clé qui la signe » never said:
removed, with its flag, its field in both languages and its test. WITHOUT_COMMENT lowered to 596.
list_refreshed now unfolds « Modèles à télécharger », folded since this pull request, before it
reads and presses « Mettre à jour la liste ».

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* shell: e2e — W's stand-in says it closes each connection, so that the signature is never asked on a closed one (#866)

At d5875b4, W alone failed its last read once: the shell logged « the list's signature could not be
read (io: Peer disconnected) », the signature's request never reaching the stand-in. It answers in
HTTP/1.0, closing each connection without saying so, and the client may send the next request on
the one just closed. It now says « Connection: close ». Main's run of W alone was green: a race.

Agent-Session: 04463b35-db3b-47ea-bef5-6892f2baedb7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: kitokey-lina[bot] <356214857+kitokey-lina[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

out-of-cycle Work outside the current cycle: an incident, a production defect; justified in the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants