carlos / platform Public

host: name the retention status save saveStatus

The record-write census reads a unit named writeRecord as a record
writer. This one saves root's retention status record, nothing
provision reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 8c0f12e83ea304ed0ffbce3ce215e7b54204a3ac parent 462502a
2 files changed, +4 −4
  • internal/host/demodisk_status_test.go +1 −1
  • internal/host/demoretention.go +3 −3
diff --git a/internal/host/demodisk_status_test.go b/internal/host/demodisk_status_test.go
index ddd677ec2..1a4637cb0 100644
--- a/internal/host/demodisk_status_test.go
+++ b/internal/host/demodisk_status_test.go
@@ -62,7 +62,7 @@ func TestDemoBuildsReadsRootsRecord(t *testing.T) {
disk := &rollbackDisk{dir: t.TempDir()}
since := time.Date(2026, 11, 29, 1, 0, 0, 0, time.UTC)
r := &demoRetention{box: retentionDemo, record: func() (rootstate.Store, error) { return disk, nil }, now: func() time.Time { return since }, logf: t.Logf}
- r.writeRecord(demoRetentionResult{outputs: 3, outputBytes: 96, backlog: 2, err: errors.New("lock")})
+ r.saveStatus(demoRetentionResult{outputs: 3, outputBytes: 96, backlog: 2, err: errors.New("lock")})
got, err := readDemoBuilds(func() (rootstate.Store, error) { return disk, nil })
if err != nil {
t.Fatal(err)
diff --git a/internal/host/demoretention.go b/internal/host/demoretention.go
index b30401919..8310cc9a3 100644
--- a/internal/host/demoretention.go
+++ b/internal/host/demoretention.go
@@ -427,13 +427,13 @@ func (r *demoRetention) run(ctx context.Context) demoRetentionResult {
case len(res.removed) > 0:
r.logf("adopt: demo build retention: removed %d demo builds, %d kept (%d bytes): %v", len(res.removed), res.outputs, res.outputBytes, res.removed)
}
- r.writeRecord(res)
+ r.saveStatus(res)
return res
}
-// writeRecord records res, carrying the backlog's start across runs. A
+// saveStatus records res, carrying the backlog's start across runs. A
// record that cannot be written is logged: it is status, never a gate.
-func (r *demoRetention) writeRecord(res demoRetentionResult) {
+func (r *demoRetention) saveStatus(res demoRetentionResult) {
if r.record == nil {
return
}