updates: a durable store resumes the persisted release channel, so a set-release-channel re-tune's new channel isn't reconciled until an operator SetChannel or rollout #1635

Open
opened 2026-09-19 15:25:28 +00:00 by matou-build-agent · 1 comment

Symptom

Since the whole composition's update store became durable off the state dir (#1633, commit 133b7440), the resumed store uses the persisted policy.Channel (OpenStore returns doc.Policy), ignoring the freshly-derived channel that composeWhole computes from the tuned feed URL (relSrc.Channel(), #1614).

A set-release-channel re-tune (#1569) changes the render-input feed URL (IDSS_RELEASE_FEED_URL) and restarts the control plane, but does not touch the running orchestrator. So after a cross-channel re-tune + restart:

  • the feed actually fetched is the new one (the production matouchannel source ignores the channel arg and hits the fixed URL), but
  • policy.Channel (U1/U1x's displayed channel and the #1579 per-channel high-water floor key) stays the old channel until an operator in-app SetChannel or a completed rollout overwrites it.

The high-water floor is keyed per channel, so a stale channel key means a newly-fetched release is checked against the wrong channel's downgrade floor — a security-adjacent edge.

Why this wasn't a problem before

The memory-only NewStore re-seeded policy.Channel from the derived channel on every boot, so a CLI re-tune took effect on the next restart. The durable store (correctly) resumes the persisted policy instead — which is more correct for the operator's own in-app SetChannel choice (memory-only clobbered that every restart), but leaves the CLI-retune path unreconciled.

The ruling needed

Whether a resumed durable store should reconcile policy.Channel against the render-input feed URL at boot — and if so, how that interacts with the operator's in-app pin-or-fork SetChannel choice (which must NOT be clobbered) and with cross-channel sequence semantics. This is #1569 / #1562 (channel promotion) territory and Ben-owned, so it is filed rather than guessed at under ADR 0174.

Scope note: same-channel restart (founding, self-swap resume, quarantine budget) is unaffected and correct — this is only the cross-channel CLI re-tune + restart path.

Filed by the session-runner working #1633.

## Symptom Since the whole composition's update store became durable off the state dir (#1633, commit `133b7440`), the resumed store uses the **persisted** `policy.Channel` (`OpenStore` returns `doc.Policy`), ignoring the freshly-derived channel that `composeWhole` computes from the tuned feed URL (`relSrc.Channel()`, #1614). A `set-release-channel` re-tune (#1569) changes the render-input feed URL (`IDSS_RELEASE_FEED_URL`) and restarts the control plane, but does **not** touch the running orchestrator. So after a cross-channel re-tune + restart: - the feed actually fetched is the new one (the production `matouchannel` source ignores the channel arg and hits the fixed URL), but - `policy.Channel` (U1/U1x's displayed channel **and** the `#1579` per-channel high-water floor key) stays the **old** channel until an operator in-app `SetChannel` or a completed rollout overwrites it. The high-water floor is keyed per channel, so a stale channel key means a newly-fetched release is checked against the wrong channel's downgrade floor — a security-adjacent edge. ## Why this wasn't a problem before The memory-only `NewStore` re-seeded `policy.Channel` from the derived channel on **every** boot, so a CLI re-tune took effect on the next restart. The durable store (correctly) resumes the persisted policy instead — which is *more* correct for the operator's own in-app `SetChannel` choice (memory-only clobbered that every restart), but leaves the CLI-retune path unreconciled. ## The ruling needed Whether a resumed durable store should reconcile `policy.Channel` against the render-input feed URL at boot — and if so, how that interacts with the operator's in-app pin-or-fork `SetChannel` choice (which must NOT be clobbered) and with cross-channel sequence semantics. This is #1569 / #1562 (channel promotion) territory and Ben-owned, so it is filed rather than guessed at under ADR 0174. Scope note: same-channel restart (founding, self-swap resume, quarantine budget) is unaffected and correct — this is only the cross-channel CLI re-tune + restart path. Filed by the session-runner working #1633.
Owner

This was generated by AI during triage.

Triage: bug + ready-for-human

Verified against the code (all paths in the report confirmed read-only):

  • OpenStore (internal/update/store.go:285): on resume it builds the store from doc.Policy verbatim (store.go:301-302) and discards the seed policy argument entirely. So the freshly-derived channel composeWhole computes from the tuned feed URL (whole_composition.go:589-594 via relSrc.Channel() → matouchannel.go:132) never reaches the resumed store. Confirmed: the bug is exactly as filed.
  • The #1579 downgrade floor is keyed per channel (store.go:87 highWater map[Channel]int64) and Poll reads it by o.store.policy.Channel (update.go:343-344). A stale resumed policy.Channel therefore consults the old channel's floor and leaves the new channel's floor unseeded — the security-adjacent edge.
  • The old memory-only NewStore (store.go:119) also didn't re-seed the channel, but it was re-seeded from the derived channel on every boot at the composition layer; the durable resume path now wins over that seed.
  • Operator in-app SetChannel (internal/update/policy.go:56, route controlapi/updates.go:83) mutates in-memory policy only — no save() — so it is a separate concern the fix must not clobber.

Why this is not a two-way-door agent ruling (ADR 0174): the fix is revertible, but it is not provable by an existing test/drive/probe — prong (b) fails. The closest test, control-plane/cmd/control-plane/update_store_restart_test.go:33 (TestOpenUpdateStore_ResumesPriorDocumentAcrossRestart), asserts the opposite: it locks in "persisted channel wins over the seed" (line 54), which is the behaviour #1633 deliberately introduced to preserve the operator's durable in-app SetChannel pin. There is no test that would pass only if the store reconciled the channel from the derived feed-URL; the desired cross-channel sequence semantics don't exist yet and must be decided first. Because that decision also governs how the #1579 downgrade floor is keyed across a channel change, a wrong choice silently loosens a security mechanism.

The decision (for Ben)

Should a resumed durable store reconcile policy.Channel against the render-input feed URL (relSrc.Channel()) at boot? The tension:

  1. Reconcile at boot — the CLI set-release-channel re-tune (#1569) takes effect on the next restart, and the downgrade floor is keyed to the channel actually being fetched. Risk: clobbers the operator's in-app SetChannel pin/fork choice (policy.go:56) that #1633 was written to preserve.
  2. Never reconcile (current) — the operator's in-app choice is durable, but a cross-channel CLI re-tune + restart is unreconciled until an in-app SetChannel or a completed rollout overwrites it, and the floor is checked against the wrong channel.
  3. Reconcile only absent an operator in-app pin — plausible default, but the cross-channel sequence semantics (#1569/#1562: does a channel change reset or carry the high-water floor?) are undecided, and getting them wrong is a downgrade-floor security regression.

The filer did not propose a default ruling and flagged this as #1569/#1562 (channel promotion) territory. Once the semantics are ruled, encoding them is straightforward: rewrite/extend update_store_restart_test.go:33 and add a cross-channel re-tune-across-boot test asserting the chosen floor behaviour.

Why human

A one-way-door design ruling on a security-adjacent mechanism: the choice governs how the #1579 per-channel downgrade floor is keyed across a channel change, so a wrong reconciliation silently loosens downgrade protection (a security-posture question, not provable by any existing test/drive), and it must resolve the deliberate #1633 tension of not clobbering the operator's durable in-app SetChannel choice. Ben owns the #1569/#1562 channel-promotion sequence semantics this depends on.

> *This was generated by AI during triage.* ## Triage: `bug` + `ready-for-human` **Verified against the code** (all paths in the report confirmed read-only): - `OpenStore` (`internal/update/store.go:285`): on **resume** it builds the store from `doc.Policy` verbatim (`store.go:301-302`) and **discards the seed `policy` argument entirely**. So the freshly-derived channel `composeWhole` computes from the tuned feed URL (`whole_composition.go:589-594` via `relSrc.Channel()` → `matouchannel.go:132`) never reaches the resumed store. Confirmed: the bug is exactly as filed. - The `#1579` downgrade floor is keyed per channel (`store.go:87` `highWater map[Channel]int64`) and Poll reads it by `o.store.policy.Channel` (`update.go:343-344`). A stale resumed `policy.Channel` therefore consults the **old** channel's floor and leaves the new channel's floor unseeded — the security-adjacent edge. - The old memory-only `NewStore` (`store.go:119`) also didn't re-seed the channel, but it was re-seeded from the derived channel on every boot at the composition layer; the durable resume path now wins over that seed. - Operator in-app `SetChannel` (`internal/update/policy.go:56`, route `controlapi/updates.go:83`) mutates in-memory policy only — no `save()` — so it is a separate concern the fix must not clobber. **Why this is not a two-way-door agent ruling (ADR 0174):** the fix is revertible, but it is **not provable by an existing test/drive/probe** — prong (b) fails. The closest test, `control-plane/cmd/control-plane/update_store_restart_test.go:33` (`TestOpenUpdateStore_ResumesPriorDocumentAcrossRestart`), asserts the **opposite**: it locks in "persisted channel wins over the seed" (line 54), which is the behaviour #1633 *deliberately* introduced to preserve the operator's durable in-app `SetChannel` pin. There is no test that would pass only if the store reconciled the channel from the derived feed-URL; the desired cross-channel sequence semantics don't exist yet and must be decided first. Because that decision also governs how the `#1579` downgrade floor is keyed across a channel change, a wrong choice silently loosens a security mechanism. ## The decision (for Ben) Should a resumed durable store reconcile `policy.Channel` against the render-input feed URL (`relSrc.Channel()`) at boot? The tension: 1. **Reconcile at boot** — the CLI `set-release-channel` re-tune (#1569) takes effect on the next restart, and the downgrade floor is keyed to the channel actually being fetched. **Risk:** clobbers the operator's in-app `SetChannel` pin/fork choice (`policy.go:56`) that #1633 was written to preserve. 2. **Never reconcile (current)** — the operator's in-app choice is durable, but a cross-channel CLI re-tune + restart is unreconciled until an in-app `SetChannel` or a completed rollout overwrites it, and the floor is checked against the wrong channel. 3. **Reconcile only absent an operator in-app pin** — plausible default, but the cross-channel sequence semantics (#1569/#1562: does a channel change reset or carry the high-water floor?) are undecided, and getting them wrong is a downgrade-floor security regression. The filer did not propose a default ruling and flagged this as #1569/#1562 (channel promotion) territory. Once the semantics are ruled, encoding them is straightforward: rewrite/extend `update_store_restart_test.go:33` and add a cross-channel re-tune-across-boot test asserting the chosen floor behaviour. ## Why human A **one-way-door design ruling on a security-adjacent mechanism**: the choice governs how the `#1579` per-channel downgrade floor is keyed across a channel change, so a wrong reconciliation silently loosens downgrade protection (a security-posture question, not provable by any existing test/drive), and it must resolve the deliberate #1633 tension of not clobbering the operator's durable in-app `SetChannel` choice. Ben owns the #1569/#1562 channel-promotion sequence semantics this depends on.
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#1635
No description provided.