Repository navigation
Hold the Build Grant key on the runner - #7
Conversation
The runner generates its own ed25519 key, sends the public half as holder in the check-in, and assembles ployzgrant1: from the Machine Cloud names. A legacy grant response still works. A cancelled job stops ployz build before the work dir holding the key is removed.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
…on TERM The cancel test's stub trapped TERM itself, which hid a ployz build that died on TERM without cleanup. It now dies on TERM unless it models a graceful stop, and ployz build runs with TMPDIR under the work dir, so opened Sealed values go with it on any exit. A Cloud-held grant prints a notice. Key and grant files are 0600 even when one was already there, and a key that is not a 32-byte seed is refused.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Companion to SL9b (Sealed values in GitHub builds). The runner holds its own Build Grant key, so Cloud never sees the grant secret.
What changes
prepare.shgenerates an ed25519 key withnode:cryptobefore the check-in. It writes the 32-byte seed 0600 to the work dir and sends{"holder":"<64 hex>"}as the check-in body.machineinstead ofgrant.grant.jsassemblesployzgrant1:+ base64url(machine ‖ seed) in Node and prints::add-mask::for it before anything else runs. A response withgrant(an older Machine or Cloud) still works.build.shreads the grant from the work dir. An EXIT/INT/TERM trap sends TERM toployz build, waits for it, and only then removes the work dir. Thealways()cleanup inaction.ymlstays.Ship order
Cloud and the daemon ship first, then this tag moves
v1. Plain builds work in every mix. Do not merge or tag until the core PR is deployed.Tests
bash test.shandshellcheck *.shpass on Ubuntu 24.04 (jq 1.7, Node 18). New cases:machineis refused.grantresponse still builds.Removing the trap's
killor itswaiteach fails a test.