census: fleet record labels m2
Record-write census: censusKeyExact gains setrecordfirstfleetbox, and fleet_record_labels_census_test.go layers the M2 review on the G6 pool inventory: SetRecordFirstFleetBox and Server.handleAPIInstanceLabel are record-writers; the door's why_not consts, apiSession.instanceLabel and labelRefusal are key-sites; instancesCommand and routeDecls re-pinned with class and kinds unchanged. Root-read census: envelope-only proposal (., internal/activator, internal/provision, internal/release re-pinned), no unit changes, no new dispositions; seal unchanged at 5603979d.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/notes/census-proposal-fleet-record-labels-m2.md+11 −0internal/provision/fleet_record_labels_census_test.go+80 −0internal/provision/plan9_b8_census_test.go+2 −2internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-fleet-record-labels-m2.tsv+6 −0
Intent
<task-notification> <task-id>addd524a3fe67805f</task-id> <tool-use-id>toolu_01DsuoijdB4chTuqJJrcn6XU</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/ac77363b-5830-422c-9f38-d7f2540dd398/tasks/addd524a3fe67805f.output</output-file> <status>completed</status> <summary>Agent "Apply Luna copy + T7 review fixes" 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>- **Status:** DONE. All 11 of Luna's rows are applied word for word. The placeholders in all 8 code rows match their format calls, so nothing needed NEEDS_CONTEXT. C45's `%s%s:` fits after the code's `activator: ERROR: ` prefix. - **Commits:** e461aa48 `copy: apply Luna's review of the fleet record label strings`, and b1f135f8 with the test changes (new `TestFleetRecordLabelsApprovedCopyApplied`, covering C40 and C41). Not pushed. - **Tests:** all the targeted runs in root, `./internal/console`, `./internal/activator` and `./internal/docsite` pass, plus the approved-copy tests (root, `-run 'Copy|Approved|Applied'`). The darwin and windows builds pass. I ran them outside the sandbox because its Go cache is read-only. Changing one word in C41 or C45 makes the new test fail. - **Paul's review file:** `docs/drafts/fleet-record-labels/paul-review/strings.json`, 9 docs strings. - **Concerns:** none blocking. - The README's earlier dry-run examples still show the old wording; the new Review section and the two captured refusals show the current text. - I changed one note in the deck, on the dry-run example, to say fleet `pi` instead of `main`, to match Luna's text. - C46 is not in the deck but now has the approved marker. A test keeps it word for word the same as C31. - I kept the local-only `copy-review/strings.json` identical to the tracked deck. - **Report:** `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-fleet-record-labels/.superpowers/sdd/2026-11-14-fleet-record-labels/copy-apply-report.md`</result> <usage><subagent_tokens>117219</subagent_tokens><tool_uses>48</tool_uses><duration_ms>600500</duration_ms></usage> </task-notification>
<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="515a5828-ec38-463c-aed0-43c5c8efd386"> Agent manager 8a3d302: submitted the 9-string docs section to Paul: https://copy-review.docs-t1.dev.platform.tito.io/r/juppsfjm5cvfaxuvaa7kw2xk6m/ . Result lands at ~/amadan.net/carlos/flr-docs-copy/copy-review/result.json (a copy of your paul-review/strings.json; the tool needs the folder named copy-review). Apply verbatim when it lands. </paseo-system>
diff --git a/docs/superpowers/notes/census-proposal-fleet-record-labels-m2.md b/docs/superpowers/notes/census-proposal-fleet-record-labels-m2.md| new file mode 100644 |
| index 000000000..68946ea43 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-fleet-record-labels-m2.md |
| @@ -0,0 +1,11 @@ |
| +# Census approval: fleet-record-labels-m2 |
| + |
| +Ruling `census-ruling-fleet-record-labels-m2`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +Envelopes re-pinned: `.`, `internal/activator`, `internal/provision`, `internal/release`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Seal: `5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46` → `5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-fleet-record-labels-m2.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/provision/fleet_record_labels_census_test.go b/internal/provision/fleet_record_labels_census_test.go| new file mode 100644 |
| index 000000000..d66e18618 |
| --- /dev/null |
| +++ b/internal/provision/fleet_record_labels_census_test.go |
| @@ -0,0 +1,80 @@ |
| +package provision |
| + |
| +// fleetRecordLabelsM2WriteCensusInventory is the fleet record labels M2 |
| +// review (#1008 option B, spec §5) of the record-write census, layered on |
| +// g6PoolWriteCensusInventory (main's newest at the M1 merge, 5b9f77a9). |
| +// Self-review only; the independent #280 verdict is the controller's. |
| +// |
| +// censusKeyExact gains setrecordfirstfleetbox, the new typed writer, beside |
| +// setrecordfleetbox. |
| +// |
| +// Two units are re-digested; no record write is added and no class or kind |
| +// changes: |
| +// - instancesCommand (T5): one more leaf, raw("label", cust, |
| +// runInstancesLabel), beside retry. A command table; the instances |
| +// literal is unchanged. key-site / lit:instances, as before. |
| +// - var routeDecls (T4): one door, POST |
| +// /api/cli/apps/{account}/{app}/instances/{host}/label, kindCLI, the |
| +// zero svcrole.Set (closed to every service role), handled by |
| +// Server.handleAPIInstanceLabel. A declaration only, no record path |
| +// built. key-site / lit:instances,lit:sidecars, as before. |
| +// |
| +// Five units are new: |
| +// - SetRecordFirstFleetBox (T4, fleetbox.go): the typed first-label |
| +// writer. Through updateRecord (the shared CAS read-modify-write with its |
| +// protected-field checks), each attempt refuses, writing nothing, an |
| +// invalid label, a retired record, a region or CreatedAt other than |
| +// want's, a non-empty want.Label, a record already labelled, one with a |
| +// replica assignment, a move, a seed that blocks a move, or an unexpired |
| +// coordinator naming another box; otherwise it sets FleetBox, FleetBoxAt |
| +// and FleetBoxMoved and nothing else. record-writer / |
| +// key:SetRecordFirstFleetBox,key:updateRecord, as SetRecordFleetBox. |
| +// - Server.handleAPIInstanceLabel (T4, instancelabel.go): the owner door. |
| +// Owner gate, the app in this account, linked-app and rate refusals, |
| +// host-claim and no-bucket refusals, a judged record read |
| +// (readRecord), the fleet's owner, then under the fleet's lock the |
| +// evidence and the registry mark (MarkFleetBoxLabelled), and the one |
| +// record write through provision.SetRecordFirstFleetBox. It builds no |
| +// record key and Puts nothing directly. record-writer / |
| +// key:SetRecordFirstFleetBox. |
| +// - const#1 (instancelabel.go): the door's why_not codes; "sidecars" is |
| +// a refusal code, not a path. key-site / lit:sidecars, as |
| +// plangrace.go's const#1. |
| +// - apiSession.instanceLabel (T5, instances_cli.go): the CLI's HTTPS POST |
| +// to the door's .../instances/{host}/label path on the console. A URL |
| +// path, no record key and no store. key-site / lit:instances, as |
| +// apiSession.instanceRetry. |
| +// - labelRefusal (T5, instances_cli.go): maps the door's why_not codes |
| +// ("sidecars" among them) to the CLI's copy. Strings only. key-site / |
| +// lit:sidecars. |
| +// |
| +// No other unit: with the key added, the census at b1f135f8 rejects these |
| +// seven alone. |
| +func fleetRecordLabelsM2WriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), g6PoolWriteCensusInventory()...) |
| + repins := []censusEntry{ |
| + {"cli.go", "instancesCommand", "key-site", "lit:instances", "9a8fa5c9006089fdb9216af4ccc3479120c42078f8ec2dcd44bbd9fdd41b008f"}, |
| + {"internal/console/routedecls.go", "var routeDecls", "key-site", "lit:instances,lit:sidecars", "8b1dc68670eeea9f6ec35b48be89b1053e7f1e891da300146094b3d9f3fdf0dc"}, |
| + } |
| + for _, r := range repins { |
| + found := false |
| + for i, e := range entries { |
| + if e.File == r.File && e.Unit == r.Unit { |
| + if e.Class != r.Class || e.Kinds != r.Kinds { |
| + panic("fleet-record-labels-m2 census: classification changed for " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], found = r, true |
| + } |
| + } |
| + if !found { |
| + panic("fleet-record-labels-m2 census: re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return append(entries, |
| + censusEntry{"internal/provision/fleetbox.go", "SetRecordFirstFleetBox", "record-writer", "key:SetRecordFirstFleetBox,key:updateRecord", "98584c87143a82bf2c304b7fc4c879c5fe06c3203c4571363e20bc704a901b18"}, |
| + censusEntry{"internal/console/instancelabel.go", "Server.handleAPIInstanceLabel", "record-writer", "key:SetRecordFirstFleetBox", "fc941b5a704dfdead0e0fea0ff02a5b3b013b5cb4adadd9d7ebaa70a1874fd66"}, |
| + censusEntry{"internal/console/instancelabel.go", "const#1", "key-site", "lit:sidecars", "84a93e0b27d9c4d25d3817f3e056db64fe336274ec32b7d2e10bd6b50c0dfdde"}, |
| + censusEntry{"instances_cli.go", "apiSession.instanceLabel", "key-site", "lit:instances", "a992fad34e129b61a6f0cd2d8ce3d9076afb2f6321b2dea6baacc6a5b6702a9b"}, |
| + censusEntry{"instances_cli.go", "labelRefusal", "key-site", "lit:sidecars", "9a35dc620c892fa05d3b17e9fd8fff189c1fe0f716b6aad0df1317c64cf4c996"}, |
| + ) |
| +} |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index 9bc78108d..bfa3e4cda 100644 |
| --- a/internal/provision/plan9_b8_census_test.go |
| +++ b/internal/provision/plan9_b8_census_test.go |
| @@ -53,7 +53,7 @@ var censusMethods = map[string]bool{ |
| // typed-record-writer touchpoint. Keep these names aligned with the APIs above. |
| var ( |
| censusKeySuffixes = []string{"recordkey", "recordsprefix", "sidecarsprefix", "sidecarkey", "sidecarmanifestkey", "writerecord", "sequencedrecord"} |
| - censusKeyExact = map[string]bool{"createrecord": true, "updaterecord": true, "setrecordregion": true, "setrecordmove": true, "setrecordrun": true, "setrecordinteractive": true, "setrecordseed": true, "setrecordfleetbox": true, "setrecordcoordinator": true, "setrecordreplicarelease": true, "setrecordreplicaassignment": true, "recordreplicaretired": true, "clearrecordreplicaassignment": true, "haltrecordreplicadeploy": true, "setrecordreplicadeploy": true, "requestrecordreplicaretry": true, "requestreplicaretries": true, "setrecordassetgen": true, "mintrecordassetgen": true, "createsidecarrecord": true, "claimrawupdaterecord": true} |
| + censusKeyExact = map[string]bool{"createrecord": true, "updaterecord": true, "setrecordregion": true, "setrecordmove": true, "setrecordrun": true, "setrecordinteractive": true, "setrecordseed": true, "setrecordfleetbox": true, "setrecordfirstfleetbox": true, "setrecordcoordinator": true, "setrecordreplicarelease": true, "setrecordreplicaassignment": true, "recordreplicaretired": true, "clearrecordreplicaassignment": true, "haltrecordreplicadeploy": true, "setrecordreplicadeploy": true, "requestrecordreplicaretry": true, "requestreplicaretries": true, "setrecordassetgen": true, "mintrecordassetgen": true, "createsidecarrecord": true, "claimrawupdaterecord": true} |
| censusLitWords = []string{"instances", "sidecars"} |
| ) |
| @@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) { |
| if len(got) < 100 { |
| t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root) |
| } |
| - inventory := g6PoolWriteCensusInventory() |
| + inventory := fleetRecordLabelsM2WriteCensusInventory() |
| problems := append(censusDiff(inventory, got), censusPolicy(inventory)...) |
| if len(problems) > 0 { |
| t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n ")) |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 9b2c490eb..90c6a758c 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -217,3 +217,4 @@ plan14-root-reads-g6-pool.tsv 94ccbabaf19c3a449cec248a0c32fcc8593c82d3f7f433c6a4 |
| plan14-root-reads-pdf-host-client-groups.tsv e8beda8fd31db92f742943be631e8d034bbb4880225e69a680d5a0be893807af |
| plan14-root-reads-log-retention-knobs.tsv e8beda8fd31db92f742943be631e8d034bbb4880225e69a680d5a0be893807af |
| plan14-root-reads-fleet-record-labels-m1.tsv 5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46 |
| +plan14-root-reads-fleet-record-labels-m2.tsv 5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46 |
diff --git a/internal/provision/testdata/plan14-root-reads-fleet-record-labels-m2.tsv b/internal/provision/testdata/plan14-root-reads-fleet-record-labels-m2.tsv| new file mode 100644 |
| index 000000000..fe7220dc4 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-fleet-record-labels-m2.tsv |
| @@ -0,0 +1,6 @@ |
| +# Census overlay fleet-record-labels-m2, written by census-propose (#369). census-ruling-fleet-record-labels-m2, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-record-labels-m2.md. |
| +# 0 body, 0 sites, 4 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@coverage . 0ab68a5bc431dd851eafe39985d7fb115813a4d5815ca5d97a17fd53c513a66a |
| +@coverage internal/activator 80de324fa6e417e5bd2a192691e1990795f1043ee2552e3f086e824f2ca8dbd8 |
| +@coverage internal/provision ffe77e34bd6049083353650d7d6a45979050f433e78e6eff2aee23a3acbee374 |
| +@coverage internal/release 31f384ef2ecc0d2e3f12582c4dc60b1a967a93f2534589d9e20da465a19b8656 |