design-fleet-secrets-key
Prompts:
<task-notification>
<task-id>aaefc5dfa5041ec11</task-id>
<tool-use-id>toolu_01CxGqCiYompmMm5VjpNm4Bh</tool-use-id>
<output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2d812478-ae68-44f2-8075-b2330abd5939/tasks/aaefc5dfa5041ec11.output</output-file>
<status>completed</status>
<summary>Agent "Builder check fleet key spec" finished</summary>
<note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note>
<result>I found two gaps that need answers before planning, plus two smaller points. The code also settles both "builder to confirm" items, so those are given as answers.
**Questions, most important first**
1. **Per-box "holds key" (G4, §5.1) needs a box change. Is that acceptable?** Fleet boxes publish no key fingerprint anywhere.
- `secrets_key_fp` is only written into the edges file (`control/edges/<box>.json`). That loop exits on fleet boxes: `internal/host/edgesfile.go:1012-1014`, via `shouldSkipPublisherElection` (`internal/host/agent.go:4085`, which checks `CARLOS_FLEET`).
- The store door would refuse that write anyway (`internal/edge/storedoor.go:644-679`).
- The fleet box's status snapshot, which the console already reads under `fleets/<f>/` (`internal/console/fleets.go:1186`), has no fingerprint field (`internal/status/snapshot.go`).
So `holds key` / `other key` can only be shown if fleet boxes start publishing the fingerprint, for example in their status snapshot. That breaks §6's "no box change" and §9's "console only". It adds a release floor and a box roll before Task 11. It also changes Task 11's own check ("`fleets ls` says `holds key`"). The alternative is to show only `unknown` per box in v1, or to infer from config refusals, which only gives negative evidence. I need to know which.
2. **What happens to values already sealed to the deployment key on a fleet-placed app when the first key is registered?** §1 says shop already has `SECRET_KEY_BASE` set, so it is sealed to the deployment key with no `sealed_to`. Any store, mail or relay credential minted earlier is in the same state.
- §5.6 only blocks *replacing* a key. §5.3 only checks new writes. So after the first registration these values stay put, and the box refuses them with `cannot_open`.
- That is exactly the "found when an instance starts" failure G5 rules out, and Task 11 would hit it.
Should the first registration be refused, listing the vars to unset and rotate? Should it warn? Or should the plan include a one-time sweep? Each choice is a different task.
3. **Is direct-bucket `carlos secrets set` in scope?** The no-console path (`appconfig_cli.go:987-1000`) seals to the terminal's `CARLOS_SECRETS_PUBKEY`, uses the operator's `CONSOLE_SECRETS_ENVELOPE_V2`, and writes to the bucket directly. It never passes the PUT check. It also cannot see placement, which lives in the console store and the route fallback.
- If it is in scope, it needs its own refusal, probably by reading the routes' `fleet/<f>` region from the registry it already opens.
- If it is out of scope, G3's "enforced in one place" should say so, and the guard test can't cover it.
4. **Is the hostname history active on dev and flagship?** `placeAppTarget` refuses every `apps place` once hosts mode is active or invalidated (`internal/console/fleets.go:627-639`). If it is active, §5.5's `apps place` rule can't be reached there. The only live path is then `apps create --place` adopting an app whose bucket objects already exist (`adoptingExistingApp`, `internal/console/server.go`).
- That path writes placement *after* creating the app row, and best-effort (`server.go:5131-5139`). So §5.5's refusal must run before `createClaimAppRow`, not where placement is written.
- This decides how much of §5.5 gets built and tested now.
**Settled from the code**
- **§5.7 (does the refusal reason reach `carlos instances list`?): no, for any box, fleet or pla ...
… and 59 more, on the branch's Prompts tab.
Squashed from design-fleet-secrets-key into main.
README.md+8 −0apimode.go+83 −9apimode_test.go+3 −3appconfig_cli.go+195 −36appconfig_cli_fleet_test.go+410 −0approved_fleet_secrets_copy_test.go+143 −0cmd/console/main.go+8 −2docs/site/cli.md+24 −0docs/site/rails.md+4 −0docs/site/rootfs.md+2 −0docs/superpowers/notes/census-proposal-fleet-secrets-key.md+29 −0docs/superpowers/plans/2026-10-29-fleet-secrets-key-copy.md+162 −0docs/superpowers/plans/2026-10-29-fleet-secrets-key.md+268 −0docs/superpowers/plans/CODEX-FINDINGS-fleet-secrets-key-plan-R1.md+33 −0docs/superpowers/plans/CODEX-FINDINGS-fleet-secrets-key-plan-R2.md+26 −0docs/superpowers/plans/CODEX-FINDINGS-fleet-secrets-key-plan-R3.md+8 −0docs/superpowers/plans/CODEX-REVIEW-BRIEF-fleet-secrets-key-plan-R2.md+38 −0docs/superpowers/plans/CODEX-REVIEW-BRIEF-fleet-secrets-key-plan-R3.md+13 −0docs/superpowers/plans/CODEX-REVIEW-BRIEF-fleet-secrets-key-plan.md+34 −0docs/superpowers/reviews/CODEX-FINDINGS-fleet-secrets-key-branch-R1.md+58 −0docs/superpowers/reviews/CODEX-FINDINGS-fleet-secrets-key-branch-R2.md+27 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-secrets-key-branch-R2.md+11 −0docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-secrets-key-branch.md+37 −0docs/superpowers/specs/2026-10-29-fleet-secrets-key-design.md+521 −0docs/superpowers/specs/CODEX-FINDINGS-fleet-secrets-key-R1.md+19 −0docs/superpowers/specs/CODEX-FINDINGS-fleet-secrets-key-R2.md+20 −0docs/superpowers/specs/CODEX-FINDINGS-fleet-secrets-key-R3.md+26 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-fleet-secrets-key-R2.md+41 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-fleet-secrets-key-R3.md+32 −0docs/superpowers/specs/CODEX-REVIEW-BRIEF-fleet-secrets-key.md+35 −0fleets.go+155 −6fleets_secrets_key_cli_test.go+448 −0instances_cli.go+38 −2instances_cli_refusals_test.go+57 −0internal/appconfig/appconfig.go+3 −0internal/appconfig/configack_test.go+1 −1internal/appconfig/crypto.go+13 −0internal/appconfig/crypto_bind_test.go+18 −1internal/appconfig/generation_test.go+1 −1internal/appconfig/owned_test.go+1 −1internal/appconfig/sealer.go+67 −0internal/appconfig/sealer_test.go+84 −0internal/appconfig/store.go+7 −5internal/appconfig/store_test.go+1 −1internal/appconfig/sync_test.go+1 −1internal/console/apicli.go+12 −1internal/console/apiconfig.go+165 −17internal/console/apienv.go+15 −0internal/console/apiinstances.go+107 −2internal/console/apiinstanceseed.go+19 −2internal/console/apiinstanceseed_test.go+34 −0internal/console/apimail.go+22 −20internal/console/apirelay.go+5 −0internal/console/apiscan.go+62 −16internal/console/apiscan_keys_test.go+4 −11internal/console/apiscan_rotation_race_test.go+4 −6internal/console/apistore.go+57 −20internal/console/apistore_provision.go+6 −2internal/console/apistore_provision_test.go+8 −3internal/console/apisystem.go+19 −8internal/console/authcli.go+4 −0internal/console/claim_invariant_fixtures_test.go+2 −1internal/console/claim_invariant_moves_test.go+33 −6internal/console/claim_invariant_probes_nonapp_test.go+34 −0internal/console/claim_invariant_probes_world_test.go+17 −0internal/console/claim_workers.go+3 −3internal/console/fleetowner.go+67 −2internal/console/fleets.go+65 −5internal/console/fleetsecrets_mint_test.go+385 −0internal/console/fleetsecrets_moves_test.go+345 −0internal/console/fleetsecrets_relay_test.go+652 −0internal/console/fleetsecretskey.go+442 −0internal/console/fleetsecretskey_test.go+555 −0internal/console/instanceprivatestore.go+16 −8internal/console/instances_config_refusals_test.go+273 −0internal/console/movesconsole_test.go+16 −4internal/console/planstorage.go+44 −8internal/console/relayenv.go+30 −22internal/console/relayops.go+135 −33internal/console/relayops_test.go+13 −1internal/console/scan_review_regression_test.go+6 −18internal/console/scankeysync.go+31 −6internal/console/scankeysync_hash_test.go+30 −0internal/console/scankeysync_test.go+29 −14internal/console/sealkey.go+309 −0internal/console/sealkey_guard_test.go+657 −0internal/console/sealkey_test.go+687 −0internal/console/server.go+38 −6internal/console/svcroutes_test.go+5 −2internal/console/teamcreds.go+8 −7internal/console/teamcreds_test.go+3 −3internal/console/templates/fleet_byo.html+3 −1internal/console/templates/fleetdetail.html+7 −0internal/console/testdata/claim-routes.txt+1 −0internal/console/testdata/sealguard/aliased/aliased.go+16 −0internal/console/testdata/sealguard/arbitrary/arbitrary.go+14 −0internal/console/testdata/sealguard/choose/choose.go+11 −0internal/console/testdata/sealguard/ctor/ctor.go+9 −0internal/console/testdata/sealguard/ctor/fieldassign.go+12 −0internal/console/testdata/sealguard/ctor/method.go+15 −0internal/console/testdata/sealguard/ctor/sealwith.go+14 −0internal/console/testdata/sealguard/darwinonly/sealy/sealy.go+17 −0internal/console/testdata/sealguard/sealkey/sealkey.go+19 −0internal/console/view.go+1 −0internal/host/fleet_secrets_key_test.go+319 −0internal/host/replicahomekeys_test.go+1 −1internal/hostops/fleetowner_classifier.go+69 −14internal/hostops/fleetowner_classifier_test.go+100 −5internal/hostops/mutation_classifier.go+2 −1internal/mail/claim_gate_closure_test.go+1 −1internal/mail/sealer_helper_test.go+14 −0internal/mail/walk.go+16 −17internal/mail/walk_domainremove_test.go+1 −1internal/mail/walk_enable_test.go+20 −20internal/mail/walk_environment.go+5 −6internal/mail/walk_environment_test.go+10 −10internal/mail/walk_lifecycle_test.go+21 −21internal/mail/walk_verify_test.go+1 −1internal/moves/floor.go+4 −3internal/objstore/enforce_test.go+3 −3internal/objstore/nameclaim_test.go+1 −1internal/objstore/walk.go+46 −32internal/objstore/walk_env_test.go+9 −9internal/objstore/walk_seed_test.go+4 −4internal/objstore/walk_test.go+47 −40internal/objstore/writesdenied_test.go+2 −2internal/provision/fleet_secrets_key_census_test.go+93 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-fleet-secrets-key.tsv+24 −0internal/registry/fleets.go+126 −5internal/registry/fleets_secrets_key_test.go+207 −0internal/registry/remote.go+1 −1internal/registry/remote_dispatch.go+5 −0internal/release/release.go+7 −0
CI failed — run details
landed from design-fleet-secrets-key
README.mdLoading diff…
apimode.goLoading diff…
apimode_test.goLoading diff…
appconfig_cli.goLoading diff…
appconfig_cli_fleet_test.goLoading diff…
approved_fleet_secrets_copy_test.goLoading diff…
cmd/console/main.goLoading diff…
docs/site/cli.mdLoading diff…
docs/site/rails.mdLoading diff…
docs/site/rootfs.mdLoading diff…
docs/superpowers/notes/census-proposal-fleet-secrets-key.mdLoading diff…
docs/superpowers/plans/2026-10-29-fleet-secrets-key-copy.mdLoading diff…
docs/superpowers/plans/2026-10-29-fleet-secrets-key.mdLoading diff…
docs/superpowers/plans/CODEX-FINDINGS-fleet-secrets-key-plan-R1.mdLoading diff…
docs/superpowers/plans/CODEX-FINDINGS-fleet-secrets-key-plan-R2.mdLoading diff…
docs/superpowers/plans/CODEX-FINDINGS-fleet-secrets-key-plan-R3.mdLoading diff…
docs/superpowers/plans/CODEX-REVIEW-BRIEF-fleet-secrets-key-plan-R2.mdLoading diff…
docs/superpowers/plans/CODEX-REVIEW-BRIEF-fleet-secrets-key-plan-R3.mdLoading diff…
docs/superpowers/plans/CODEX-REVIEW-BRIEF-fleet-secrets-key-plan.mdLoading diff…
docs/superpowers/reviews/CODEX-FINDINGS-fleet-secrets-key-branch-R1.mdLoading diff…
docs/superpowers/reviews/CODEX-FINDINGS-fleet-secrets-key-branch-R2.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-secrets-key-branch-R2.mdLoading diff…
docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-secrets-key-branch.mdLoading diff…
docs/superpowers/specs/2026-10-29-fleet-secrets-key-design.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-fleet-secrets-key-R1.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-fleet-secrets-key-R2.mdLoading diff…
docs/superpowers/specs/CODEX-FINDINGS-fleet-secrets-key-R3.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-fleet-secrets-key-R2.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-fleet-secrets-key-R3.mdLoading diff…
docs/superpowers/specs/CODEX-REVIEW-BRIEF-fleet-secrets-key.mdLoading diff…
fleets.goLoading diff…
fleets_secrets_key_cli_test.goLoading diff…
instances_cli.goLoading diff…
instances_cli_refusals_test.goLoading diff…
internal/appconfig/appconfig.goLoading diff…
internal/appconfig/configack_test.goLoading diff…
internal/appconfig/crypto.goLoading diff…
internal/appconfig/crypto_bind_test.goLoading diff…
internal/appconfig/generation_test.goLoading diff…
internal/appconfig/owned_test.goLoading diff…
internal/appconfig/sealer.goLoading diff…
internal/appconfig/sealer_test.goLoading diff…
internal/appconfig/store.goLoading diff…
internal/appconfig/store_test.goLoading diff…
internal/appconfig/sync_test.goLoading diff…
internal/console/apicli.goLoading diff…
internal/console/apiconfig.goLoading diff…
internal/console/apienv.goLoading diff…
internal/console/apiinstances.goLoading diff…
internal/console/apiinstanceseed.goLoading diff…
internal/console/apiinstanceseed_test.goLoading diff…
internal/console/apimail.goLoading diff…
internal/console/apirelay.goLoading diff…
internal/console/apiscan.goLoading diff…
internal/console/apiscan_keys_test.goLoading diff…
internal/console/apiscan_rotation_race_test.goLoading diff…
internal/console/apistore.goLoading diff…
internal/console/apistore_provision.goLoading diff…
internal/console/apistore_provision_test.goLoading diff…
internal/console/apisystem.goLoading diff…
internal/console/authcli.goLoading diff…
internal/console/claim_invariant_fixtures_test.goLoading diff…
internal/console/claim_invariant_moves_test.goLoading diff…
internal/console/claim_invariant_probes_nonapp_test.goLoading diff…
internal/console/claim_invariant_probes_world_test.goLoading diff…
internal/console/claim_workers.goLoading diff…
internal/console/fleetowner.goLoading diff…
internal/console/fleets.goLoading diff…
internal/console/fleetsecrets_mint_test.goLoading diff…
internal/console/fleetsecrets_moves_test.goLoading diff…
internal/console/fleetsecrets_relay_test.goLoading diff…
internal/console/fleetsecretskey.goLoading diff…
internal/console/fleetsecretskey_test.goLoading diff…
internal/console/instanceprivatestore.goLoading diff…
internal/console/instances_config_refusals_test.goLoading diff…
internal/console/movesconsole_test.goLoading diff…
internal/console/planstorage.goLoading diff…
internal/console/relayenv.goLoading diff…
internal/console/relayops.goLoading diff…
internal/console/relayops_test.goLoading diff…
internal/console/scan_review_regression_test.goLoading diff…
internal/console/scankeysync.goLoading diff…
internal/console/scankeysync_hash_test.goLoading diff…
internal/console/scankeysync_test.goLoading diff…
internal/console/sealkey.goLoading diff…
internal/console/sealkey_guard_test.goLoading diff…
internal/console/sealkey_test.goLoading diff…
internal/console/server.goLoading diff…
internal/console/svcroutes_test.goLoading diff…
internal/console/teamcreds.goLoading diff…
internal/console/teamcreds_test.goLoading diff…
internal/console/templates/fleet_byo.htmlLoading diff…
internal/console/templates/fleetdetail.htmlLoading diff…
internal/console/testdata/claim-routes.txtLoading diff…
internal/console/testdata/sealguard/aliased/aliased.goLoading diff…
internal/console/testdata/sealguard/arbitrary/arbitrary.goLoading diff…
internal/console/testdata/sealguard/choose/choose.goLoading diff…
internal/console/testdata/sealguard/ctor/ctor.goLoading diff…
internal/console/testdata/sealguard/ctor/fieldassign.goLoading diff…
internal/console/testdata/sealguard/ctor/method.goLoading diff…
internal/console/testdata/sealguard/ctor/sealwith.goLoading diff…
internal/console/testdata/sealguard/darwinonly/sealy/sealy.goLoading diff…
internal/console/testdata/sealguard/sealkey/sealkey.goLoading diff…
internal/console/view.goLoading diff…
internal/host/fleet_secrets_key_test.goLoading diff…
internal/host/replicahomekeys_test.goLoading diff…
internal/hostops/fleetowner_classifier.goLoading diff…
internal/hostops/fleetowner_classifier_test.goLoading diff…
internal/hostops/mutation_classifier.goLoading diff…
internal/mail/claim_gate_closure_test.goLoading diff…
internal/mail/sealer_helper_test.goLoading diff…
internal/mail/walk.goLoading diff…
internal/mail/walk_domainremove_test.goLoading diff…
internal/mail/walk_enable_test.goLoading diff…
internal/mail/walk_environment.goLoading diff…
internal/mail/walk_environment_test.goLoading diff…
internal/mail/walk_lifecycle_test.goLoading diff…
internal/mail/walk_verify_test.goLoading diff…
internal/moves/floor.goLoading diff…
internal/objstore/enforce_test.goLoading diff…
internal/objstore/nameclaim_test.goLoading diff…
internal/objstore/walk.goLoading diff…
internal/objstore/walk_env_test.goLoading diff…
internal/objstore/walk_seed_test.goLoading diff…
internal/objstore/walk_test.goLoading diff…
internal/objstore/writesdenied_test.goLoading diff…
internal/provision/fleet_secrets_key_census_test.goLoading diff…
internal/provision/plan9_b8_census_test.goLoading diff…
internal/provision/testdata/plan14-root-reads-chain.tsvLoading diff…
internal/provision/testdata/plan14-root-reads-fleet-secrets-key.tsvLoading diff…
internal/registry/fleets.goLoading diff…
internal/registry/fleets_secrets_key_test.goLoading diff…
internal/registry/remote.goLoading diff…
internal/registry/remote_dispatch.goLoading diff…
internal/release/release.goLoading diff…