Skip to content

Bench mode gated by the provisioning-token file; DEVICE_KEY_SECRET gone - #3

Merged
daniel-frenkel merged 1 commit into
mainfrom
feat/provision-token
Sep 25, 2026
Merged

daniel-frenkel merged 1 commit into
mainfrom
feat/provision-token

Conversation

@daniel-frenkel

Copy link
Copy Markdown
Member

Base: origin/main at 8c547e349821a0b746142c5c667e2172ad148d4d, fetched and branched immediately before the commit.

Companion to valar-scopes' Worker-minted keys (docs/provisioning-mint.md). The bench holds a provisioning token, not the fleet secret.

  • The gate: bench mode is gated by ~/.config/valar-flasher/provision-token and refuses in one sentence without it. It checks presence only, and passes the file's path to the provisioner with --token-file, so there's one path and its contents are never handed over.
  • The secret is gone: valar_flasher.py never reads DEVICE_KEY_SECRET. A test asserts that, with a control.
  • The fake provisioner now refuses without --token-file, so every DONE in the tests also proves the flasher passed it.
  • Bench-loop tests get a 20 s deadline. The first sabotage run, which dropped --token-file, hung instead of going red: a loop waiting for a count that no failing board can reach. It also left the file sabotaged until I restored it by hand and confirmed the restore.
  • Tests: 41 pass. Sabotage (drop --token-file): 8 red, as predicted. Restored: green.

🤖 Generated with Claude Code

… is gone

Keys are minted by the Worker (valar-scopes docs/provisioning-mint.md), so the
bench holds a PROVISION_TOKEN in ~/.config/valar-flasher/provision-token instead
of the fleet secret. Bench mode refuses in one sentence without the file, checks
presence only, and passes the file's PATH to the provisioner with --token-file
(one path, never its contents). A test asserts the flasher never reads
DEVICE_KEY_SECRET, with a control.

Also: bench-loop tests get a 20 s deadline. The first sabotage run (drop
--token-file) HUNG instead of going red -- a loop waiting for a count no failing
board can reach. With the deadline: 8 red, as predicted; restored, 41 pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@daniel-frenkel
daniel-frenkel merged commit 615d01d into main Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant