| new file mode 100644 |
| index 000000000..cde1bf15c |
| --- /dev/null |
| +++ b/internal/provision/member_backups_1_census_test.go |
| @@ -0,0 +1,55 @@ |
| +package provision |
| + |
| +// memberBackups1WriteCensusInventory is the member backups slice 1 review |
| +// of the record-write census (#898, design |
| +// docs/superpowers/specs/2026-11-11-member-backups-design.md), layered on |
| +// linkedDeploymentsSlice1WriteCensusInventory. It re-digests four units and |
| +// adds one; no record write is added and no class or kind changes: |
| +// - instancesCommand (cli.go, Task 5): the instances command tree gains |
| +// raw("backups", cust, runInstancesBackups) beside list and delete. A |
| +// subcommand registration only. key-site / lit:instances, as before. |
| +// - Server.handleAppInstance (Task 4): after the page's existing reads it |
| +// sets detail.Backups from s.instanceBackups, which reads the instance's |
| +// record (readRecord) and the copy's listing to build the Backups |
| +// section. Reads only; no record, registry row or object is written. |
| +// key-site / lit:instances, as before. |
| +// - var linkedPolicies (Task 3): one more pattern, |
| +// GET /api/cli/apps/{account}/{app}/instances/{host}/backups, mapped to |
| +// linkedRefuse. A map entry, no record path built from it. key-site / |
| +// lit:instances,lit:sidecars, as before. |
| +// - var routeDecls (Task 3): one kindCLI door, |
| +// GET /api/cli/apps/{account}/{app}/instances/{host}/backups (Deploy and |
| +// Operate allowed, handleAPIInstanceBackups, read only). A declaration, |
| +// no record path. key-site / lit:instances,lit:sidecars, as before. |
| +// |
| +// New unit: |
| +// - backupsShow (instances_backups.go, Task 5): the CLI side of |
| +// `carlos instances backups`; resolves the instance (resolveDBInstance) |
| +// and GETs the console's "/instances/{host}/backups" door, then prints |
| +// or passes the JSON through. The literal is a console API path, not a |
| +// record key; it writes nothing. key-site / lit:instances, as the other |
| +// CLI instance verbs (apiSession.instanceGatePass, runInstances). |
| +func memberBackups1WriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), linkedDeploymentsSlice1WriteCensusInventory()...) |
| + repins := []censusEntry{ |
| + {"cli.go", "instancesCommand", "key-site", "lit:instances", "853d812fe20ca0549e84f11ea2e4e48f11c44fc0eee58e83bae185c3efa8649f"}, |
| + {"internal/console/instancepage.go", "Server.handleAppInstance", "key-site", "lit:instances", "aee1f045b7b79923b409d05f0372a3fb70e7b14268e710edf7894dab9d9df40e"}, |
| + {"internal/console/linkedpolicy.go", "var linkedPolicies", "key-site", "lit:instances,lit:sidecars", "e2d2ea5dc6e800302890d1870bfdabd3841b0b2ef4391da0c91bb46a44d8037d"}, |
| + {"internal/console/routedecls.go", "var routeDecls", "key-site", "lit:instances,lit:sidecars", "1623af4688d9888e1bb0045908d039f6ce49b35d7064d9fab72150e307ef3e47"}, |
| + } |
| + 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("member-backups-1 census: classification changed for " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], found = r, true |
| + } |
| + } |
| + if !found { |
| + panic("member-backups-1 census: re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return append(entries, censusEntry{"instances_backups.go", "backupsShow", "key-site", "lit:instances", "518a32e4eb95c5b6067a9d6ef3175ab4ee00a1c56bf67a25a80356d123566d30"}) |
| +} |