Release notes an operator approves against cover a fraction of what the update applies — the channel feed serves ONE manifest, notes are per-cut deltas, and a gateway records only the cut it happens to see at a 15-min poll (tonight: 7 lines shown for… #1814

Closed
opened 2026-09-24 04:45:12 +00:00 by ben · 4 comments
Owner

Proven (whakatohea-demo gateway 134.199.167.181, control plane ff4a5263, 2026-09-24 04:xx UTC)

What the operator would read. /var/lib/idss/update.json lists six pending testing patches — seq 2725, 2726, 2727, 2731, 2732, 2739 — each with 1–7 note lines. Newest 7d3d84fa (2739) notes: #1807, #1806, three app-report/ADR 0267 lines, one healer line.

What the update actually applies. The gateway is at ff4a5263 = seq 2699 (git rev-list --count). 7d3d84fa is cumulative (patch), so approving it lands 40 commits (git log ff4a5263..7d3d84fa) — including the whole Destroy-community feature (#1785–#1792), the IDIP Members-tab redesign (PR #1796), #1778/#1779/#1782 service access, #1799, #1802. None of those appear in any listed release's notes. They sit in seq 2700–2724, 26 commits.

Why they are invisible — three facts:

  1. The feed document is ONE release. GET https://get.idss.nz/channel/testing.json → {manifest, signature}; the decoded manifest is {revision, sequence: 2739, kind, title, notes, signed_by, published, artifacts} — no list, no previous. internal/matourelease/publish.go writes exactly that (FeedPath = channel/<name>.json) and GCs old revision dirs keeping only the served release and the one before (publish.go:95-103).
  2. Notes are per-cut deltas. scripts/release-rail/publish.sh:157 notes="$(git log --format='- %s' ${base}..${sha})" with base="$newest" (the previous cut). Correct for a feed that lists every cut; wrong for one that shows only the newest.
  3. The gateway records only what it sees at a poll. internal/update/update.go:376-441: a poll reads the single manifest, and if its sequence is above the channel high-water it appends ONE record and lifts the mark. Polls are ~15 min apart (last_checked 04:05:07 → 04:20:07 → 04:35). This gateway's release source came up at 22:19:47Z (journal: "release source wired"); the first release it could see was 2725, published 22:24Z. Everything cut before 22:19Z (2700–2724) was never the newest at any of its polls, so it was never recorded — history has zero superseded entries; nothing was folded, it was simply never seen. The same happens to any two cuts closer together than one poll interval on a busy swarm night.

Net: the review sheet (ReviewUpdateScreen.vue:21, notes rendered verbatim) and the Updates row show an operator a fraction of what Approve will do to their community. Tonight the fraction was 7 lines for 40 commits. That is the U-series promise ("queued here for your approval, with plain-language release notes", DDR for ADR 0248) broken at the source, and #1562's lane.

Fix

  1. The feed lists recent cuts, not one. Either the channel doc carries a signed releases: [...] window (say the last 50 manifests, each still individually signed) or each manifest carries previous: <revision> and the rail keeps every cut's manifest under its revision dir (today GC keeps two). Either lets a gateway at seq N enumerate every cut in (N, newest].
  2. The gateway records every cut it has not reached, not just the one it happened to see, walking the list/chain back to its high-water on each poll. Supersession (supersede.go) then folds them exactly as designed and history shows what was folded — today the fold has nothing to fold.
  3. The review sheet for a cumulative release shows the union of notes from current+1 to the release under review, grouped by cut (title + published time), so "Approve" is read against what it does. The Updates row's one-line summary says "N cuts since your version".
  4. Test at the seam: a fake feed with cuts N+1..N+6 where the gateway polls only after N+6 exists → six records, notes for all six; a rail test that publish keeps the manifests the window promises.

Adjacent, observed on the same store (not this ticket unless it is the same cause)

All six are kind: patch under security: apply-automatically (Kind.Automatic() → security mode), yet every one is state: pending with last_attempt_at zero and no update-lane log line across the 02:00–04:00 UTC window. Either patches on testing are meant to wait for approval and the state is mislabelled, or the automatic lane did not fire. Ben will read the Updates screen; filed separately if it is a second defect.

Relates to: #1562, #1579 (the sequence floor), #1675, #1811 (Update now), ADR 0248, DDR for the U-series, scripts/release-rail/publish.sh, internal/matourelease/publish.go, internal/update/update.go.

## Proven (whakatohea-demo gateway `134.199.167.181`, control plane `ff4a5263`, 2026-09-24 04:xx UTC) **What the operator would read.** `/var/lib/idss/update.json` lists six pending `testing` patches — seq 2725, 2726, 2727, 2731, 2732, 2739 — each with 1–7 note lines. Newest `7d3d84fa` (2739) notes: #1807, #1806, three app-report/ADR 0267 lines, one healer line. **What the update actually applies.** The gateway is at `ff4a5263` = seq **2699** (`git rev-list --count`). `7d3d84fa` is cumulative (patch), so approving it lands **40 commits** (`git log ff4a5263..7d3d84fa`) — including the whole Destroy-community feature (#1785–#1792), the IDIP Members-tab redesign (PR #1796), #1778/#1779/#1782 service access, #1799, #1802. **None of those appear in any listed release's notes.** They sit in seq 2700–2724, 26 commits. **Why they are invisible — three facts:** 1. The feed document is ONE release. `GET https://get.idss.nz/channel/testing.json` → `{manifest, signature}`; the decoded manifest is `{revision, sequence: 2739, kind, title, notes, signed_by, published, artifacts}` — no list, no `previous`. `internal/matourelease/publish.go` writes exactly that (`FeedPath` = `channel/<name>.json`) and GCs old revision dirs keeping only the served release and the one before (`publish.go:95-103`). 2. Notes are per-cut deltas. `scripts/release-rail/publish.sh:157` `notes="$(git log --format='- %s' ${base}..${sha})"` with `base="$newest"` (the previous cut). Correct for a feed that lists every cut; wrong for one that shows only the newest. 3. The gateway records only what it sees at a poll. `internal/update/update.go:376-441`: a poll reads the single manifest, and if its sequence is above the channel high-water it appends ONE record and lifts the mark. Polls are ~15 min apart (`last_checked` 04:05:07 → 04:20:07 → 04:35). This gateway's release source came up at **22:19:47Z** (journal: "release source wired"); the first release it could see was 2725, published **22:24Z**. Everything cut before 22:19Z (2700–2724) was never the newest at any of its polls, so it was never recorded — `history` has **zero** superseded entries; nothing was folded, it was simply never seen. The same happens to any two cuts closer together than one poll interval on a busy swarm night. Net: the review sheet (`ReviewUpdateScreen.vue:21`, notes rendered verbatim) and the Updates row show an operator a fraction of what Approve will do to their community. Tonight the fraction was 7 lines for 40 commits. That is the U-series promise ("queued here for your approval, with plain-language release notes", DDR for ADR 0248) broken at the source, and #1562's lane. ## Fix 1. **The feed lists recent cuts, not one.** Either the channel doc carries a signed `releases: [...]` window (say the last 50 manifests, each still individually signed) or each manifest carries `previous: <revision>` and the rail keeps every cut's manifest under its revision dir (today GC keeps two). Either lets a gateway at seq N enumerate every cut in (N, newest]. 2. **The gateway records every cut it has not reached, not just the one it happened to see**, walking the list/chain back to its high-water on each poll. Supersession (`supersede.go`) then folds them exactly as designed and `history` shows what was folded — today the fold has nothing to fold. 3. **The review sheet for a cumulative release shows the union of notes** from `current+1` to the release under review, grouped by cut (title + published time), so "Approve" is read against what it does. The Updates row's one-line summary says "N cuts since your version". 4. **Test at the seam:** a fake feed with cuts N+1..N+6 where the gateway polls only after N+6 exists → six records, notes for all six; a rail test that `publish` keeps the manifests the window promises. ## Adjacent, observed on the same store (not this ticket unless it is the same cause) All six are `kind: patch` under `security: apply-automatically` (`Kind.Automatic()` → security mode), yet every one is `state: pending` with `last_attempt_at` zero and no update-lane log line across the 02:00–04:00 UTC window. Either patches on `testing` are meant to wait for approval and the state is mislabelled, or the automatic lane did not fire. Ben will read the Updates screen; filed separately if it is a second defect. Relates to: #1562, #1579 (the sequence floor), #1675, #1811 (Update now), ADR 0248, DDR for the U-series, `scripts/release-rail/publish.sh`, `internal/matourelease/publish.go`, `internal/update/update.go`.

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

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

Ruled by agent under ADR 0174 — veto anytime.

This ticket embeds a design choice (the feed format) and is a 4-part epic. Two rulings, both two-way doors (revertible by a later commit, proven by tests I ran, not on the one-way list):

1. Feed format = a signed releases: [] window (option 1), backward-compatible. The channel doc keeps its top-level {manifest, signature} as the newest cut (so the operator app's reader app/src/lib/matouChannel.ts and Go's Source.Latest are unchanged — both ignore unknown keys), and gains releases: [...], each element an individually-signed {manifest, signature} pair. The Ed25519 signature covers only the manifest bytes, so each window entry self-verifies and the array itself needs no signature; a reader ranks and floors entries by their SIGNED sequence, never by list order. Why two-way: additive field, no reader breaks, revertible; proven by matouchannel.Recent + matourelease.Publish window tests.

2. Scope this slice = the Go/rail core (fix parts 1, 2, 4); part 3 filed as a follow-up. Done here:

  • matouchannel.SignedFeed.Releases + Source.Recent ([update.ReleaseWindow]) — enumerate every cut, bad top refuses loud, bad older entry skipped.
  • Orchestrator.Poll walks the window oldest-first, applying every existing #1579/#1631/#1674/#1690 rule per cut, recording each unseen cut — so SupersedeStale (#1746) finally has a backlog to fold.
  • matourelease.Publish accumulates the served feed's recent-cuts window (cap 50, dedup by revision).

Deferred to a follow-up ticket: fix part 3 — the review sheet showing the union of notes grouped by cut, and the Updates row's "N cuts since your version" one-liner. That is a P4b-U2 screen change that should run through the design tier (grill-ux → wireframe → DDR → spec) rather than be invented ad hoc without a wireframe. The core enumeration/recording defect (the three named facts) is fixed regardless: a gateway now records every cut it has not reached, each with its own notes.

**Ruled by agent under ADR 0174 — veto anytime.** This ticket embeds a design choice (the feed format) and is a 4-part epic. Two rulings, both two-way doors (revertible by a later commit, proven by tests I ran, not on the one-way list): **1. Feed format = a signed `releases: []` window (option 1), backward-compatible.** The channel doc keeps its top-level `{manifest, signature}` as the newest cut (so the operator app's reader `app/src/lib/matouChannel.ts` and Go's `Source.Latest` are unchanged — both ignore unknown keys), and gains `releases: [...]`, each element an **individually-signed** `{manifest, signature}` pair. The Ed25519 signature covers only the manifest bytes, so each window entry self-verifies and the array itself needs no signature; a reader ranks and floors entries by their SIGNED `sequence`, never by list order. Why two-way: additive field, no reader breaks, revertible; proven by `matouchannel.Recent` + `matourelease.Publish` window tests. **2. Scope this slice = the Go/rail core (fix parts 1, 2, 4); part 3 filed as a follow-up.** Done here: - `matouchannel.SignedFeed.Releases` + `Source.Recent` ([update.ReleaseWindow]) — enumerate every cut, bad top refuses loud, bad older entry skipped. - `Orchestrator.Poll` walks the window oldest-first, applying every existing #1579/#1631/#1674/#1690 rule per cut, recording each unseen cut — so `SupersedeStale` (#1746) finally has a backlog to fold. - `matourelease.Publish` accumulates the served feed's recent-cuts window (cap 50, dedup by revision). **Deferred to a follow-up ticket:** fix part 3 — the review sheet showing the union of notes grouped by cut, and the Updates row's "N cuts since your version" one-liner. That is a P4b-U2 screen change that should run through the design tier (grill-ux → wireframe → DDR → spec) rather than be invented ad hoc without a wireframe. The core enumeration/recording defect (the three named facts) is fixed regardless: a gateway now records every cut it has not reached, each with its own notes.

Part 3 (review-sheet notes union + Updates row summary) is filed as #1817 for the design tier.

Part 3 (review-sheet notes union + Updates row summary) is filed as #1817 for the design tier.

close-report for #1814 — status success

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

envelope
{
  "issue": 1814,
  "status": "success",
  "commits": [
    "6ada9ff2f6d91deeceb51876a1d0d307cac28236"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/matouchannel/matouchannel.go",
    "internal/matouchannel/matouchannel_test.go",
    "internal/matourelease/publish.go",
    "internal/matourelease/publish_window_test.go",
    "internal/update/testing/releasesource.go",
    "internal/update/update.go",
    "internal/update/window_test.go"
  ],
  "tests": [
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/update/... ./internal/matouchannel/... ./internal/matourelease/...",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/update/... ./internal/matouchannel/... ./internal/matourelease/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./internal/matouchannel/... ./internal/matourelease/... ./internal/update/...",
      "exit_code": 0
    },
    {
      "command": "gofmt -l internal/matouchannel internal/matourelease internal/update",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Fix part 1 — the feed lists recent cuts, not one (signed releases[] window)": "matouchannel.SignedFeed.Releases []SignedFeed (matouchannel.go); each entry individually signed, backward-compatible (top manifest unchanged for the operator app reader). Rail write-side accumulates the window: matourelease.Publish -> recentWindow (publish.go), proven by internal/matourelease TestPublish_AccumulatesTheRecentCutsWindow / TestPublish_FirstCutHasSingleEntryWindow",
    "Fix part 2 — the gateway records every cut it has not reached, not just the one it saw": "update.ReleaseWindow + Source.Recent enumerate the window; Orchestrator.Poll walks it oldest-first recording each unseen cut (update.go). Proven by internal/update TestPoll_WindowRecordsEveryUnseenCut (six cuts, one poll -> six records with their own notes) and TestPoll_WindowThenSupersedeFoldsToOneSurvivor (supersede folds five into one history entry). Reader proven by internal/matouchannel TestRecent_* (window/legacy/bad-top-refuses/bad-entry-skipped).",
    "Fix part 4 — test at the seam": "Rail seam: matourelease Publish window tests. Update seam: Poll six-cuts-one-poll + supersede-to-one tests. Reader seam: matouchannel Recent tests. All existing poll/downgrade tests (#1579/#1631/#1674/#1690) still green — the single-cut window reduces to the exact pre-window path.",
    "Fix part 3 — review sheet union of notes grouped by cut + Updates row 'N cuts since your version'": "DEFERRED and filed as follow-up #1817 (a P4b-U2 screen change recommended for the design tier). The core enumeration/recording defect the three named facts describe is fixed regardless: a gateway now records every cut it has not reached, each with its own notes."
  },
  "summary": "The update feed now serves a signed recent-cuts window and a gateway records every cut it has not reached (not just the one it polled on); the review-sheet notes union (part 3) is filed as #1817.",
  "blockers": []
}
**close-report** for #1814 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1814, "status": "success", "commits": [ "6ada9ff2f6d91deeceb51876a1d0d307cac28236" ], "changed_files": [ "STATUS.md", "internal/matouchannel/matouchannel.go", "internal/matouchannel/matouchannel_test.go", "internal/matourelease/publish.go", "internal/matourelease/publish_window_test.go", "internal/update/testing/releasesource.go", "internal/update/update.go", "internal/update/window_test.go" ], "tests": [ { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/update/... ./internal/matouchannel/... ./internal/matourelease/...", "exit_code": 0 }, { "command": "go test ./internal/update/... ./internal/matouchannel/... ./internal/matourelease/...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./internal/matouchannel/... ./internal/matourelease/... ./internal/update/...", "exit_code": 0 }, { "command": "gofmt -l internal/matouchannel internal/matourelease internal/update", "exit_code": 0 } ], "criteria": { "Fix part 1 — the feed lists recent cuts, not one (signed releases[] window)": "matouchannel.SignedFeed.Releases []SignedFeed (matouchannel.go); each entry individually signed, backward-compatible (top manifest unchanged for the operator app reader). Rail write-side accumulates the window: matourelease.Publish -> recentWindow (publish.go), proven by internal/matourelease TestPublish_AccumulatesTheRecentCutsWindow / TestPublish_FirstCutHasSingleEntryWindow", "Fix part 2 — the gateway records every cut it has not reached, not just the one it saw": "update.ReleaseWindow + Source.Recent enumerate the window; Orchestrator.Poll walks it oldest-first recording each unseen cut (update.go). Proven by internal/update TestPoll_WindowRecordsEveryUnseenCut (six cuts, one poll -> six records with their own notes) and TestPoll_WindowThenSupersedeFoldsToOneSurvivor (supersede folds five into one history entry). Reader proven by internal/matouchannel TestRecent_* (window/legacy/bad-top-refuses/bad-entry-skipped).", "Fix part 4 — test at the seam": "Rail seam: matourelease Publish window tests. Update seam: Poll six-cuts-one-poll + supersede-to-one tests. Reader seam: matouchannel Recent tests. All existing poll/downgrade tests (#1579/#1631/#1674/#1690) still green — the single-cut window reduces to the exact pre-window path.", "Fix part 3 — review sheet union of notes grouped by cut + Updates row 'N cuts since your version'": "DEFERRED and filed as follow-up #1817 (a P4b-U2 screen change recommended for the design tier). The core enumeration/recording defect the three named facts describe is fixed regardless: a gateway now records every cut it has not reached, each with its own notes." }, "summary": "The update feed now serves a signed recent-cuts window and a gateway records every cut it has not reached (not just the one it polled on); the review-sheet notes union (part 3) is filed as #1817.", "blockers": [] } ``` </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#1814
No description provided.