Repository navigation
plx-ci setup: one step that prepares a job, with every vault read in one function - #71
Merged
davidjalbers merged 17 commits intoDec 2, 2026
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Whether the workflows hand their jobs the service account token of the CI vault; the workflows that act on it are rendered elsewhere. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…as it, else with the service account (PLX-227) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… before the service account (PLX-227) Co-Authored-By: Claude Opus 5.5 <[email protected]>
… key is in no variable of it (PLX-227) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d the logins to the forge's registries (PLX-227) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t, a token of the App for the operations repo (PLX-227) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he App that may read the operations repo (PLX-227) The App's key stays in plx-ci: the job is handed a token for the one repo and contents: read, masked, in place of an action that would need the key as a step output. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… slot (PLX-227) Co-Authored-By: Claude Opus 5.5 <[email protected]>
…the app hosts, and a repo job gets the caches' tokens (PLX-227) The command's header states its steps in order. The fakes of the tests answer a plain download and keep the options of the command sudo runs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ors, dry-run, modes, names (PLX-227) - A deploy job on a forge runner waits for the network map even where the repo names a cache host, and reads no cache token. - With -v, the lines of a key pasted into a one-line field are each masked before they are shown. - A 404 and a 401 of the App's calls each end in one line naming the App's client ID and the operations repo, told apart, with no JWT; the fake curl answers as curl does under fail-with-body or write-out. - Under --dry-run a deploy job calls nothing but the vault. - The Docker config and the npmrc are 0600 in directories 0700; the npmrc moves to a directory of its own. - The repo job joins as ci-<run>-repo. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, the App's errors named (PLX-227) - A deploy job waits for the network map, never for the cache host: its key reaches the app hosts alone. - keyLines masks every line it returns, so a key pasted into a one-line field is masked line by line however it is printed later, -v included. - The App's calls read the HTTP status with write-out instead of fail-with-body: a 401 and a 404 each end in one line naming the App's client ID and the operations repo; the unreachable line for a missing installation is gone. - Under --dry-run a deploy job calls no API. - The Docker config and the npmrc are written 0600 in directories 0700; the npmrc in a directory of its own. - A job joins the overlay as ci-<run id>-<job>, so the two joins of a run never meet each other's peer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
davidjalbers
deleted the
davidjalbers/plx-227-plx-ci-setup-one-step-that-prepares-a
branch
December 2, 2026 03:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
plx-ci setup <repo|deploy>prepares a job of an app repo's pipeline in one step, after the checkout and mise (Decisions § 6.4, § 6.5, § 8.1 to § 8.3, § 3.9, § 5.10).Every vault read of a job goes through one function,
core/vault.ts.repo-turboasksci_service_account; the workflows that act on it are not in this pull request.What it does
The header of
packages/cli-ci/src/commands/setup.tsstates the steps in order.OP_CONNECT_HOSTandOP_CONNECT_TOKEN, and withOP_SERVICE_ACCOUNT_TOKENotherwise; with both,opis started without the service account's token.With neither, the job fails in one line that names both.
-v, which prints the input ofssh-add -, shows it masked.repo: the server-actions key (repo_<repo>/server-actions-key) as the step outputserver-actions-key, in no variable of the job.A Docker config of the job's own under
RUNNER_TEMPwith the job's token forghcr.io(DOCKER_CONFIG), and with--private-packagesan npmrc for the forge's package registry (NPM_CONFIG_USERCONFIG); each file 0600 in a directory 0700.deploy: the deploy key in an SSH agent on a socket underRUNNER_TEMP(SSH_AUTH_SOCK), and the step outputoperations-token, a token of the tenant's App that may read the operations repo and nothing else.Where GitHub answers 401 (key and client ID do not belong together, or the clock is off) or 404 (the App is not installed on the operations repo), the job fails in one line naming the App's client ID and
<owner>/<operations repo>, the two told apart, with no secret.Under
--dry-runit calls no API.RUNNER_ENVIRONMENT=github-hosted) with--overlay netbird, where the job isdeployor the repo names a cache host: join the overlay as_deploy.ymldoes it today, as the peerci-<run id>-<job>so that the two joins of one run never meet each other's peer, and forrepohandPLX_TURBO_SHARED_TOKENandPLX_TURBO_TRUSTED_TOKEN.On a slot it joins nothing and reads no cache token.
Decisions this pull request made that the issue did not
plx-ci(§ 6.3 left it open).setup deploysigns the App's JWT itself and mints an installation token for the one repo withcontents: read, by GitHub's documented endpoints, throughcurl -K -, which writes the HTTP status after the body (write-out) so that a refused call can be named. The job never holds the App's private key, which could mint tokens for every repo the App is installed on; keeping the action would have put that key into a step output. The cost: the token is not revoked at the end of the job, and expires within the hour.turbo-cache/shared-tokenandturbo-cache/trusted-tokenin<owner>-ci.PLX_TURBO_CACHE_HOSTin the job's environment, whichmise.toml's[env]would carry from the answerturbo_cache_host, behind one function (cacheHostOf). To be aligned with the cache-host work.{"auths": {"ghcr.io": {"auth": …}}}) in a directory underRUNNER_TEMPnamed byDOCKER_CONFIG, instead of runningcrane auth loginordocker login: no tool needs installing for it, a slot has no Docker daemon, and the runner emptiesRUNNER_TEMPat the end of each job. Tried: crane reads it (crane auth get). The encoded credential is masked.::warning::and the tokens handed, so that the verbs run without the remote cache (§ 5.8); a deploy job whose join fails fails.Peers countnaming any peer), since it does not know the app hosts before the inventory is checked out, even where the repo's environment names a cache host: the deploy key reaches the app hosts alone. A repo job waits for the cache host's name to resolve, as_deploy.ymlwaits for its host.ci_service_accountdefaults to yes, and is asked of app repos only.core/setup.ts(0.82.0, today's default), no longer an input.Lines
1024 added, 4 removed: 428 of source (
commands/setup.ts93, of which 58 are its header;core/setup.ts281;core/vault.ts54), 579 of tests and their fakes, 12 for the template question, 5 for the command list and the package's description.The additions stay because they replace workflow YAML that the workflow issue deletes: in
_e2e.yml,_publish-deploy.ymland_deploy.yml, five copies of "How the vault is read", seven loads ofload-secrets-action, threecraneinstalls, three registry logins, two package-registry logins, the App-token action of the deploy plan, the overlay join and the loading of the SSH key.Verify
At e8113e3, the head after the review's fixes: the 28 tests of
setuppass, and the hooks'mise checkon each commit andmise teston the push passed.At 5dfa643, before them,
TURBO_FORCE=true mise run testandmise run e2epassed.The forced test run at the new head and the e2e before the merge are in the reports to the coordinator.
🤖 Generated with Claude Code