carlos / platform Public

console jobs: allocPrevOwnerCleanLocked in the failure-log census; a lost record write names the incarnations, never a nil error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 9917f5d667d8a0c0c054f37267da31fd3a53b5a3 parent b55b02b
2 files changed, +6 −2
  • internal/console/jobs_test.go +1 −1
  • internal/console/lifetimes_create.go +5 −1

CI failed — run details

diff --git a/internal/console/jobs_test.go b/internal/console/jobs_test.go
index 68566733c..64036800f 100644
--- a/internal/console/jobs_test.go
+++ b/internal/console/jobs_test.go
@@ -53,7 +53,7 @@ var jobPassFuncs = map[string][]string{
"StartLifetimesCutoverWatch": {"lifetimesWatchOnce", "lifetimesFloorWatch", "materializeAppsOnce", "materializeAppsJudged",
"MaterializeApps"},
"StartLifetimeRecoveryPass": {"recoverLifetimes", "recoverOrphanLocked", "recoverAllocationLocked", "recoverRetirementLocked",
- "recoverMigrationLocked", "settleAllocation", "allocSlotLocked", "allocCleanLocked", "allocRecordLocked",
+ "recoverMigrationLocked", "settleAllocation", "allocSlotLocked", "allocCleanLocked", "allocRecordLocked", "allocPrevOwnerCleanLocked",
"orphanStepsLocked", "settleRetirement", "deleteUnderRetiredSlot", "terminateFenced", "retireRecordWithLifetimeLocked"},
"StartIncarnationMigrationPass": {"migratePreLifetimeRecords", "migrationStepsLocked", "migrationFinishLocked", "settleMigration"},
"StartRelay": {"relayReconcile", "relayListRecords", "relayPublishAggregate"},
diff --git a/internal/console/lifetimes_create.go b/internal/console/lifetimes_create.go
index 98ae7842c..e2720b474 100644
--- a/internal/console/lifetimes_create.go
+++ b/internal/console/lifetimes_create.go
@@ -399,7 +399,11 @@ func (s *Server) allocRecordLocked(ctx context.Context, a Allocation) (*provisio
// as absent): only this allocation's own lifetime counts as landed.
if rerr != nil || landed.Incarnation != a.Incarnation {
log.Printf("console: lifetimes: allocation %s of %s: the record write lost to another body (%v; pending)", a.OpID, a.Host, rerr)
- jobFailed(ctx, fmt.Errorf("lifetimes: allocation %s of %s: the record write lost to another body (%w; pending)", a.OpID, a.Host, rerr))
+ lost := rerr
+ if lost == nil {
+ lost = fmt.Errorf("incarnation %d landed, not %d", landed.Incarnation, a.Incarnation)
+ }
+ jobFailed(ctx, fmt.Errorf("lifetimes: allocation %s of %s: the record write lost to another body (%w; pending)", a.OpID, a.Host, lost))
return nil, errLifetimePending
}
seq = landed.RecordSeq // a replay of this allocation landed