observability: rescue and update drain their deploy event streams into oplog.Store (the #870 residue) #889

Closed
opened 2026-08-27 04:56:12 +00:00 by ben · 2 comments
Owner

What

#870 (7292b74d) landed the durable operation-log line store (internal/oplog.Store) and taught the deploy path to tee its streamed clan.Event lines into it under the run's LogRef (applyRevision). The rescue and update emitters still discard their streams, so their runs land NO lines and an operation-log scope for them still replays as aged-out:

  • internal/monitor/respond.go:571 — dep.Run(ctx, nil)
  • internal/rescue/deviceladder.go:508 — dep.Run(ctx, nil)
  • internal/rescue/serviceladder.go:357 — dep.Run(ctx, nil)

Do

Drain each of the three streams into the store the same way applyRevision does (same LogRef discipline, same structured level carriage — DDR 0203 ruling 5), so an operation-log scope for a rescue or update run replays start-to-now and live-tails while it runs (ADR 0027 Open/Download promise).

Prove

Seam tests beside internal/oplog/oplog_test.go / internal/provision/oplog_test.go: after a rescue ladder run and an update respond run, the store holds the run's lines under its LogRef; the catalogue resolves the scope to a replayable target instead of operation_log_aged_out.

Refs

#870 close-report residue, #877 (closed as landed), spec #791, DDR 0203 ruling 5, ADR 0027.

## What `#870` (`7292b74d`) landed the durable operation-log line store (`internal/oplog.Store`) and taught the deploy path to tee its streamed `clan.Event` lines into it under the run's `LogRef` (`applyRevision`). The rescue and update emitters still discard their streams, so their runs land NO lines and an operation-log scope for them still replays as aged-out: - `internal/monitor/respond.go:571` — `dep.Run(ctx, nil)` - `internal/rescue/deviceladder.go:508` — `dep.Run(ctx, nil)` - `internal/rescue/serviceladder.go:357` — `dep.Run(ctx, nil)` ## Do Drain each of the three streams into the store the same way `applyRevision` does (same LogRef discipline, same structured level carriage — DDR 0203 ruling 5), so an operation-log scope for a rescue or update run replays start-to-now and live-tails while it runs (ADR 0027 Open/Download promise). ## Prove Seam tests beside `internal/oplog/oplog_test.go` / `internal/provision/oplog_test.go`: after a rescue ladder run and an update respond run, the store holds the run's lines under its LogRef; the catalogue resolves the scope to a replayable target instead of `operation_log_aged_out`. ## Refs #870 close-report residue, #877 (closed as landed), spec #791, DDR 0203 ruling 5, ADR 0027.

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

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

close-report for #889 — status success

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

envelope
{
  "issue": 889,
  "status": "success",
  "commits": [
    "5d64bee799d997a78579ed41a64c123d9a903886"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/logs_source_test.go",
    "control-plane/cmd/control-plane/logs_wiring.go",
    "control-plane/cmd/control-plane/whole_composition.go",
    "internal/monitor/monitor.go",
    "internal/monitor/oplog.go",
    "internal/monitor/oplog_test.go",
    "internal/monitor/respond.go",
    "internal/rescue/deviceladder.go",
    "internal/rescue/oplog.go",
    "internal/rescue/oplog_test.go",
    "internal/rescue/serviceladder.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/rescue/... ./internal/monitor/... ./internal/provision/... ./control-plane/cmd/control-plane/",
      "exit_code": 0
    },
    {
      "command": "go vet ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci (pre-push gate: full go build/vet/test)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "rescue and update emitters drain their deploy streams into oplog.Store the same way applyRevision does (same LogRef discipline, same structured level carriage — DDR 0203 ruling 5)": "internal/rescue/oplog.go captureDeploy + rescueOpScope route restart/redeploy/move (serviceladder.go) and rehome (deviceladder.go) through the store under oplog.Scope(\"rescue\",…); internal/monitor/oplog.go captureDeploy + respondOpScope route the respond fix (respond.go issueOp) under oplog.Scope(\"update\",…); each tees ev.Message under the run's scope exactly as provision/deploy.go applyRevision does",
    "after a rescue ladder run, the store holds the run's lines under its LogRef": "internal/rescue/oplog_test.go TestServiceLadder_RedeployCapturesStreamedLinesIntoOperationLog asserts store.Retained(scope) and store.Lines(scope) carries the deploy's own 'reconciled' line",
    "after an update respond run, the store holds the run's lines under its LogRef": "internal/monitor/oplog_test.go TestRespond_ApplyCapturesStreamedLinesIntoOperationLog asserts the applied restart fix lands its 'reconciled' line under oplog.Scope(\"update\", node/restart-chat)",
    "the catalogue resolves the scope to a replayable target instead of operation_log_aged_out": "control-plane/cmd/control-plane/logs_source_test.go TestComposedOplog_RescueAndUpdateScopesResolve — a retained rescue/update scope resolves to one KindOperationLog target (Live=false), an uncaptured one to ReasonOperationLogAgedOut; composition wires the SAME deployOpLog into ladders and catalogue (whole_composition.go)"
  },
  "summary": "Rescue (restart/redeploy/move/rehome) and update-respond deploy streams now tee into the shared oplog.Store under their operation-log scope, so their runs replay start-to-now instead of aging out.",
  "reason": "",
  "blockers": [],
  "no_code_change": ""
}
**close-report** for #889 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 889, "status": "success", "commits": [ "5d64bee799d997a78579ed41a64c123d9a903886" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/logs_source_test.go", "control-plane/cmd/control-plane/logs_wiring.go", "control-plane/cmd/control-plane/whole_composition.go", "internal/monitor/monitor.go", "internal/monitor/oplog.go", "internal/monitor/oplog_test.go", "internal/monitor/respond.go", "internal/rescue/deviceladder.go", "internal/rescue/oplog.go", "internal/rescue/oplog_test.go", "internal/rescue/serviceladder.go" ], "tests": [ { "command": "go test ./internal/rescue/... ./internal/monitor/... ./internal/provision/... ./control-plane/cmd/control-plane/", "exit_code": 0 }, { "command": "go vet ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci (pre-push gate: full go build/vet/test)", "exit_code": 0 } ], "criteria": { "rescue and update emitters drain their deploy streams into oplog.Store the same way applyRevision does (same LogRef discipline, same structured level carriage — DDR 0203 ruling 5)": "internal/rescue/oplog.go captureDeploy + rescueOpScope route restart/redeploy/move (serviceladder.go) and rehome (deviceladder.go) through the store under oplog.Scope(\"rescue\",…); internal/monitor/oplog.go captureDeploy + respondOpScope route the respond fix (respond.go issueOp) under oplog.Scope(\"update\",…); each tees ev.Message under the run's scope exactly as provision/deploy.go applyRevision does", "after a rescue ladder run, the store holds the run's lines under its LogRef": "internal/rescue/oplog_test.go TestServiceLadder_RedeployCapturesStreamedLinesIntoOperationLog asserts store.Retained(scope) and store.Lines(scope) carries the deploy's own 'reconciled' line", "after an update respond run, the store holds the run's lines under its LogRef": "internal/monitor/oplog_test.go TestRespond_ApplyCapturesStreamedLinesIntoOperationLog asserts the applied restart fix lands its 'reconciled' line under oplog.Scope(\"update\", node/restart-chat)", "the catalogue resolves the scope to a replayable target instead of operation_log_aged_out": "control-plane/cmd/control-plane/logs_source_test.go TestComposedOplog_RescueAndUpdateScopesResolve — a retained rescue/update scope resolves to one KindOperationLog target (Live=false), an uncaptured one to ReasonOperationLogAgedOut; composition wires the SAME deployOpLog into ladders and catalogue (whole_composition.go)" }, "summary": "Rescue (restart/redeploy/move/rehome) and update-respond deploy streams now tee into the shared oplog.Store under their operation-log scope, so their runs replay start-to-now instead of aging out.", "reason": "", "blockers": [], "no_code_change": "" } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#889
No description provided.