carlos / platform Public

Merge branch 'fleet-seeded-create' into fleet-seeded-create-1

claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 479913f70de899ed52adae360813a0283cb3b1f6 parent 2ed8610parent 4459976
1 file changed, +222 −97
  • docs/superpowers/plans/2026-11-20-fleet-seeded-create.md +222 −97

CI failed — run details

diff --git a/docs/superpowers/plans/2026-11-20-fleet-seeded-create.md b/docs/superpowers/plans/2026-11-20-fleet-seeded-create.md
index 4dcea3474..f464c5b0f 100644
--- a/docs/superpowers/plans/2026-11-20-fleet-seeded-create.md
+++ b/docs/superpowers/plans/2026-11-20-fleet-seeded-create.md
@@ -30,7 +30,7 @@ Earlier: no plan review before round 1. The design's round history carries into
- **The invariant (design §3.6, cut (a)).** On a fleet, a `file` seed's hostname is released only when its owning box has proved that nothing of the seed is left: no local file and no object under either restore-capable prefix. Nothing else releases it. The proof is made in one function (`provision.rollbackFleetFileSeed`, Task 11), and the door's `rolledback` op is the only way it is reported.
- **Fail closed everywhere.** A listing error, a marker that cannot be read, a fence that does not proceed, a heartbeat that is missing or stale: each means "not proven", never "empty".
- **Nothing a request supplies picks a bucket or a key.** Keys come from `seeds.SnapshotKey` / `seeds.FleetSnapshotKey` on values from the record, after `seeds.Check`.
-- **Wire shapes are additive.** `SeedSource.Kind` gains `"file"`; `BoxMetrics` gains one `omitempty` pointer; `seedImportReq` gains `kind`. A record or heartbeat written before this change parses the same.
+- **Wire shapes are additive.** `SeedSource.Kind` gains `"file"`; `SeedSource` gains `held` (`omitempty`, Decision D12); `BoxMetrics` gains one `omitempty` pointer; `seedImportReq` gains `kind`. A record or heartbeat written before this change parses the same.
- **Import, `--from` and the swap behave exactly as today** (design §3.7). `--from` on a fleet keeps its current refusal sentence (`seedPlacementRefusal`, `internal/console/apiinstanceseed.go:113-121`).
- **Protocols (see Decisions D1).** `seeds.FileSeedProtocol = 3` (slice 1, region file seeds) and `seeds.FleetFileSeedProtocol = 4` (slice 2, fleet file seeds). `seeds.ProtocolVersion` becomes 3 in slice 1 and 4 in slice 2. `seeds.RequiredProtocol` (1) is unchanged for the old doors.
- **Ratchet (`make code-health`).** Do not grow these: `internal/host/agent.go` (file-lines 3214, at its ceiling), `apimode.go` (4199), `(*Edge).ServeHTTP` (421), `(*Server).handleAPIInstanceCreate` (769), `provision.Reconcile` (811), and `runInstancesCreate`'s `log.Fatalf` count (6). New code goes in new files. Moving a function out of one of these files is fine.
@@ -89,44 +89,132 @@ No code. One pass for every slice's copy, so the copy review sees the whole flow
**Files:** this plan (mocks, copy table).
-- [ ] **Step 1:** Render each mock below at 80 columns in a terminal (a scratch file under `$TMPDIR`). Check it against AGENTS.md "Every UI change gets a UX pass": state first, label/value pairs, about a dozen words, problems visible as a state. Fix what reads badly in the mocks and the copy table.
+- [x] **Step 1:** Render each mock below at 80 columns in a terminal (a scratch file under `$TMPDIR`). Check it against AGENTS.md "Every UI change gets a UX pass": state first, label/value pairs, about a dozen words, problems visible as a state. Fix what reads badly in the mocks and the copy table.
+
+The mocks use neutral names: app `shop`, host `new.example.com`, fleet `main`, boxes `box-1` and `box-2`. Each block is what the CLI prints; a terminal wraps a long line at 80 columns. A console refusal reads `instances create: <sentence>`, so most refusals wrap once, as their siblings (SD-N2, SD-N118) already do.
```
-$ carlos instances create --app push --host push.bdr.example.com --seed-file push.db
-uploading push.db (24 MB)
-checking push.db. A large database can take a few minutes.
-created instance push.bdr.example.com (channel stable)
- seeded from a file 3f2a9c1e0b7d, placed when it first starts
+# 1. Create, success, on a fleet. Begin answers before the first line prints.
+$ carlos instances create --app shop --host new.example.com --seed-file shop.db
+using https://console.example.com as you@example.com
+uploading shop.db (24.0MB)
+checking shop.db. A large database can take several minutes.
+created instance new.example.com (channel stable, fleet main)
+ seed file awaiting first start
the host comes live on the next reconcile pass on its box
-$ carlos instances list --app push
-HOST CHANNEL REGION SEED
-push.bdr.example.com stable fleet eleven seed file waiting for first start
-mail.bdr.example.com stable fleet eleven not created: a copy of data already exists for this hostname
-old.bdr.example.com stable fleet eleven not created: a copy of its data is still in the fleet’s storage
-
-$ carlos instances create --app push --host push.bdr.example.com --seed-file push.db
-instances create: b1, b2 in fleet eleven are below the seeds floor. Update the platform on those boxes, then try again
-
-$ carlos instances create --app push --host push.bdr.example.com --seed-file push.db
-uploading push.db (24 MB)
-checking push.db. A large database can take a few minutes.
+# On a region app only the place differs:
+created instance new.example.com (channel stable, the home region)
+
+# 2. Refused at begin. Nothing was uploaded, so there is no "uploading" line.
+$ carlos instances create --app shop --host new.example.com --seed-file shop.db
+using https://console.example.com as you@example.com
+instances create: the platform on box-2 in fleet main is below the seeds floor. Update it, then try again.
+
+# The CLI's own refusals (FS-2 and FS-14 come before the "using" line):
+instances create: use --seed-file or --from, not both
+instances create: a restore is a plain instance. Drop --seed-file.
+instances create: a seeded instance is an ordinary instance. Drop --kind, --addr and --role.
+instances create: could not read shop.db. Check the path, then try again.
+instances create: shop.db must be more than 0 bytes and at most 4 GiB
+
+# The console's begin refusals, fleet:
+instances create: shop places its instances in a pool, so it cannot take a seeded instance.
+instances create: fleet main has more than one active box. A seeded instance needs a fleet with one active box for now.
+instances create: could not confirm every box in fleet main. Try again in a minute.
+instances create: the platform on box-2 in fleet main is below the seeds floor. Update it, then try again.
+instances create: claim control is on for box-2 in fleet main. Seeded instances are not supported there yet.
+instances create: the layout of box-2 in fleet main is neither nested nor flat. Seed files need one of those.
+instances create: This deployment’s seeds floor does not allow seed files yet. An operator publishes it again with carlos system seeds-floor publish.
+instances create: This console runs with claim control on. Seeded instances are not supported here yet.
+
+# The console's begin refusals, region (FS-25 and SD-N8 as above):
+instances create: a seeded instance runs in this console’s region, the home region. To run new.example.com elsewhere, create it here and then run carlos move.
+instances create: Ireland has high availability turned on. seeded instances are not available there yet
+instances create: box-2 in the home region are below the seeds floor. Roll the platform there, then publish the seeds floor again.
+instances create: this console has no data bucket set up, so it cannot create a seeded instance.
+
+# Between slices 1 and 3 a fleet app keeps --from's answer:
+instances create: shop places its instances in a pool or on a fleet, so it cannot take a seeded instance.
+
+# 3. The upload or its check fails.
+$ carlos instances create --app shop --host new.example.com --seed-file shop.db
+using https://console.example.com as you@example.com
+uploading shop.db (24.0MB)
+checking shop.db. A large database can take several minutes.
instances create: the upload is not a database that passes an integrity check, so it was not kept.
- the hostname stays taken until the fleet’s box has cleaned up
-
-$ carlos instances delete --app push --host push.bdr.example.com
-push.bdr.example.com is being deleted. Its hostname is free once its box has cleaned up.
+ the hostname is free again once its box has cleaned up
+
+# The file changed while it uploaded: the console aborts the seed as it answers.
+$ carlos instances create --app shop --host new.example.com --seed-file shop.db
+using https://console.example.com as you@example.com
+uploading shop.db (24.0MB)
+instances create: the upload does not match the file this create began with, so it was not kept.
+ the hostname is free again once its box has cleaned up
+
+# The other endings after "checking", each followed by the same indented line,
+# on a region and a fleet alike:
+instances create: checking the upload took longer than 30 minutes, so it was not kept.
+instances create: could not store the upload. Try again.
+instances create: the seed file was not kept, so new.example.com was not created. Try again.
+ the hostname is free again once its box has cleaned up
+
+# 4. The SEED column, one row per value (the columns between are left out).
+$ carlos instances list --app shop
+HOST SEED
+s1.example.com seed file awaiting upload
+s2.example.com seed file awaiting first start
+s3.example.com seeded from a file 3f2a9c1e0b7d
+s4.example.com aborting
+s5.example.com not created: the seed file on the box did not match the upload
+s6.example.com not created: the seed file on the box failed its integrity check
+s7.example.com not created: a copy of data already exists for this hostname
+s8.example.com not created: a copy of its data is still in the fleet’s storage
+s9.example.com not created: the upload is not a database that passes an integrity check, so it was not kept.
+
+# The box's log line for s7 (carlos logs):
+new.example.com could not start from its seed: a copy of data already exists for this hostname.
+
+# 5. Delete.
+# Before the first start (seed file awaiting upload or first start), 202:
+$ carlos instances delete --app shop --host new.example.com
+using https://console.example.com as you@example.com
+new.example.com is being deleted. Its hostname is free again once its box has cleaned up.
+
+# Already deleted, or the seed failed (any reason but a copy in storage), 409:
+instances delete: new.example.com was not created. Its hostname is free again once its box has cleaned up.
+
+# A copy of its data is still in the fleet's storage (s8 above), 409. The box
+# says which place holds it; the console builds the path.
+instances delete: new.example.com keeps its hostname while a copy of its data is still in the fleet’s storage, under new.example.com/ (after the box’s CARLOS_HIBERNATE_PREFIX, if set). Remove everything there, and the hostname is free again after the box’s next pass.
+instances delete: new.example.com keeps its hostname while a copy of its data is still in the fleet’s storage, under moves/new.example.com/. Remove everything there, and the hostname is free again after the box’s next pass.
+instances delete: new.example.com keeps its hostname while a copy of its data is still in the fleet’s storage, under new.example.com/ (after the box’s CARLOS_HIBERNATE_PREFIX, if set) and moves/new.example.com/. Remove everything there, and the hostname is free again after the box’s next pass.
+
+# Placed, or already cleaned up: the ordinary answer, unchanged.
+deleted instance new.example.com — its route retires on the next reconcile pass; parked data stays
+
+# Deleting the app permanently from the Trash (console, and the trash sweep's log):
+shop can’t be deleted permanently until its fleet box has cleaned up new.example.com, old.example.com.
```
-- [ ] **Step 2:** The begin call goes before the `uploading` line. Today's import prints `uploading` first (`instances_import.go:203`), so a begin refusal would follow an upload line that never happened. Record that order in the mocks.
-- [ ] **Step 3:** Commit the plan edit: `docs: #1139 plan, UX pass on the CLI output`.
+What the pass changed, and why:
+- **Begin before the first line** (step 2). A refusal at begin now follows only the `using` line.
+- **The success block.** The indented line is `seedCell`'s own value (FS-8), as `--from` prints, not a sentence of its own. The created line carries the place (`fleet main`), as `instanceCreatedLine` prints it today.
+- **The SEED cells lead with the seed's state, in the siblings' words**: FS-7 and FS-8 read as `import awaiting upload` and `awaiting stop` do. The box's reasons (FS-27, FS-28) are cut to fit a cell. "so it was not used" repeated what `not created:` already says. The longest new cell is 63 characters. The reused upload sentences (s9) run past 80 in a cell, as an import's `refused:` cell does today; the list is wider than 80 columns anyway (13 columns before SEED).
+- **One box, not several.** D8 means a fleet refusal almost always names one box, and "box-2 in fleet main are below" is wrong for one. FS-23, FS-24 and FS-26 are reworded so the verb agrees with one box or many, with the placeholders in the same order.
+- **FS-12 is an indented continuation line**, like `the host comes live …` under a create, and says when the hostname is free, not that it is taken. FS-33 no longer says "already being deleted": most of its cases (FS-27, FS-28, an upload failure) are seeds that failed, not deletes. FS-35 is shown on the console's Trash page, where the button says "Delete now" and the words are "delete permanently", so "purged" goes.
+- **Four sentences that read wrong for a seed file get rows**: FS-14 (`--restore` with `--seed-file`; the restore sentence names `--from` only), FS-15 (the import's region sentence says "import it here, commit it"), FS-16 (the HA sentence says "imports"), FS-17 (SD-N51 says "this import began with").
+
+- [x] **Step 2:** The begin call goes before the `uploading` line. Today's import prints `uploading` first (`instances_import.go:203`), so a begin refusal would follow an upload line that never happened. The mocks above record that order: block 2 has no `uploading` line.
+- [x] **Step 3:** Commit the plan edit: `docs: #1139 plan, UX pass on the CLI output`.
### Task 2: Copy review (all slices)
**Model:** the `copy-review` skill (Luna pass), then Paul. **Own review:** the review is the task. **Census:** none.
-- [ ] **Step 1:** Run the copy-review skill over the copy table, in the layouts from Task 1. Apply the edits verbatim to the table and mark each row approved.
-- [ ] **Step 2:** Commit: `docs: #1139 plan, approved copy`.
+- [x] **Step 1:** Run the copy-review skill over the copy table, in the layouts from Task 1. Apply the edits verbatim to the table and mark each row reviewed, keeping the old text in the table's "was" column. Done 2026-11-20 by an Opus pass under the house rules of `copy-review/LUNA-BRIEF.md`; Paul's decisions on the four questions it left are listed under the copy table.
+- [x] **Step 1a (Paul):** Approve the table, or edit it. Approved 2026-11-20, with four decisions applied (see under the copy table).
+- [x] **Step 2:** Commit: `docs: #1139 plan, approved copy`. Landed as `docs: #1139 plan, Paul's copy decisions`.
Build tasks below use the approved table only.
@@ -154,9 +242,12 @@ func SeedPublishFile(id string) func(*Record) error
func SeedAbortFileUploadBecause(id, reason string) func(*Record) error
// SeedFail is a box's terminal placement failure (design §3.6): a file seed
// from ready to aborted, with Reason. Never an import (SeedRefuse is
-// unchanged). It also accepts an aborted file seed and sets only Reason
-// (Decision D6), so a rollback that finds a copy can say so.
-func SeedFail(id, reason string) func(*Record) error
+// unchanged). It also accepts an aborted file seed and sets only Reason and
+// Held (Decision D6), so a rollback that finds a copy can say so. held is
+// "", "replica", "staging" or "both" (Decision D12): which of the host's
+// two storage locations still holds a copy. It is set, or cleared, on every
+// call; only copy-in-storage passes a non-empty one.
+func SeedFail(id, reason, held string) func(*Record) error
```
- `Unfinished` (`seed.go:72`): a `file` seed at `placed` is finished.
- `SeedPlace`, `SeedAbort`, `SeedAbortStale`, `SeedRolledBack` are kind-agnostic already (`seed.go:189-201`, `:236-255`, `:276-288`, `:292-294`). Each gets a `file` row anyway.
@@ -165,7 +256,7 @@ func SeedFail(id, reason string) func(*Record) error
- [ ] **Step 1: Failing tests**
- `TestSeedLifecycleFileKind`: a table beside the replica and import rows. `SeedPublishFile` accepts `file` from `reserving` and refuses `replica` and `import`. `SeedPublishReplica` still refuses `file`. `SeedPlace` takes `file` from `ready`. `SeedAbort` takes it from `reserving` and from `ready`. `SeedRolledBack` takes it from `aborted`.
- `TestUnfinishedFilePlacedIsFinished`: `file`+`placed` is finished. `file`+`ready`, `file`+`aborted` and `file`+`committed` are not.
- - `TestSeedFailFileOnly`: `ready` → `aborted` with `Reason`. An `aborted` file seed keeps its state and takes the new `Reason`. `import` gets `ErrSeedConflict`, and so do `reserving`, `placed` and another id.
+ - `TestSeedFailFileOnly`: `ready` → `aborted` with `Reason`. An `aborted` file seed keeps its state and takes the new `Reason` and `Held`; a later call with `held` "" clears it. A `held` outside the four values is refused. `import` gets `ErrSeedConflict`, and so do `reserving`, `placed` and another id.
- `TestSeedAbortFileUploadOnlyWhileReserving`.
- `TestMoveBlockFileUnplaced`: `MoveBlock` answers `SeedMoveUnplaced` until `placed`.
- `seeds`: `TestKindFileIsNotAKnownImport`, and the protocol constants (update any test that pins `ProtocolVersion == 2`).
@@ -210,8 +301,8 @@ type seedImportReq struct {
}
// beginFileSeed: seedOneDoorRefusal and seedCommonRefusal have already run
// in the create door. Then: file seeds refuse a pool (FS-20) and an HA
-// region (refuseHAImport). A region record must be in this console's region
-// (the import's sentence). Then seedFileReady, size and sha256
+// region (refuseHAImport's check, FS-16's sentence). A region record must be
+// in this console's region (the import's check, FS-15's sentence). Then seedFileReady, size and sha256
// (importShapeRefusal without replaces), private storage as the import
// does, then the record as reserving, kind file, SHA256 and Bytes set, no
// Replaces and no VerifyHash. Answers 201 with the record view. A fleet
@@ -227,15 +318,16 @@ func (s *Server) seedFileReady(ctx context.Context, region string) *doorRefusal
```
- `importGate` gains an `upload bool` argument. Only the PUT passes true, and only the PUT accepts a `file` seed. Stopped, commit and abort still answer SD-N59 for a file seed.
- `staleUploadRefusal`: a `file` seed waits for its upload while it is `reserving`.
+- **A length or sha256 mismatch aborts a file seed at once** (Paul, 2026-11-20). The check is synchronous, in `spoolImport` (`apiinstanceimport.go:544-546`). For a `file` seed, before answering 422 with FS-17, the door moves the seed to `aborted` with `SeedAbortFileUploadBecause(id, FS-17)` through the record CAS (`provision.SetRecordSeed`), the same write `runImportUpload` makes for its own aborts (`apiinstanceimport.go:576`). The import door takes no record lock; the CAS, which acts only while the seed is still `reserving`, is what keeps a seed that moved on untouched. A CAS that fails is logged, and the answer is still FS-17. The door, not the CLI, aborts: it has the record and the seed id in hand, and a CLI that died after the 422 would leave the hostname held for the sweep's hour. Then the box's rollback and the console's finish free the hostname, so a retry works. An import keeps SD-N51 and stays waiting, as today.
- **Upload readiness dispatches on the kind (plan R1-3).** `handleAPIImportUpload` re-checks readiness at `apiinstanceimport.go:416` with `seedRegionReady(..., true)`, whose `true` refuses a region with more than one box (`seedfloor.go:97`). An import keeps exactly that call. A region `file` seed calls `seedFileReady` instead (no one-box rule), and a fleet `file` seed calls `seedFleetReady` (Task 16). Test: `TestFileSeedRegionTwoBoxesBeginThroughUpload`, a non-HA region with two ready boxes, begin then PUT, both succeed.
-- `runImportUpload` dispatches on `seed.Kind`. The check, the deadlines and the sentences stay the same. For a file seed: put to `s.cfg.SeedData` at `seeds.SnapshotKey`, then `SeedPublishFile`. On failure, `SeedAbortFileUploadBecause`.
+- `runImportUpload` dispatches on `seed.Kind`. The check, the deadlines and the sentences stay the same, except that a file seed's length or sha256 mismatch answers FS-17 in place of SD-N51. For a file seed: put to `s.cfg.SeedData` at `seeds.SnapshotKey`, then `SeedPublishFile`. On failure, `SeedAbortFileUploadBecause`.
- `seedStale`: a `file` seed `reserving` for more than `seedReserveTTL` is stale, as `--from` (design §3.3).
- `seedfinish.go:124`: `KindFile` joins `KindReplica` for the region replica delete. `deleteSeedReplica` already skips anything outside this console's data bucket (`:270`).
- [ ] **Step 1: Failing tests** (`seedfile_test.go`, using the import tests' fixtures in `apiinstanceimport_test.go`):
- `TestFileSeedBeginRegionWritesReservingRecord`: 201. The record is `file`, `reserving`, with sha256 and bytes. No snapshot is written yet. No verify token appears in the answer.
- `TestFileSeedUploadRegionPutsSnapshotAndPublishes`: the snapshot is at `seeds/<host>/<id>/snapshot.db` in the data bucket, and the seed goes `ready`.
- - `TestFileSeedUploadMismatchKeepsReserving` (422) and `TestFileSeedUploadBadDatabaseAborts` (`aborted` with SD-N52's sentence).
+ - `TestFileSeedUploadMismatchAborts`: 422 with FS-17, and the record is `aborted` with FS-17 as its reason. Table-driven: a region row here; Task 16 adds the fleet row. An import's mismatch still answers SD-N51 and stays waiting. `TestFileSeedUploadBadDatabaseAborts` (`aborted` with SD-N52's sentence).
- `TestFileSeedRefusesPool`, `TestFileSeedRefusesFleetUntilSlice3`, `TestFromOnFleetStillRefuses` (the sentence is unchanged).
- `TestFileSeedReadyRefusesFloorBelowFileProtocol` and `TestFileSeedReadyNamesBoxBelowFileProtocol`. `TestSeedRegionReadyUnchangedForImport` stays at protocol 1.
- `TestImportGateRefusesFileOutsideUpload` (stopped, commit and abort).
@@ -244,7 +336,7 @@ func (s *Server) seedFileReady(ctx context.Context, region string) *doorRefusal
- [ ] **Step 2:** `go test ./internal/console -run 'TestFileSeed|TestFromOnFleet|TestImportGateRefusesFile|TestSeedsPassAbortsStuckFile|TestFinishFileSeed|TestOldConsoleShape|TestSeedRegionReady' -count=1`. Expect FAIL.
- [ ] **Step 3:** Implement. `handleAPIInstanceCreate` does not change: `req.Import != nil` already routes to `createImport`, which dispatches on `Kind`.
- [ ] **Step 4:** Run step 2 again, then `go test ./internal/console -run 'TestImport|TestSeed|TestFrom' -count=1`: PASS.
-- [ ] **Step 5:** Record-write census entries for `Server.beginFileSeed` (new, `key:SetRecordSeed` and the create), `Server.runImportUpload` (re-pinned), `Server.seedsPass`/`seedStale` (re-pinned) and `Server.finishSeedOnce` (re-pinned). Run `go test ./internal/provision -run 'Census' -count=1`.
+- [ ] **Step 5:** Record-write census entries for `Server.beginFileSeed` (new, `key:SetRecordSeed` and the create), `Server.spoolImport` (new, `key:SetRecordSeed`, the mismatch abort), `Server.runImportUpload` (re-pinned), `Server.seedsPass`/`seedStale` (re-pinned) and `Server.finishSeedOnce` (re-pinned). Run `go test ./internal/provision -run 'Census' -count=1`.
- [ ] **Step 6:** Commit: `console: file seeds on a region, through the import door`.
- [ ] **Step 7: Own review.** Opus. Name: nothing a request supplies picks a key; the record is written before the snapshot; the abort runs only while the seed still waits; import and `--from` are unchanged.
@@ -262,17 +354,19 @@ func (s *Server) seedFileReady(ctx context.Context, region string) *doorRefusal
// (FS-4); begin (POST .../instances with import{kind:"file",sha256,bytes});
// then print FS-5 and stream the PUT (importUpload, reused); print FS-6;
// poll until the seed leaves reserving: ready or placed is done, aborted or
-// rolled-back returns its reason (FS-11), with FS-12 appended for a
-// fleet-placed record. Then the created line and seedCell.
+// rolled-back returns its reason (FS-11), with FS-12 appended, on a region
+// and a fleet alike (Paul, 2026-11-20). A PUT refused with 422 (FS-17, which
+// aborted the seed in the door) also gets FS-12. No other PUT refusal does:
+// those leave the seed reserving. Then the created line and seedCell.
func (s *apiSession) runSeedFileCreate(ctx context.Context, w io.Writer, a apiAcct, app, host, region, channel, environment, file, message string) error
```
-- `--seed-file` with `--from` is refused (FS-2). With `--kind`, `--addr` or `--role` the existing SD-N36 answers. With `--restore` the existing restore sentence answers. All of these come back through the one shared seeded-create call's `log.Fatalf`, so the ratchet count stays at 6.
+- `--seed-file` with `--from` is refused (FS-2). With `--kind`, `--addr` or `--role` the existing SD-N36 answers. With `--restore`, FS-14 answers (the existing restore sentence names `--from` only). All of these come back through the one shared seeded-create call's `log.Fatalf`, so the ratchet count stays at 6.
- `seedCell` gains the `file` rows: FS-7 to FS-10.
- [ ] **Step 1: Failing tests** (an `httptest` console in the shape of `instances_import_test.go`):
- `TestSeedFileCreateBeginsThenUploadsThenWaits`: the request order is POST, PUT, GET…; the output matches the Task 1 mock line for line; no `uploading` line appears before begin answers.
- `TestSeedFileCreateRefusalBeforeUploadPrintsNoUploadLine`.
- - `TestSeedFileCreateAbortedPrintsReason`, and `TestSeedFileCreateAbortedOnFleetAddsHoldLine`.
+ - `TestSeedFileCreateAbortedPrintsReason`, and `TestSeedFileCreateAbortedAddsHoldLine` (a region record and a fleet record, each followed by FS-12; a 422 with FS-17 is followed by FS-12; a 503 from the PUT is not).
- `TestSeedFileAndFromRefused`, `TestSeedFileEmptyOrTooLargeRefusedBeforeBegin`.
- `TestSeedCellFileRows` (one row each for reserving, ready, placed, aborted with a reason, and aborted without one).
- `go test . -run 'TestParity|TestCLIProjection' -count=1` and `go test ./internal/docsite -count=1` after `make parity-doc`.
@@ -285,7 +379,7 @@ func (s *apiSession) runSeedFileCreate(ctx context.Context, w io.Writer, a apiAc
**Model:** Sonnet for steps 1 to 4. Fable for the branch review. Astra for the census verdict.
-- [ ] **Step 1:** Create `approved_fleet_seeded_copy_test.go` in the shape of `approved_platform_accounts_copy_test.go`. Pin every row this slice wires (FS-1 to FS-12, FS-20, FS-25 and the docs row). `go test . -run '^TestApprovedFleetSeededCopy' -count=1`: PASS.
+- [ ] **Step 1:** Create `approved_fleet_seeded_copy_test.go` in the shape of `approved_platform_accounts_copy_test.go`. Pin every row this slice wires (FS-1 to FS-12, FS-14 to FS-17, FS-20, FS-25 and the docs row). The table's status cell reads `approved (Paul, 2026-11-20)`, and its `was` column is history, not copy: the test reads the `text` column only. `go test . -run '^TestApprovedFleetSeededCopy' -count=1`: PASS.
- [ ] **Step 2: Census.** `make census-card`. Write CLAIMS: `internal/seeds/seeds.go` and `floor.go` (constants, no read); `internal/provision/seed.go` (new transitions and `Unfinished`, no read); `internal/provision/reconcile.go` and `seedreconcile.go` (the kind check, no new read); root package files (new flag and command path, no root read). Then `make census-propose NAME=fleet-seeded-create-1 CLAIMS=<file>`.
- [ ] **Step 3:** `make code-health` (PASS, then `make code-health-record` for the `apimode.go` move), `gofmt -l .` (empty), both cross-builds.
- [ ] **Step 4:** Push to amadan. Describe the branch (`amadan branch describe`).
@@ -369,8 +463,9 @@ func (b *ExecBackend) stagingEmpty(ctx context.Context, host string) (bool, erro
// internal/provision
type FleetSeedHooks struct {
- // Report sends placed|failed|rolledback to the console door.
- Report func(ctx context.Context, acct, app, host, id, op, code string) error
+ // Report sends placed|failed|rolledback to the console door. held is
+ // "" except with code copy-in-storage (Decision D12).
+ Report func(ctx context.Context, acct, app, host, id, op, code, held string) error
// ListPrefix lists every key under prefix in the fleet's own bucket,
// exhaustively (release.Store.List, which paginates). An error is
// "not proven".
@@ -398,7 +493,7 @@ The rules, each a numbered test below:
2. `NextFenceGen`, then `FenceForRollback(host, gen)`, with `defer LiftFence`. If it does not proceed, return.
3. Under the fence, the host still has no row (`reg.Get`). If a row appeared, return.
4. Purge **both** supported local locations, `NestedDBPath` and `DefaultDBPath`, whatever the layout reader says now (Decision D5, plan R2-1). The layout intent can change between retirement and rollback, and layout migration only moves rows that still exist (`internal/layout/pass.go:323`), so the current layout is not evidence of where the seed's data is. Each goes through `h.RemoveLocal` (`PurgeSeedLocal`, which also removes that location's own temps). Then, still under the fence, stat both locations: the database, `-wal`, `-shm`, the marker and any `.seed-<base>-` temp. Any error, or anything still there, means not proven: log and return. Unlike the region rule, the purge does not depend on the marker (design step 2). This is the single local half of the proof; nothing else on the box decides local cleanup for a fleet file seed.
- 5. Still under the fence, `ListPrefix(HibernatePrefix(ReplicaPrefix, host)+"/")` and `ListPrefix(activator.MovesPrefix(host))`. Any error: log and return. Any key in either: report `failed` with `copy-in-storage` (Decision D6), log, and return.
+ 5. Still under the fence, `ListPrefix(HibernatePrefix(ReplicaPrefix, host)+"/")` and `ListPrefix(activator.MovesPrefix(host))`. Any error: log and return. Any key in either: report `failed` with `copy-in-storage` (Decision D6) and `held` naming which listing found keys, `replica`, `staging` or `both` (Decision D12), log, and return.
6. Both locations proven empty in step 4 and both prefixes empty in step 5: `Report(rolledback)`. An error is logged, and the next pass tries again.
8. **Row retirement.** The dispatch at `reconcile.go:1963` already covers `KindFile` from Task 4. On a fleet box the row goes first, then a later pass with no row rolls back, the same order as `--from`.
@@ -418,8 +513,8 @@ The rules, each a numbered test below:
- [ ] **Step 2: Failing tests** (provision, with fake hooks and a temp registry):
- `TestFleetFileSeedRollbackReportsRolledBackWhenEmpty`: fence, purge, two listings, then one `rolledback` report. No record write and no snapshot delete.
- `TestFleetFileSeedRollbackListingErrorReportsNothing`: an error on the replica prefix, then the same on staging. Each reports nothing.
- - `TestFleetFileSeedRollbackOrphanedGenerationHolds` (R3-1): the replica prefix lists `g-0001/0000/...` with no `head.json`. The report is `failed` with `copy-in-storage`, never `rolledback`.
- - `TestFleetFileSeedRollbackWithStagedObjectsHolds` (R3-2).
+ - `TestFleetFileSeedRollbackOrphanedGenerationHolds` (R3-1): the replica prefix lists `g-0001/0000/...` with no `head.json`. The report is `failed` with `copy-in-storage` and `held` `replica`, never `rolledback`.
+ - `TestFleetFileSeedRollbackWithStagedObjectsHolds` (R3-2): `held` `staging`; with keys under both, `both`.
- `TestFleetFileSeedRollbackFenceDeclinedDoesNothing`, and `TestFleetFileSeedRollbackRowAppearedUnderFence`.
- `TestFleetFileSeedRollbackPurgesFlatPath`: a flat box purges `DefaultDBPath` and its instance's temps only.
- `TestFleetFileSeedRollbackNotOwnerDoesNothing`: a record labelled for another box.
@@ -484,14 +579,14 @@ The design asks for three fields. The region rule the fleet check mirrors reads
// fleetSeedObjects streams seeds.FleetSnapshotKey(acct, app, host, id)
// through the deployment store (the fleet door's release.Opener).
type fleetSeedObjects struct{ s release.Store }
-// fleetSeedDoor posts {"id":..., "code":...} to
+// fleetSeedDoor posts {"id":..., "code":..., "held":...} to
// /api/fleet/seeds/<acct>/<app>/<host>/<op> with the replica client's
// headers (internal/host/replicacoordinator.go:104-111): Bearer token and
// Carlos-Tunnel-Name <fleet>/<box>. 200 is done. 409 is "the record says
// otherwise" (logged; the next pass decides from the record). Anything else
// is an error to retry.
type fleetSeedDoor struct{ base, fleet, box, token string; client *http.Client }
-func (d fleetSeedDoor) report(ctx context.Context, acct, app, host, id, op, code string) error
+func (d fleetSeedDoor) report(ctx context.Context, acct, app, host, id, op, code, held string) error
```
- `wireSeedPlacement`: when `resolveFleetIdentity(os.Getenv)` succeeds, set `eb.CustomerFleet`. `eb.Seeds` becomes `fleetSeedObjects{deploy}`, and `eb.OnSeedPlaced` and `eb.OnSeedFailed` go to the door. `h.Fleet` becomes `&provision.FleetSeedHooks{Report, ListPrefix: data.List, ReplicaPrefix: box.Prefix}`. On a fleet `h.DeleteReplica` is nil-safe: `rollbackArmed` keeps requiring it, so it is set to a function that refuses. The fleet path never calls it. `storeSeedObjects.Open` takes and ignores the account and app.
- `aclRead`: grant exactly `seeds.FloorKey`. It is one more exact key in the `switch` at `:692`, never a prefix. The comment explains why: a deployment-wide floor, no account data, read by the agent and by root (`rootseedsfloor.go:102`). Write stays console-only.
@@ -564,21 +659,23 @@ func (s *Server) fleetSeedRecord(r *http.Request) (*provision.Record, string, bo
func (s *Server) handleFleetSeedPlaced(w http.ResponseWriter, r *http.Request)
func (s *Server) handleFleetSeedFailed(w http.ResponseWriter, r *http.Request)
func (s *Server) handleFleetSeedRolledBack(w http.ResponseWriter, r *http.Request)
-// Body: {"id": "<seed id>", "code": "<code>"}. replicaPayload's rules
+// Body: {"id": "<seed id>", "code": "<code>", "held": "<where>"}. replicaPayload's rules
// (DisallowUnknownFields, one document, 8 KiB). code is only for failed:
// "mismatch" | "not-a-database" | "copy-exists" | "copy-in-storage",
-// mapped to FS-27 to FS-30 here. The box never supplies text (Decision D4).
+// mapped to FS-27 to FS-30 here. held is "replica" | "staging" | "both",
+// required with copy-in-storage and refused (400) with any other code or
+// op. The box never supplies text (Decisions D4, D12).
```
Under `withRecordLock`, `fleetSeedRecord` runs again, and then:
- `placed`: `SeedPlace(id)`. A record already `placed` with this id is a no-op success. Then delete `seeds.FleetSnapshotKey` from `s.cfg.Releases` (absent is fine), and bump the serial.
-- `failed`: `SeedFail(id, sentence)`, then bump the serial.
+- `failed`: `SeedFail(id, sentence, held)`, then bump the serial.
- `rolledback`: `SeedRolledBack(id)` (already `rolled-back` with this id is fine), and bump the serial. **Release the record lock, then call `finishSeed`** (plan R1-2). `withRecordLock` holds the app lock (`recordlock.go:20`), and with lifetimes on `finishSeedOnce` reaches `retireRecordWithLifetime` → `withAppHost`, which takes the same non-reentrant app mutex (`lifetimes_retire.go:89`, `lifetimes.go:206`, `applocks.go:41`). `finishSeed`'s own seed-id and state checks and its CAS protect the finish; a finish that fails is retried by the sweep's step 6 as today.
- `provision.ErrSeedConflict` answers 409 with nothing changed. Any other error answers 502.
- [ ] **Step 1: Failing tests:**
- `TestFleetSeedDoorRefusals`: another fleet's token, another box, a labelled record naming another box, an unlabelled record on a fleet with two active boxes, a region record, an `import` or `replica` seed, a malformed host. Each answers the identical 404 body with the record unchanged. A stale seed id answers 409 with the record unchanged.
- `TestFleetSeedDoorPlacedDeletesSnapshotOnce`: the first call moves to `placed` and deletes the snapshot. A repeat answers 200 and changes nothing.
- - `TestFleetSeedDoorFailedMapsCodes`: each code gets its sentence, and an unknown code is a 400.
+ - `TestFleetSeedDoorFailedMapsCodes`: each code gets its sentence, and an unknown code is a 400. `copy-in-storage` without `held`, or with a value outside the three, is a 400; `held` with any other code, or on `placed` or `rolledback`, is a 400. The record's `held` is the body's.
- `TestFleetSeedDoorRolledBackFinishes`: the record is gone, the snapshot is gone, and the hostname can be created again. Run it twice, with lifetimes off and on; the lifetimes-on run must complete (no recursive app lock) and a second app mutation afterwards must not block.
- `TestFleetSeedDoorRolledBackOnlyFromAborted`: a `ready` seed answers 409.
- The route and parity checks: `go test ./internal/console -run 'TestLinkedPolicyCoversEveryAppRoute|TestParityTableCoversConsoleRoutes' -count=1`, then `go test . -run '^TestParity' -count=1` after `make parity-doc`.
@@ -629,7 +726,7 @@ func (s *Server) seedFleetReady(ctx context.Context, fleet string) *doorRefusal
- **Finish.** `finishSeedOnce`: a fleet-placed record deletes its snapshot from `s.cfg.Releases` at the fleet key and does not need `SeedData`. The replica delete (`:124`) is skipped for a fleet record. `deleteSeedReplica` already refuses one (`:270`), and that is now explicit.
- **Delete (Decision D9).** `importDeleteRule :1012` today hands every non-import record to the ordinary delete. For a fleet-placed `file` seed:
- not yet `placed` (`reserving`, `ready`): `SeedAbort(id)`, bump the serial, and answer 202 `{"state":"aborting","message":FS-13}`;
- - `aborted`, whatever its reason (plan R1-5): 409. FS-30 gets its specialised sentence FS-34; every other reason (none, FS-27, FS-28, FS-29, or an upload failure's) gets FS-33. No reason ever reaches the ordinary delete;
+ - `aborted`, whatever its reason (plan R1-5): 409. FS-30 gets its specialised sentence FS-34, whose location the console builds from the record's host and `held` (FS-36, FS-37, FS-38; Decision D12). A record with FS-30 and no `held` (none is expected) gets FS-33. Every other reason (none, FS-27, FS-28, FS-29, or an upload failure's) gets FS-33. No reason ever reaches the ordinary delete;
- `rolled-back`: `finishSeed`;
- `placed`: the ordinary delete.
@@ -644,7 +741,8 @@ func (s *Server) seedFleetReady(ctx context.Context, fleet string) *doorRefusal
- `TestFromOnFleetStillRefuses` (kept).
- `TestSeedsPassDeletesAbortedFleetFileSnapshotKeepsRecord` (R3-3), `TestSeedsPassDeletesAbortedFleetFileSnapshotInTrashedApp` (plan R1-4), `TestSeedsPassAbortsStuckFleetFileReservation`, `TestSeedsPassDeletesOrphanFleetSnapshotAfterAnHour`, `TestSeedsPassFleetHalfRunsWithoutSeedData`.
- `TestFleetFileSeedNoOwnerNeverFinished`: an aborted fleet file seed whose fleet has no active box. Sweeps and finishes leave the record alone, and the hostname stays held.
- - `TestDeleteFleetFileSeedBeforePlacementAborts` and `TestDeleteHeldFleetFileSeedRefuses`, table-driven over every terminal reason (none, FS-27, FS-28, FS-29, FS-30, an upload failure): each is 409 and the record is unchanged. `TestDeleteRegionFileSeedIsOrdinary`.
+ - `TestDeleteFleetFileSeedBeforePlacementAborts` and `TestDeleteHeldFleetFileSeedRefuses`, table-driven over every terminal reason (none, FS-27, FS-28, FS-29, FS-30 with each `held`, an upload failure, FS-17): each is 409 and the record is unchanged, and FS-30's rows name `<host>/`, `moves/<host>/` or both.
+ - `TestFileSeedUploadMismatchAborts`, its fleet row: a fleet file seed's mismatch aborts it with FS-17, and nothing is put in the deployment bucket. `TestDeleteRegionFileSeedIsOrdinary`.
- `TestFinishFleetFileSeedUsesDeploymentKey`.
- Root: `TestInstancesDeletePendingPrintsSentence`.
- [ ] **Step 2:** Run the console tests with `-run 'TestFileSeedBeginFleet|TestSeedFleetReady|TestSeedsPass|TestFleetFileSeedNoOwner|TestDelete.*FileSeed|TestFinishFleetFileSeed'` and the root test anchored. Expect FAIL.
@@ -658,7 +756,7 @@ func (s *Server) seedFleetReady(ctx context.Context, fleet string) *doorRefusal
**Model:** Haiku for docs and the copy pin. Fable for the branch review.
- [ ] **Step 1:** `docs/site/cli.md`: the fleet case under `instances create`: the one-box rule, the held hostname, and how a fleet owner frees it (remove the host's prefix in the fleet's bucket). `go test ./internal/docsite -count=1`.
-- [ ] **Step 2:** Pin the rest of the copy table in `approved_fleet_seeded_copy_test.go` (FS-13, FS-20 to FS-35, FS-40). `go test . -run '^TestApprovedFleetSeededCopy' -count=1`.
+- [ ] **Step 2:** Pin the rest of the copy table in `approved_fleet_seeded_copy_test.go` (FS-13, FS-20 to FS-38, FS-40). `go test . -run '^TestApprovedFleetSeededCopy' -count=1`.
- [ ] **Step 3:** Census for the root CLI change (`make census-card`, CLAIMS, `make census-propose NAME=fleet-seeded-create-3`). `make code-health`, `gofmt -l .`, `make parity-doc` (clean).
- [ ] **Step 4:** Push and describe. **Whole-branch review:** Fable, with Tasks 15 and 16's review results. Astra gives the census verdict.
- [ ] **Step 5:** Merge once CI is green. Subject: `Seed files on customer fleets (#1139, slice 3)`.
@@ -695,58 +793,76 @@ Order (AGENTS.md "rollout order"; design §6): boxes, then the floor, then the c
---
-## Copy table (pending UX pass and copy review)
+## Copy table (approved by Paul, 2026-11-20)
-`%s` and `%d` are filled as named. Reused rows are listed so the copy review sees the whole flow, but they are not re-pinned.
+`%s` and `%d` are filled as named. Reused rows are listed so the copy review sees the whole flow, but they are not re-pinned. Every row passed the Task 1 UX pass and the Task 2 copy pass, in the layouts of Task 1's mocks, and Paul approved the table on 2026-11-20 with the four decisions below. Only approved text is built. **Was** is the row's text before those two passes, kept so the change can be read: `same` means unchanged, and `new` means the UX pass or Paul's decisions added the row. Text in parentheses before the copy says where it shows; it is not copy.
+
+House rules applied: no em dashes; curly apostrophes; placeholders in their order; plain words, and no internal term that an approved sibling does not already use ("seeds floor", "box", "layout", "claim control" and "bucket" all have one). Case and stops follow the nearest sibling: a console sentence starts lower case unless its sibling does not, and ends with a full stop, as SD-N2 to SD-N8 do. A one-clause CLI check has no closing stop, as SD-N40 and SD-N48. An indented line under a create has none either, as `the host comes live …`.
**CLI** (`instances_seedfile.go`, constants `cliSeedFileCopy*`)
-| id | text | status |
-|---|---|---|
-| FS-1 | (flag) start the new instance from this SQLite database file, at most 4 GiB. Not with --from | pending |
-| FS-2 | --seed-file and --from can’t be used together | pending |
-| FS-3 | could not read %s. Check the path and try again | pending |
-| FS-4 | %s must be more than 0 bytes and at most 4 GiB | pending |
-| FS-5 | uploading %s (%s) | reused (the import's line, `instances_import.go:203`) |
-| FS-6 | checking %s. A large database can take a few minutes. | pending |
-| FS-7 | (SEED cell, reserving) uploading a seed file | pending |
-| FS-8 | (SEED cell, ready) seed file waiting for first start | pending |
-| FS-9 | (SEED cell, placed) seeded from a file %s | pending |
-| FS-10 | (SEED cell, aborted with a reason) not created: %s | pending |
-| FS-11 | the seed file was not kept, so %s was not created. Try again | pending |
-| FS-12 | the hostname stays taken until the fleet’s box has cleaned up | pending |
-| FS-13 | %s is being deleted. Its hostname is free once its box has cleaned up. | pending (console sends, CLI prints) |
-| — | a seeded instance is an ordinary instance. Drop --kind, --addr and --role. | reused (SD-N36) |
-| — | (create success line and "the host comes live on the next reconcile pass on its box") | reused |
+| id | text | was | status |
+|---|---|---|---|
+| FS-1 | (flag) start the new instance from this SQLite database file, at most 4 GiB. Not with --from | same | approved (Paul, 2026-11-20) |
+| FS-2 | use --seed-file or --from, not both | --seed-file and --from can’t be used together | approved (Paul, 2026-11-20) |
+| FS-3 | could not read %s. Check the path, then try again. | could not read %s. Check the path and try again | approved (Paul, 2026-11-20) |
+| FS-4 | %s must be more than 0 bytes and at most 4 GiB | same | approved (Paul, 2026-11-20) |
+| FS-5 | uploading %s (%s) | same | approved (Paul, 2026-11-20); reused (the import's line, `instances_import.go:203`) |
+| FS-6 | checking %s. A large database can take several minutes. | checking %s. A large database can take a few minutes. | approved (Paul, 2026-11-20) |
+| FS-7 | (SEED cell, reserving) seed file awaiting upload | uploading a seed file | approved (Paul, 2026-11-20) |
+| FS-8 | (SEED cell, ready) seed file awaiting first start | seed file waiting for first start | approved (Paul, 2026-11-20) |
+| FS-9 | (SEED cell, placed) seeded from a file %s | same | approved (Paul, 2026-11-20) |
+| FS-10 | (SEED cell, aborted with a reason) not created: %s | same | approved (Paul, 2026-11-20) |
+| FS-11 | the seed file was not kept, so %s was not created. Try again. | the seed file was not kept, so %s was not created. Try again | approved (Paul, 2026-11-20) |
+| FS-12 | (indented line under FS-11, an upload's reason or FS-17, on a region and a fleet) the hostname is free again once its box has cleaned up | the hostname stays taken until the fleet’s box has cleaned up | approved (Paul, 2026-11-20) |
+| FS-13 | %s is being deleted. Its hostname is free again once its box has cleaned up. | %s is being deleted. Its hostname is free once its box has cleaned up. | approved (Paul, 2026-11-20) (console sends, CLI prints) |
+| FS-14 | a restore is a plain instance. Drop --seed-file. | new | approved (Paul, 2026-11-20) (`--restore` with `--seed-file`) |
+| — | a seeded instance is an ordinary instance. Drop --kind, --addr and --role. | same | approved (Paul, 2026-11-20); reused (SD-N36) |
+| — | (create success line, and "the host comes live on the next reconcile pass on its box") | same | approved (Paul, 2026-11-20); reused |
+| — | (SEED cell, aborted with no reason, or rolled-back) aborting | same | approved (Paul, 2026-11-20); reused (`seedCell`) |
+| — | deleted instance %s — its route retires on the next reconcile pass; parked data stays | same | approved (Paul, 2026-11-20); reused (the ordinary delete, which this plan does not change) |
**Console, JSON errors the CLI prints** (`internal/console/seedfile_copy.go`)
-| id | text | status |
-|---|---|---|
-| FS-20 | %s places its instances in a pool, so it cannot take a seeded instance. | pending |
-| FS-21 | fleet %s has more than one active box. A seeded instance needs a fleet with one active box for now. | pending |
-| FS-22 | could not confirm every box in fleet %s. Try again in a minute. | pending |
-| FS-23 | %s in fleet %s are below the seeds floor. Update the platform on those boxes, then try again. | pending |
-| FS-24 | %s in fleet %s run with claim control on. Seeded instances are not supported there yet. | pending |
-| FS-25 | This deployment’s seeds floor predates seed files. An operator publishes it again with carlos system seeds-floor publish. | pending |
-| FS-26 | %s in fleet %s run instances in a layout seeds do not support. | pending |
-| FS-27 | the file on the box did not match its upload, so it was not used | pending (Seed.Reason) |
-| FS-28 | the file is not a database that passes an integrity check, so it was not used | pending (Seed.Reason) |
-| FS-29 | a copy of data already exists for this hostname | design §3.6 (Seed.Reason) |
-| FS-30 | a copy of its data is still in the fleet’s storage | design §3.6 (Seed.Reason) |
-| FS-33 | %s is already being deleted. Its hostname is free once its box has cleaned up. | pending |
-| FS-34 | %s keeps its hostname because a copy of its data is still in the fleet’s storage. Remove the host’s copy from the fleet’s bucket, and the hostname is freed on the box’s next pass. | pending |
-| FS-35 | %s can’t be purged yet: %s still hold their hostnames until their fleet box has cleaned up. | pending |
-| — | the upload is not a database that passes an integrity check, so it was not kept. (and the other upload sentences) | reused (SD-N52, SD-N61, SD-N67) |
-| — | %s places its instances in a pool or on a fleet, so it cannot take a seeded instance. | reused, unchanged, for `--from` and import |
+| id | text | was | status |
+|---|---|---|---|
+| FS-15 | a seeded instance runs in this console’s region, %s. To run %s elsewhere, create it here and then run carlos move. | new | approved (Paul, 2026-11-20) (a region record outside this console's region; in place of SD-N118, which says "import it here, commit it") |
+| FS-16 | %s has high availability turned on. seeded instances are not available there yet | new | approved (Paul, 2026-11-20) (in place of `haImportSentence` for a file seed; lower case after the stop and no closing stop, as that sibling) |
+| FS-17 | the upload does not match the file this create began with, so it was not kept. | new | approved (Paul, 2026-11-20) (in place of SD-N51 for a file seed; the door aborts the seed as it answers) |
+| FS-20 | %s places its instances in a pool, so it cannot take a seeded instance. | same | approved (Paul, 2026-11-20) |
+| FS-21 | fleet %s has more than one active box. A seeded instance needs a fleet with one active box for now. | same | approved (Paul, 2026-11-20) |
+| FS-22 | could not confirm every box in fleet %s. Try again in a minute. | same | approved (Paul, 2026-11-20) |
+| FS-23 | the platform on %s in fleet %s is below the seeds floor. Update it, then try again. | %s in fleet %s are below the seeds floor. Update the platform on those boxes, then try again. | approved (Paul, 2026-11-20) |
+| FS-24 | claim control is on for %s in fleet %s. Seeded instances are not supported there yet. | %s in fleet %s run with claim control on. Seeded instances are not supported there yet. | approved (Paul, 2026-11-20) |
+| FS-25 | This deployment’s seeds floor does not allow seed files yet. An operator publishes it again with carlos system seeds-floor publish. | This deployment’s seeds floor predates seed files. An operator publishes it again with carlos system seeds-floor publish. | approved (Paul, 2026-11-20) (capital T, as SD-N3) |
+| FS-26 | the layout of %s in fleet %s is neither nested nor flat. Seed files need one of those. | %s in fleet %s run instances in a layout seeds do not support. | approved (Paul, 2026-11-20) |
+| FS-27 | the seed file on the box did not match the upload | the file on the box did not match its upload, so it was not used | approved (Paul, 2026-11-20) (Seed.Reason) |
+| FS-28 | the seed file on the box failed its integrity check | the file is not a database that passes an integrity check, so it was not used | approved (Paul, 2026-11-20) (Seed.Reason) |
+| FS-29 | a copy of data already exists for this hostname | same | approved (Paul, 2026-11-20) (Seed.Reason; design §3.6's words) |
+| FS-30 | a copy of its data is still in the fleet’s storage | same | approved (Paul, 2026-11-20) (Seed.Reason; design §3.6's words) |
+| FS-33 | %s was not created. Its hostname is free again once its box has cleaned up. | %s is already being deleted. Its hostname is free once its box has cleaned up. | approved (Paul, 2026-11-20) |
+| FS-34 | %s keeps its hostname while a copy of its data is still in the fleet’s storage, under %s. Remove everything there, and the hostname is free again after the box’s next pass. | %s keeps its hostname because a copy of its data is still in the fleet’s storage. Remove the host’s copy from the fleet’s bucket, and the hostname is freed on the box’s next pass. | approved (Paul, 2026-11-20) |
+| FS-36 | (FS-34's location, `held` replica) %s/ (after the box’s CARLOS_HIBERNATE_PREFIX, if set) | new | approved (Paul, 2026-11-20) (Decision D12) |
+| FS-37 | (FS-34's location, `held` staging) moves/%s/ | new | approved (Paul, 2026-11-20) (Decision D12) |
+| FS-38 | (FS-34's location, `held` both: FS-36, then FS-37) %s and %s | new | approved (Paul, 2026-11-20) (Decision D12) |
+| FS-35 | %s can’t be deleted permanently until its fleet box has cleaned up %s. | %s can’t be purged yet: %s still hold their hostnames until their fleet box has cleaned up. | approved (Paul, 2026-11-20) (the Trash page's "Delete now", and the trash sweep's log) |
+| — | the upload is not a database that passes an integrity check, so it was not kept. (and the other upload sentences) | same | approved (Paul, 2026-11-20); reused (SD-N52, SD-N61, SD-N67) |
+| — | %s places its instances in a pool or on a fleet, so it cannot take a seeded instance. | same | approved (Paul, 2026-11-20); reused, unchanged, for `--from` and import |
+| — | (region begin refusals) SD-N2 to SD-N8 and SD-N38 | same | approved (Paul, 2026-11-20); reused |
**Member-facing wake sentence** (`internal/activator/seedfleet.go`, through `carlos logs`, as `SeedPlacementError` sentences are)
-| id | text | status |
-|---|---|---|
-| FS-40 | %s could not start from its seed: a copy of data already exists for this hostname. | pending |
+| id | text | was | status |
+|---|---|---|---|
+| FS-40 | %s could not start from its seed: a copy of data already exists for this hostname. | same | approved (Paul, 2026-11-20) |
+
+**Docs** (`docs/site/cli.md`): the `--seed-file` paragraph and example (slice 1), the fleet paragraph (slice 3), and the seeds-floor line at `:3620`. None is written yet, so this pass could not review them. Each goes through the copy review as prose when its task writes it (Task 6 step 3, Task 17 step 1), before that task's commit.
-**Docs** (`docs/site/cli.md`): the `--seed-file` paragraph and example (slice 1); the fleet paragraph (slice 3); the seeds-floor line at `:3620`. All pending, and reviewed as prose in the same pass.
+**Paul's decisions** (2026-11-20, on the four questions the copy pass left):
+1. **FS-12 shows on regions too**, as SD-N132 does for `--from` (Task 6).
+2. **A length or sha256 mismatch aborts the seed** in the console door, with FS-17 as its reason, and FS-12 follows it (Tasks 5 and 16, `TestFileSeedUploadMismatchAborts`).
+3. **FS-34 names the location**, built by the console from an enum the box reports (Decision D12; FS-36 to FS-38).
+4. **FS-23, FS-24 and FS-26 keep the wording that fits one box.** The region siblings get the same fix in a follow-up (below).
## Decisions this plan makes that the design does not pin
@@ -755,12 +871,17 @@ Order (AGENTS.md "rollout order"; design §6): boxes, then the floor, then the c
- **D3. The heartbeat carries seven fields, not three** (Task 11). The fleet check is the region check's rule (`seedfloor.go:79-89`), which reads the floor's `min_release` match, carlos.prev's verdict, and the root and moves floor states.
- **D4. The box sends a reason code, not text.** The console maps each code to an approved sentence, so a box never writes text that a member reads.
- **D5. The fleet rollback purges and proves both local locations** (nested and flat), never just the one the layout reader names today (plan R2-1). The design says "the row's own database path", but the rollback runs only on a pass with no row (Gap G4).
-- **D6. `SeedFail` also sets `Reason` on an already-aborted file seed** (code `copy-in-storage`, FS-30). This is how `instances list` can show design §3.6's sentence (Gap G5).
+- **D6. `SeedFail` also sets `Reason` (and `Held`, D12) on an already-aborted file seed** (code `copy-in-storage`, FS-30). This is how `instances list` can show design §3.6's sentence (Gap G5).
- **D7. A staging listing error on admission fails the wake and reports nothing.** It is retried. Objects under staging report `failed`. Both readings are fail-closed (Gap G6).
- **D8. A fleet file seed needs a fleet with exactly one active box.** This is the design's one-box rule, given that the seed door runs before labelling (Gap G1).
- **D9. The delete door aborts an unplaced fleet file seed** instead of deleting its record, and refuses a second delete while the record holds the hostname (Gap G3).
- **D10. The floor is published twice in the rollout** (Gap G2).
- **D11. File seeds refuse an HA region** (`refuseHAImport`), as the import does. The design does not mention HA.
+- **D12. FS-34 names where the copy is, from an enum the box reports** (Paul, 2026-11-20: name the location, keep D4). The door's `failed` body carries `held`: `replica`, `staging` or `both`, sent only with `copy-in-storage`. The console keeps it on the seed (`SeedSource.Held`) and builds the location itself from the record's host, never from box text:
+ - **Staging** is exact: `moves/<host>/` at the root of the box's data bucket (`activator.MovesPrefix`, `internal/activator/backend_exec.go:4266`). The console states it as it is (FS-37).
+ - **Replica** is `<CARLOS_HIBERNATE_PREFIX>/<host>/` (`activator.HibernatePrefix`, `internal/activator/activator.go:166`). The prefix is the box's own optional env (read at `activator.go:141`, listed at `internal/hostenv/hostenv.go:102`), and the console never sees it. The fleet's registry row has no such field (`internal/registry/fleets.go:37-52`), and the heartbeat (Task 11) carries floor fields only. So the console states `<host>/` and says it sits after that prefix if the box sets one (FS-36).
+ - **The bucket is not named.** The console knows the bucket the fleet was created against (`registry.Fleet.Bucket`, `internal/registry/fleets.go:41`, from `carlos fleets create --bucket`). But the box writes to its own `CARLOS_HIBERNATE_BUCKET` (`internal/host/agent.go:885`, `seedDataOpener(cfg.Bucket, …)`), and nothing checks the two match. The sentence says "the fleet’s storage", which is true either way.
+ - Reporting the prefix itself through the heartbeat was the alternative. It would be box-supplied text a member reads, which D4 rules out.
## Design gaps found while planning
@@ -775,6 +896,10 @@ Order (AGENTS.md "rollout order"; design §6): boxes, then the floor, then the c
- **G9. The floor read arms every customer fleet, not only Eleven's.** The `aclRead` grant is deployment-wide. Once a fleet box runs slice 2 it arms the published floor, and its recovery then refuses a carlos.prev below it (`carlos-system-recover`). That is a behaviour change for every fleet owner, and it should be in the slice 2 release note.
- **G10. `lock.json` sits under the replica prefix** (`internal/lease/lease.go:232`). It is deleted on release, but kept by `Abandon` (`lease.go:715,722`). An exhaustive listing counts it, so a seed whose lease was abandoned holds its hostname until the fleet owner clears the prefix, even if no data was ever uploaded. This is consistent with the invariant. It may surprise people.
+## Follow-ups (outside this branch)
+
+- **P3:** SD-N2, SD-N6 and SD-N7 say "<boxes> in <region> are …", which is wrong for one box. Give them the singular-correct wording FS-23, FS-24 and FS-26 use (Paul, 2026-11-20). It changes approved seeds copy, so it goes through the copy review on its own branch.
+
## Out of scope
- `create --from <sibling>` on a fleet (ruling 5). It keeps refusing with its current sentence.