feat: image identity and an update record per host #5324
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.47) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.47 · 489 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 99% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.371
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #5324"
general
weight: 0.35
claude[bot]
Phase 2 of the judged-updates plan (amir20/doligence#708), first half: image identity and the update record. Rollback is the next PR.
Stacked on #5323 (safe swap). Merge that first.
What
Container.ImageID(local image id) andContainer.ImageDigest(first RepoDigest for the repo the container was created from) for Docker and agents. The digest comes from one image inspect per image id, cached in the client. List entries carryImageIDonly.Container.imageId = 30,Container.imageDigest = 31. Field 6 (the old unusedImageId) is nowreserved, so an old agent's field 6 can never be read as the new one.UpdateContainerRequestgainssource = 3andrunId = 4.startwhose image differs from the one recorded under that name emits aContainerUpdateEvent{host, name, oldId, newId, from/to ref, digest, imageId, oldStartedAt, at, source, runId, rolledBack}. Keyed on start by name, so Watchtower (stop, rm, create, start), compose (temp name, rename, start) and the swap all look the same.Store.RecentUpdates(),Store.SubscribeUpdates(ctx, ch), and the same ondocker.Servicebehind acontainer.UpdateHistoryinterface.Source and run id
The swap stamps
dev.dozzle.update-sourceanddev.dozzle.update-runon the new container, next toprevious-image. Labels were the simplest option that also crosses the agent boundary and survives a Dozzle restart.schedulefrom a scheduled bulk run,dozzlefrom the UI (single or bulk),cloudfrom theupdate_containertool.bulkUpdates.Startmakes one random run id per run, so a scheduled night groups. The job JSON now hasrunId.previous-imagematches the image the old container actually ran. Watchtower copies labels onto the container it recreates, so without this check a Watchtower update of a container Dozzle once updated would read as Dozzle's.watchtowerwhen the container hascom.centurylinklabs.watchtower.*labels (notenable=false), elseexternal.Rolled back swaps
The swap records its own rollback with
Store.RecordRolledBack(rolledBack: true, from = old image, to = the image it tried, newId = the container running now). It has to, since a replacement that never started gives the store nothing to see. When the replacement did start and then failed, the old container coming back (or its--rmrecreation) is recognized as the swap undoing itself and is not reported as a second update. So a failed swap is the forward event plus a rolled back one with the same to-digest, which lines up with the plan'sON CONFLICT (..., to_digest).Tests
--rmrestore, manual downgrade, ring of 20, pruning, k8s digestFindContainerfills id and digest (cached), label stamping, a stale run label is cleared, rollback is recorded with digests and sourcego test ./...andgo vet ./...pass. The Docker integration tests (DOCKER_IT=1) were not run.Not in this PR
🤖 Generated with Claude Code
https://claude.ai/code/session_017DwX91Gcan9WBmKUnryftY