provisioning: record a deploy time so the activity feed can place deploy/health rows in the window #840
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#840
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
The activity feed's devices face (#826) can only place provisioning's deploy/health events in time if provisioning records when a deploy ran. Today
provision.Orchestratorkeeps a latest-winsactive map[DeviceID]*Outcomewith no timestamp and no history, andfleetstate.Readerexposes no device activation time. Soprovision.RecentEvents(window)(shipped in #826) can only emit its standing per-service health-check failures with the honest-zeroAt(ADR 0100 — no fabricated time), which a bounded window excludes.Proposed fix
Give provisioning a genuinely-recorded deploy time — e.g. stamp each
Outcomewith the deploy-completion time (provision already holds an injectableclock func() time.Time), or record deploy started/completed/failed transitions. Thenprovision.RecentEventsplaces its rows in the fleet chronology and a bounded 7-day/30-day window includes them, closing acceptance clause 2 of #796 story 56 fully.Found while
Implementing #826
observability:fleet-recent-events. Recording a deploy time is a write-path change, which #826 lists inout_of_scope("no new table, file, stream or collector"; "the only write-path touch in the whole feature" is the founding stamp). Ruled under ADR 0174 on #826 and filed here for a scoped write-path slice.Verified against the current code:
provision.Outcomecarries no timestamp field, and theactivemap is latest-wins with no history — the activity-feed gap is real. Two-way door — an additive write-path change to an existing injectable clock, revertible by commit, provable by the existingRecentEvents/seam test suite — proceeding toready-for-agent.Agent Brief
Category: enhancement
Summary: Provisioning should record a genuine deploy timestamp so the fleet activity feed can place deploy/health events within a bounded time window instead of only emitting the honest-zero fallback.
Current behavior:
Provisioning keeps a latest-wins outcome per device with no timestamp and no history of when a deploy completed.
RecentEvents(window)therefore cannot place deploy/health rows in a bounded window and falls back to the honest-zeroAtvalue (per ADR 0100's no-fabricated-time rule), which any bounded window excludes.Desired behavior:
Each recorded deploy outcome carries a real, deploy-completion timestamp (using the orchestrator's existing injectable clock, not wall-clock time directly, so it stays test-controllable).
RecentEventsuses this timestamp to place deploy/health rows correctly within a requested window (e.g. 7-day / 30-day).Key interfaces:
clock func() time.Timeshould be the time source — no new time dependency.RecentEvents(window)should read this timestamp instead of falling back to the honest-zero value for deploy/health rows that have a real completion time.Acceptance criteria:
RecentEvents(window)places a recently-completed deploy's row within a window that covers its completion time, and excludes it once the window has passed.Atrather than a fabricated time — ADR 0100 is not violated.RecentEventsand orchestrator seam tests continue to pass; a new test covers a deploy landing inside vs. outside the window.Out of scope:
RecentEvents's existing standing-health-check-failure behavior.swarm-claim host=elitebook-distributed-server-03 run=10101
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #840 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope