Docs/Secrets and preview
#

Secrets and preview

Secrets and preview (used from first-sandbox; skip the SECRETS part if the app needs none)

The plan (cofactor sandbox guide plan) already named every key and every blocker decision, and the human approved it. Do not ask again; hand over what the plan listed.

Secrets (skip if the app needs none; frontend-only always needs some)

Hand over, as listed in the approved plan: "Run this in your own shell", with the exact command and the provider's test key in an environment variable:

bash
printf %s "$KEY" | cofactor sandbox secret set NAME --application <app>

Never take a key in chat. Frontend-only: also one <PERSONA>_PASSWORD secret per persona (the secrets topic's naming rule), the account's own password on that backend.

Done when cofactor sandbox secret list --application <app> shows every name. Setting a secret after a claim is fine: the next claim, run or refresh of an affected environment rebuilds its snapshot first.

Preview and blockers

Blockers are the feasibility step's unsupported and unknown items, and every real item with neither a test mode nor a stand-in named for it in the matrix (its call leaves the sandbox; a named stand-in, such as ElasticMQ for SQS, is installed as a service instead). Each already has a decision in the approved plan (install it as a service, emulate, stub in the app, skip the journey); apply it, and never give the sandbox real credentials for one.

Run cofactor sandbox claim --application <app> --wait: the app serves over https, the seed data is there, and each persona from cofactor sandbox show <id> signs in through the app's real login in a browser session (the cofactor-browser-testing skill). With several environments, also cofactor sandbox verify-env --application <app>. Frontend-only: check with cofactor sandbox verify-env --application <app> instead, since the printed passwords are not the backend's; tell the human to sign in with the account's own password; count as blockers only the frontend's own items.

Done when every persona signs in and each blocker's planned decision is in place. Report the URL and the persona to sign in as; do not ask a preview question. If something differs from the plan, follow plan, section 5. Keep the claim running: it is the proving claim first-sandbox keeps through tests, nightly and report, destroyed only at the end of report.

The first tests and the nightly suite come after verify and before the report.

Next: cofactor setup guide verify