carlos / platform Public

census: record-write digest for writeRelabels serial bump

Re-digest Server.writeRelabels in the sr-followups layer: one bumpSerial
after the loop when a relabel landed, reached also from the detach doors
through relabelAfterDetach (#1008 T9 follow-ups). Same typed
SetRecordFleetBox write; no new record kind.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 8b2be005e100762a9cb6f510d5ad7986aaa8acb9 parent bfdfa28
1 file changed, +14 −0
  • internal/provision/sr_followups_census_test.go +14 −0

CI passed — run details

Intent

Human

<task-notification> <task-id>af1998bd1356ed854</task-id> <tool-use-id>toolu_01BY8LsFp8bkETpAyZ4Mjf3d</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/24f2e8d0-8e47-4773-a96b-f7e9260c860f/tasks/af1998bd1356ed854.output</output-file> <status>completed</status> <summary>Agent "Final-review fix wave" 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: F1 and F2 are fixed and committed. Commit: bfdfa287 "console: refuse unmovable trashed records; bump serial on relabels" (only `fleetrelabel.go` and its test changed). - **F1:** a drain now excuses a trashed app's unlabelled record only when `movableVerified` returns ok with no error and `chooseMoveDestination` finds another box. Otherwise the drain stops on that app, as before. Comment updated. New test `TestDrainRefusesATrashedAppsUnmovableUnlabelledRecord` (system unit and fixed upstream address cases) failed before the fix and passes now. - **F2:** `writeRelabels` bumps the serial once after the loop when `moved &gt; 0`, the same bare `s.bumpSerial(ctx)` the label door uses (`instancelabel.go:294`). New test `TestRelabelMovesBumpTheSerial` covers the worker (and checks an idle pass does not bump), drain, the API detach door, and a cancelled context. It failed before the fix and passes now. Tests: both Task 1 and Task 2 "Run" patterns passed in full, not narrowed (288 s and 166 s), plus `TestIdlePass|TestUnverifiableManifest|TestOneCopyStateless|TestBelowFloor|TestLabelsPaused|TestOneBoxLabelled`. gofmt and vet are clean, and `make census-card` reports nothing to approve. Concerns: the report is not in the commit because `.superpowers` is gitignored, so it sits untracked in the worktree. The scratch folder `~/.cache/fleet-drain-followups` is deleted. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/fleet-drain-followups/.superpowers/sdd/2026-11-15-fleet-drain-followups/final-fix-report.md</result> <usage><subagent_tokens>80487</subagent_tokens><tool_uses>19</tool_uses><duration_ms>655308</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bmvf73vkq</task-id> <tool-use-id>toolu_01SxVj8Y7YWZcYoZj4WVTVGd</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/24f2e8d0-8e47-4773-a96b-f7e9260c860f/tasks/bmvf73vkq.output</output-file> <status>completed</status> <summary>Background command "for i in $(seq 1 60); do s=$(amadan ci status carlos/platform -branch fleet-drain-followups 2&gt;&amp;1 | head -1); case "$s" in *running*|*queued*|*pending*) sleep 45;; *) echo "$s"; amadan ci status carlos/platform -branch fleet-drain-followups -json 2&gt;&amp;1 | head -c 3000; exit 0;; esac; done; echo timeout" completed (exit code 0)</summary> </task-notification>

Attributed to this commit: 10.2 g CO₂e (1,239,937 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on fleet-drain-followups, 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/sr_followups_census_test.go b/internal/provision/sr_followups_census_test.go
index 9907c2a62..5f70ea139 100644
--- a/internal/provision/sr_followups_census_test.go
+++ b/internal/provision/sr_followups_census_test.go
@@ -27,6 +27,18 @@ package provision
// a door box, through configAckStore's fleets/<fleet>/ prefix store. A
// config ack is not a host record and names no record key: nonrecord,
// sel:Put, as WriteConfigAck.
+//
+// Fleet drain follow-ups (#1008 T9 follow-ups), one re-digest:
+// - internal/console/fleetrelabel.go Server.writeRelabels (record-writer):
+// after the loop, when any relabel landed (moved > 0), it calls
+// s.bumpSerial(ctx) once, announcing the pass's record writes so boxes
+// converge now rather than at their next instance pass, as the label
+// door announces its own. The detach doors reach this writer through
+// relabelAfterDetach, which runs the fleet's relabel under the door's
+// lock so a detached box's records move to a survivor at once. The
+// record writes are unchanged: MarkFleetBoxLabelled, then
+// provision.SetRecordFleetBox only; bumpSerial writes no record. Still
+// record-writer, key:SetRecordFleetBox.
func srFollowupsWriteCensusInventory() []censusEntry {
entries := append([]censusEntry(nil), flatPlansWriteCensusInventory()...)
for _, r := range []censusEntry{
@@ -34,6 +46,8 @@ func srFollowupsWriteCensusInventory() []censusEntry {
{"internal/appconfig/configack.go", "WriteConfigAck", "nonrecord", "sel:Put", "8dba7cab65ff994109d3edc75058101c90c2998f52afdce4734d29bb8259913c"},
{"internal/host/movesfinal.go", "sourceFinal.configAck", "nonrecord", "sel:Put", "29eb4a6dd1944a8ba33b8cdb3b794d45336557b988976fbbcd6ff77dd1e054b3"},
{"internal/appconfig/configack.go", "ReplaceConfigAckBlind", "nonrecord", "sel:Put", "4abea553f02c2bd0a520e6d1d39ccb79f4563a36d5575a49c2d29513f701edea"},
+ // Fleet drain follow-ups (#1008 T9): one bumpSerial after the loop when a relabel landed, and the detach doors' relabel reaches it; same typed SetRecordFleetBox write, no new record key.
+ {"internal/console/fleetrelabel.go", "Server.writeRelabels", "record-writer", "key:SetRecordFleetBox", "2c69e710573d6da5de7622b825e822140d51b8f6c94621d5697dcbca1cfe3bb2"},
} {
replaced := false
for i, e := range entries {