observability: update-recent-events — updates' RecentEvents(window) — rollout records, not the live transport #827

Closed
opened 2026-08-25 10:59:53 +00:00 by matou-build-agent · 2 comments

Parent

Feature spec: #796 — control-panel observability child spec: activity feed (P12) (DDR 0206).
Design ticket #763; slice-map fan-in #770; wayfinder map #7.
Slice update-recent-events of docs/slices/observability.yaml; covers spec #796 stories 54–61 (updates face).

What to build

The updates face: rollout started (canary named) / applied / rolled back /
quarantined, derived at read time from the rollout records ADRs 0065–0068 already keep.

It reads the records, not the live transport — which is why
provisioning:transport-updates-rollout-live (still pending) does not block this slice
(slice-map ruling 5).

The owner's own words are carried verbatim, the owner's own outcome token and problem flag ride the
event, and the owner's own drill-in (the release's review) is what the surface routes. No new
table, file, stream or collector.

Acceptance criteria

  • (story 56) Given the rollout records ADRs 0065–0068 already keep, when RecentEvents(window) is called, then it derives rollout started (naming the canary), applied, rolled back and quarantined events — and no new table, file, stream or collector is created.
  • (ruling 5) Given the derivation, then it reads the rollout records, not the live rollout transport.
  • (story 8) Given each event, then it carries updates' own words verbatim and its own outcome token; and (story 19) a rollback or quarantine carries the owner's problem flag.
  • (story 56) Given the window bound, then only events inside it are returned.
  • (story 31) Given each event, then it carries updates' own drill-in intent (the release's review).
  • (stories 45, 47) Given any operator-triggered rollout, then the event carries no actor and no person subject.

