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
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#1635
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
Since the whole composition's update store became durable off the state dir (#1633, commit
133b7440), the resumed store uses the persistedpolicy.Channel(OpenStorereturnsdoc.Policy), ignoring the freshly-derived channel thatcomposeWholecomputes from the tuned feed URL (relSrc.Channel(), #1614).A
set-release-channelre-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:matouchannelsource ignores the channel arg and hits the fixed URL), butpolicy.Channel(U1/U1x's displayed channel and the#1579per-channel high-water floor key) stays the old channel until an operator in-appSetChannelor 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
NewStorere-seededpolicy.Channelfrom 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-appSetChannelchoice (memory-only clobbered that every restart), but leaves the CLI-retune path unreconciled.The ruling needed
Whether a resumed durable store should reconcile
policy.Channelagainst the render-input feed URL at boot — and if so, how that interacts with the operator's in-app pin-or-forkSetChannelchoice (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.
Triage:
bug+ready-for-humanVerified against the code (all paths in the report confirmed read-only):
OpenStore(internal/update/store.go:285): on resume it builds the store fromdoc.Policyverbatim (store.go:301-302) and discards the seedpolicyargument entirely. So the freshly-derived channelcomposeWholecomputes from the tuned feed URL (whole_composition.go:589-594viarelSrc.Channel()→matouchannel.go:132) never reaches the resumed store. Confirmed: the bug is exactly as filed.#1579downgrade floor is keyed per channel (store.go:87highWater map[Channel]int64) and Poll reads it byo.store.policy.Channel(update.go:343-344). A stale resumedpolicy.Channeltherefore consults the old channel's floor and leaves the new channel's floor unseeded — the security-adjacent edge.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.SetChannel(internal/update/policy.go:56, routecontrolapi/updates.go:83) mutates in-memory policy only — nosave()— 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-appSetChannelpin. 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#1579downgrade 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.Channelagainst the render-input feed URL (relSrc.Channel()) at boot? The tension:set-release-channelre-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-appSetChannelpin/fork choice (policy.go:56) that #1633 was written to preserve.SetChannelor a completed rollout overwrites it, and the floor is checked against the wrong channel.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:33and 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
#1579per-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-appSetChannelchoice. Ben owns the #1569/#1562 channel-promotion sequence semantics this depends on.SetPolicy/SetChannelnever persist, the 204 is answered first, and a control-plane restart inside the gap restores the old policy #1975