provision: re-pin NewServer census digest for getting started routes
NewServer only gains four getting-started route registrations; their handlers write the console's SQLite marks table, no bucket record. New layered inventory firstRunNextStepsWriteCensusInventory re-pins the digest; kinds and class unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+35
−1
internal/provision/first_run_next_steps_census_test.go+34 −0internal/provision/plan9_b8_census_test.go+1 −1
CI passed — run details
Intent
Attributed to this commit: 59.9 g CO₂e (7,514,957 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-first-run-next-steps, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/internal/provision/first_run_next_steps_census_test.go b/internal/provision/first_run_next_steps_census_test.go| new file mode 100644 |
| index 000000000..bcd2ae08f |
| --- /dev/null |
| +++ b/internal/provision/first_run_next_steps_census_test.go |
| @@ -0,0 +1,34 @@ |
| +package provision |
| + |
| +// Record-write census entry for the account home's Getting started card |
| +// (branch design-first-run-next-steps), layered on |
| +// claimSourceWriteCensusInventory (main's newest). Reviewed by the branch's |
| +// fix implementer against git diff main -- internal/console/server.go. No |
| +// record write is added, moved or reclassified: |
| +// - NewServer: the only change is four registrations, |
| +// POST /a/{sqid}/getting-started/{hide,show,skip,done} |
| +// (internal/console/gettingstarted_handlers.go), and their comment. |
| +// The handlers write the console's SQLite getting_started_marks table |
| +// only (gettingstarted_store.go); none writes a bucket record. Kinds |
| +// are unchanged: the existing "instances" literal keeps it a key-site. |
| +func firstRunNextStepsWriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), claimSourceWriteCensusInventory()...) |
| + repins := []censusEntry{ |
| + {"internal/console/server.go", "NewServer", "key-site", "lit:instances", "573178a5ac4a392c58c942cedc0538b58b7796256e276a6f5c1de9566585e826"}, |
| + } |
| + 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("first-run next steps re-pin changes the class or kinds of " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], found = r, true |
| + } |
| + } |
| + if !found { |
| + panic("first-run next steps re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return entries |
| +} |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index 5f3d95215..76eebb71b 100644 |
| --- a/internal/provision/plan9_b8_census_test.go |
| +++ b/internal/provision/plan9_b8_census_test.go |
| @@ -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 := claimSourceWriteCensusInventory() |
| + inventory := firstRunNextStepsWriteCensusInventory() |
| 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 ")) |