Blocked by

  • #824 — observability:activity-ops-event-contract
  • provisioning:updates-rollback-quarantine (#74 — done, satisfied)

Task manifest

task: observability:update-recent-events
interface: updates gain an additive `RecentEvents(window)` face returning typed ops events for rollout
  started (canary named) / applied / rolled back / quarantined, derived at read time from the existing
  rollout records
seam: 'the updates package''s own tests (prior art `updates_rollout_integration_test.go`): the four rollout
  steps derived for a window from the records; the owner''s words carried verbatim; the window bound honoured;
  the problem flag set on rollback/quarantine; no actor emitted'
acceptance:
- given: a rollout that started with a named canary and was later applied
  when: '`RecentEvents(window)` is called'
  then: both events return with updates' own words and outcome tokens
- given: a rollout that was rolled back
  when: '`RecentEvents(window)` is called'
  then: the event returns carrying the owner's problem flag
- given: a rollout that was quarantined
  when: '`RecentEvents(window)` is called'
  then: the event returns with updates' own wording and drill-in intent
- given: events outside the requested window
  when: '`RecentEvents(window)` is called'
  then: they are not returned
- given: an operator-triggered rollout
  when: the event is derived
  then: it carries no actor and no person subject
depends_on:
- activity-ops-event-contract
- provisioning:updates-rollback-quarantine
out_of_scope:
- reading the live rollout transport — the records are the source (ruling 5)
- the read-composition and route (`transport-activity-read`)
- any new table, file, stream or collector
- any lever — the feed carries no re-run or re-raise
needs_human_decision: []

Emitted by /to-tickets over docs/slices/observability.yaml in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.

## Parent Feature spec: **#796** — control-panel observability child spec: activity feed (P12) (DDR 0206). Design ticket #763; slice-map fan-in **#770**; wayfinder map #7. Slice `update-recent-events` of `docs/slices/observability.yaml`; covers spec #796 stories 54–61 (updates face). ## What to build The updates face: rollout **started** (canary named) / **applied** / **rolled back** / **quarantined**, derived at read time from the rollout records ADRs 0065–0068 already keep. It reads the **records**, not the live transport — which is why `provisioning:transport-updates-rollout-live` (still pending) does not block this slice (slice-map ruling 5). The owner's own words are carried verbatim, the owner's own outcome token and problem flag ride the event, and the owner's own drill-in (the release's review) is what the surface routes. No new table, file, stream or collector. ## Acceptance criteria - [ ] (story 56) Given the rollout records ADRs 0065–0068 already keep, when `RecentEvents(window)` is called, then it derives rollout started (naming the canary), applied, rolled back and quarantined events — and **no new table, file, stream or collector is created**. - [ ] (ruling 5) Given the derivation, then it reads the rollout **records**, not the live rollout transport. - [ ] (story 8) Given each event, then it carries updates' **own words verbatim** and its own outcome token; and (story 19) a rollback or quarantine carries the owner's problem flag. - [ ] (story 56) Given the window bound, then only events inside it are returned. - [ ] (story 31) Given each event, then it carries updates' own drill-in intent (the release's review). - [ ] (stories 45, 47) Given any operator-triggered rollout, then the event carries **no actor** and no person subject. ## Blocked by - #824 — `observability:activity-ops-event-contract` - `provisioning:updates-rollback-quarantine` (#74 — done, satisfied) ## Task manifest ```yaml task: observability:update-recent-events interface: updates gain an additive `RecentEvents(window)` face returning typed ops events for rollout started (canary named) / applied / rolled back / quarantined, derived at read time from the existing rollout records seam: 'the updates package''s own tests (prior art `updates_rollout_integration_test.go`): the four rollout steps derived for a window from the records; the owner''s words carried verbatim; the window bound honoured; the problem flag set on rollback/quarantine; no actor emitted' acceptance: - given: a rollout that started with a named canary and was later applied when: '`RecentEvents(window)` is called' then: both events return with updates' own words and outcome tokens - given: a rollout that was rolled back when: '`RecentEvents(window)` is called' then: the event returns carrying the owner's problem flag - given: a rollout that was quarantined when: '`RecentEvents(window)` is called' then: the event returns with updates' own wording and drill-in intent - given: events outside the requested window when: '`RecentEvents(window)` is called' then: they are not returned - given: an operator-triggered rollout when: the event is derived then: it carries no actor and no person subject depends_on: - activity-ops-event-contract - provisioning:updates-rollback-quarantine out_of_scope: - reading the live rollout transport — the records are the source (ruling 5) - the read-composition and route (`transport-activity-read`) - any new table, file, stream or collector - any lever — the feed carries no re-run or re-raise needs_human_decision: [] ``` --- *Emitted by `/to-tickets` over `docs/slices/observability.yaml` in an unattended session under ADR 0174 (two-way-door posture — Ben's veto is asynchronous, never blocking). Advances #797.*
Author
Member

swarm-claim host=elitebook-distributed-server-03 run=10075
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=10075 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #827 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 827,
  "status": "success",
  "commits": [
    "b3151c5"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/update/recentevents.go",
    "internal/update/recentevents_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/update",
      "exit_code": 0
    },
    {
      "command": "go test -count=1 ./internal/update ./internal/opsevent",
      "exit_code": 0
    }
  ],
  "criteria": {
    "(story 56) RecentEvents derives rollout started (naming canary), applied, rolled back, quarantined from the rollout records ADRs 0065-0068 keep; no new table/file/stream/collector": "internal/update/recentevents.go — startedEvent reads o.store.lastRollout (canary + startedAt), terminalEvents reads o.store.history (applied/rolled-back/quarantined); pure projection, no new store. Tests TestRecentEvents_StartedNamingCanaryThenApplied / _QuarantinedCarriesWordingAndDrillIn",
    "(ruling 5) reads the rollout records, not the live rollout transport": "recentevents.go reads o.store.history and o.store.lastRollout only — no transport/subscriber; provisioning:transport-updates-rollout-live not depended on",
    "(story 8) each event carries updates' own words verbatim and its own outcome token": "terminalWords carries e.Notes (signed release notes, ADR 0068/0100) verbatim; outcome = string(e.Outcome); started names the canary. Asserted in TestRecentEvents_StartedNamingCanaryThenApplied (applied.Words == \"security fix\", outcomes started/applied)",
    "(story 19) a rollback or quarantine carries the owner's problem flag": "terminalEvents sets Problem = Outcome==OutcomeRolledBack || Outcome==OutcomeQuarantined. Asserted in TestRecentEvents_RolledBackCarriesProblemFlag and _QuarantinedCarriesWordingAndDrillIn",
    "(story 56) only events inside the window are returned": "startedEvent/terminalEvents skip on !win.Contains(At). Asserted in TestRecentEvents_WindowBoundHonoured (before/after windows return 0, open window returns events)",
    "(story 31) each event carries updates' own drill-in intent (the release's review)": "reviewDrillIn(revision) = {Label:\"Review\", Target:\"updates\", Ref:revision} on every event. Asserted in _RolledBackCarriesProblemFlag and _QuarantinedCarriesWordingAndDrillIn",
    "(stories 45, 47) any operator-triggered rollout carries no actor and no person subject": "OpsEvent type has no actor field; subject is opsevent.Release(...) always. Asserted in TestRecentEvents_OperatorTriggeredCarriesNoActorNoPerson (approved feature release; every event Subject.Kind()==KindRelease)"
  },
  "summary": "updates gains an additive RecentEvents(window) deriving rollout started/applied/rolled-back/quarantined ops events from the history and retained-view records it already keeps, reading records not the live transport.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #827 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 827, "status": "success", "commits": [ "b3151c5" ], "changed_files": [ "STATUS.md", "internal/update/recentevents.go", "internal/update/recentevents_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/update", "exit_code": 0 }, { "command": "go test -count=1 ./internal/update ./internal/opsevent", "exit_code": 0 } ], "criteria": { "(story 56) RecentEvents derives rollout started (naming canary), applied, rolled back, quarantined from the rollout records ADRs 0065-0068 keep; no new table/file/stream/collector": "internal/update/recentevents.go — startedEvent reads o.store.lastRollout (canary + startedAt), terminalEvents reads o.store.history (applied/rolled-back/quarantined); pure projection, no new store. Tests TestRecentEvents_StartedNamingCanaryThenApplied / _QuarantinedCarriesWordingAndDrillIn", "(ruling 5) reads the rollout records, not the live rollout transport": "recentevents.go reads o.store.history and o.store.lastRollout only — no transport/subscriber; provisioning:transport-updates-rollout-live not depended on", "(story 8) each event carries updates' own words verbatim and its own outcome token": "terminalWords carries e.Notes (signed release notes, ADR 0068/0100) verbatim; outcome = string(e.Outcome); started names the canary. Asserted in TestRecentEvents_StartedNamingCanaryThenApplied (applied.Words == \"security fix\", outcomes started/applied)", "(story 19) a rollback or quarantine carries the owner's problem flag": "terminalEvents sets Problem = Outcome==OutcomeRolledBack || Outcome==OutcomeQuarantined. Asserted in TestRecentEvents_RolledBackCarriesProblemFlag and _QuarantinedCarriesWordingAndDrillIn", "(story 56) only events inside the window are returned": "startedEvent/terminalEvents skip on !win.Contains(At). Asserted in TestRecentEvents_WindowBoundHonoured (before/after windows return 0, open window returns events)", "(story 31) each event carries updates' own drill-in intent (the release's review)": "reviewDrillIn(revision) = {Label:\"Review\", Target:\"updates\", Ref:revision} on every event. Asserted in _RolledBackCarriesProblemFlag and _QuarantinedCarriesWordingAndDrillIn", "(stories 45, 47) any operator-triggered rollout carries no actor and no person subject": "OpsEvent type has no actor field; subject is opsevent.Release(...) always. Asserted in TestRecentEvents_OperatorTriggeredCarriesNoActorNoPerson (approved feature release; every event Subject.Kind()==KindRelease)" }, "summary": "updates gains an additive RecentEvents(window) deriving rollout started/applied/rolled-back/quarantined ops events from the history and retained-view records it already keeps, reading records not the live transport.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#827
No description provided.