updates: a maintenance window stored as HHMM ("1100") fails parseHM and Window.Contains then returns TRUE — the window silently becomes "any time" and an automatic patch self-applies outside it (whakatohea-demo, 19:22Z vs 11:00–13:00) #1850
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#1850
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
whakatohea-demo, 2026-09-24 19:22Z: policy
security: apply-automatically, windowstart "1100"/end "1300"(gateway clock UTC). The control plane polled at 19:21:58Z, found thetestingcutc85d2bb3(patch, seq 2849) and rolled it out at once — artifacts landed 19:22:03Z, self-swap 19:22:43Z — six hours outside the window. The journal has no "waiting for window" line.Cause (read on main
41f07291)internal/update/rollout.goWindow.Contains→parseHMparses"%d:%d"— it accepts onlyHH:MM. On a parse failureContainsreturns true: an unparsable window is treated as "no restriction", the same as an empty one.internal/controlapi/updates.go:81SetPolicy(…, body.Window)stores whatever the request carried — no validation, no normalisation. The demo's store holds"1100"/"1300"(HHMM, no colon), so the operator's window silently became "any time".HH:MM(update.Window{Start: "02:00", End: "04:00"}in the seam tests, the U2 "queued for the window" copy). The value reached the store either through the U5 policy form (P4b,Edit policy→ Save) or a hand edit — the fix must check what the form emits for a typed1100and pin it.Why it matters
The window is the one promise the U2/U5 screens make about WHEN an unattended restart can happen (story 28, ADR 0259: "auto updates restart unattended in the window"). A malformed window turns that into "whenever the next poll runs" — including in the middle of a demo — and nothing on the surface says so.
Fix (two-way door)
parseHMfailure must NOT open the window:Containson a malformed non-empty window returns false (closed until fixed), and the surface carries a standing "your maintenance window is not a valid time — updates are held" fact (ADR 0100: fail loud, never a silent all-clear).SetPolicy(API) validates both ends asHH:MM(accept and normaliseHHMM/H:MMif the form can produce them) and answers 400 with a field error otherwise; the U5 form usestype="time"or validates before Save."1100"→ 400 on the API; a store already holding"1100"→ rolloutWaitingForWindow+ the standing fact;"11:00"→ in-window at 11:30, out at 13:30.Related: #1811 (Update now is the sanctioned window bypass), ADR 0259, DDR 0250,
internal/update/rollout.go,internal/controlapi/updates.go, P4b-U5.How
"1100"got into the store — the full chain, read on main41f07291:dashboard/src/components/provisioning/UpdatePolicyScreen.vue:85-97— the two window inputs are plain free-text<input v-model="draft.windowStart" class="oc-input oc-input--time">, notype="time", no pattern, no validation before Save.dashboard/src/lib/localtime.ts:129localClockToUtc(localClock)—parseHMfails on"1100"and the function returns the raw string unchanged (if (Number.isNaN(m)) return localClock;), so a typed1100is neither converted from the operator's zone nor rejected.internal/controlapi/updates.go:81—SetPolicy(…, body.Window)stores it verbatim.internal/update/rollout.go:813parseHM("%d:%d")fails →Window.Containsreturns true → the window is "any time".So an operator who types
1100(a natural way to write 11:00) silently disables their maintenance window, and the read view then echoes1100–1300 NZST · dailyback as if it were honoured. Fix points: the form validates/normalises toHH:MMbefore Save (or usestype="time"), the API refuses anything else with a field error, andContainsfails CLOSED on a malformed non-empty window with a standing surface fact.swarm-claim host=elitebook-distributed-server-03 run=32053
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1850 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
SetPolicy/SetChannelnever persist, the 204 is answered first, and a control-plane restart inside the gap restores the old policy #1975