Model keys stay with osfd: a per-run gate, so a run's server holds no key #492
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
A run's
opencode servereads its model key from a file its configuration names. The run fence (braid#203) lets the server read that one file, as it must, so the server's own process still holds a key. Nothing a step executes can reach it: sandboxes do not hold the file.Fix
The design from the first draft of braid#203: providers point at a per-run gate in osfd, which adds the key and streams the answer back. The configuration then names no key file, and the fence's read list is empty.
Done when
No rendered
opencode.jsonholds a{file:reference, a sim's fake model records its requests arriving through the gate, and the fence allows no key file.Split from braid#203 by the owner's decision, 2026-11-11.
Shipped in pull request 566 (change
model-key-gate-492).Every provider of a run's
opencode.json(the backend, planning, Repair's, a Free run's router) now names/gate/<run>/<provider>on osfd and a token minted for the run. The gate checks the token, forwards to the provider with its key and anx-braid-gatemark, and streams the answer back. A request the server drops mid-answer closes the provider's request too. Thelooktool goes through the gate. The forgejo MCP server is refused with sandboxes on, since it would hand the forge token into a sandbox.Done when, as asked: no rendered
opencode.jsonholds a{file:reference (a test renders every kind, with planning, Repair and Free). Every simulated run now fails unless every request its fake model recorded carries the gate's mark: 7 of 7 on a laptop, 6 of 6 in the image. The fence's read list is empty, read from a configuration that names no file.On production since
19a75bd: the gate answers 401 to a request without its run's token, and the deploy's self-check passed its 6 simulated runs, each now checking the gate's mark. Archived in pull request 568.