fix(dx): show every bootstrap value that is not secret - #163
Merged
Merged
Conversation
The readiness report listed PUBLIC_LVBT_CWA_TOKEN and PUBLIC_LVBT_LABS_CWA_TOKEN as ready with only their hostname, so nobody could check that the right site's token was stored, although the token is public and sent with every page view. The final CI message likewise named CLOUDFLARE_ACCOUNT_ID without its value. Both reports, and `pnpm preflight`, now print these values, and storing a Web Analytics token echoes what was stored. The Cloudflare API token stays the only masked prompt and is still shown only as set or not set. The io seam's masked prompt says it is for real credentials only. A new test runs the bootstrap, runs it again, and runs preflight. It checks that the token never appears in any output or command, that the account id, database ids and Web Analytics tokens do appear in the second run and in preflight, and that only one prompt is masked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
TL;DR
pnpm bootstrapandpnpm preflightnow print every setup value that is not secret, so a maintainer can check it. That covers the Cloudflare account ID, the D1 database ids, and the two Web Analytics tokens. Only the Cloudflare API token stays hidden. It is still typed at a masked prompt and reported only as set or not set.Overview of Changes
The organization's rule is that a bootstrap hides only real credentials. After the idempotency work landed, I audited this bootstrap for that rule.
The masked prompt was already used only for the Cloudflare API token, and the Web Analytics tokens were already asked for at a visible prompt. The database ids and the account ID were already shown in the provisioning and CI tables. Two places still hid a public value:
PUBLIC_LVBT_CWA_TOKENandPUBLIC_LVBT_LABS_CWA_TOKENas ready with only a hostname. Nobody could see which token was stored, even though each one is public and sent with every page view. A token copied from the wrong Web Analytics site is exactly the mistake that report should catch.CLOUDFLARE_ACCOUNT_IDwithout its value.Both now show their values. When the bootstrap stores a Web Analytics token, it also echoes what it stored. The comment on the seam's masked prompt now says it is for real credentials only, and that everything else is asked visibly and shown. The set-up guide says the same in plain words.
For testing, the fake services now record everything the bootstrap prints and which prompts were masked. A new case runs the bootstrap, runs it a second time, and runs preflight. It checks that the API token never appears in any output or command. It also checks that the account ID, both database ids and the Web Analytics token appear in the second run and in preflight, and that exactly one prompt is masked. With the old analytics row put back, the case fails.
pnpm verify:root, the type check, lint and the documentation checks pass.Follow-ups
None.
🤖 Generated with Claude Code