operator app: the pinned feed carries no app artifact, the reader can't parse the fleet feed shape, and apply never installs — finish the self-update loop (#2166 split) #2167
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
1 participant
Notifications
Due date
No due date set.
Depends on
Reference
Matou/idss#2167
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?
Context (split from #2166)
#2166 pinned the operator app's update channel into the packaged build (
app/src-electron/releaseChannel.ts): an installed.deblaunched with noIDSS_RELEASE_*env now resolves the real signed-Matou source (the get.idss.nztestingfeed + the pinned public key the fleet rail signs) instead of silently refusing every update (GOTCHAS #410). But pinning only makes the app check the feed. Three legs remain before the update strip can actually light and an operator can apply:What remains
The feed carries no operator-app artifact. The rail (
scripts/release-rail/,cmd/release-cut) publishescontrol-plane/control-panel/agent/idss-idproles intochannel/testing.json; it never publishes the operator-app.deb. The rail must publish the app.deb(per platform) as a feed artifact.The app's feed reader cannot parse the fleet feed shape.
app/src/lib/matouChannel.tsReleaseManifestexpects a single top-levelartifact: {url, sha256}, but the fleet feed (internal/matouchannel.ReleaseManifest) carries a role-keyedartifactsmap. SoloadFeed()returnsnullon the real feed andcheck()reports no update even when one exists. The reader must learn the role-keyed shape and select the operator-app role for the running platform.The app-side install+restart leg is unwired.
MatouChannelClient.applyonly STAGES the verified bytes under<stateDir>/updates/<version>/; nothing installs a staged.deband relaunches (AC2 of #2166: "Apply verifies the signature against the pinned key, installs, and restarts onto the newer release"). The Electron shell needs the on-launch (or on-apply) installer that applies the staged artifact and relaunches, with a bad signature refused (never installed).Acceptance
.deb(per platform) as a feed artifact on thetestingchannel.matouChannel.tsreads the role-keyed fleet manifest and picks the operator-app role for the platform; a feed that carries no app role is an honest "no update" (ADR 0100), not a crash..deband relaunches onto it; a bad signature or digest mismatch is refused, not installed (ADR 0098)..debbuilt from main offers and applies a newer release from the testing feed.Found while working #2166.
Ruled by agent under ADR 0174 — veto anytime.
Ruling:
enhancement+ready-for-session.Why this is a two-way door: the whole ticket is additive code and
config — a role-keyed branch in
matouChannel.ts's feed reader, aninstall+relaunch leg in the Electron shell, and a new per-platform artifact in
the release rail. Every leg is revertible by a later commit, and none is on the
one-way-door list: the signing uses the testing channel's pinned key the
fleet rail already cuts with (not the production release key — that's #2088), so
no non-routine spend, no security-posture widening, no member-facing trust
accept, no data destruction.
Why
ready-for-sessionand notready-for-agent: the swarm queue readsonly
ready-for-agent, and a swarm worker must not take this. Two of its legsneed an interactive session's live standing:
scripts/release-rail/,cmd/release-cut) to publish the operator-app.debonto the livetestingfeed — a live-infrastructure operation, not a push a worker proves in-sandbox.
.debbuilt from main offersand applies a newer release from the testing feed") — cut a release, build and
install an installer, watch it self-update. No swarm worker can produce or
prove that. This is the same standing the parent #2166 needed, which is
itself
ready-for-session.What proves the ruling: legs 2 and 3 are red→green unit-testable in-repo
(
matouChannel.tsfeed-reader parse + the Electron apply/refuse path); thewhole loop is proved by the AC4 live drive. Relabelling is the entire cost of a
veto.
Session brief
Blocked by #2166 (dependency wired) — #2166 pins the update channel into the
packaged build (
app/src-electron/releaseChannel.ts, which does not exist onmainyet because #2166 is unbuilt). Do #2166 first, or land them together.Verified against the tree (2026-11-04):
app/src/lib/matouChannel.ts:50declares a singletop-level
artifact: {url, sha256, …}onReleaseManifest, while the fleetfeed's
internal/matouchannel/matouchannel.gocarries a role-keyedartifactsmap.loadFeed()therefore returnsnullon the real feed andcheck()reports no update. The reader must learn the role-keyed shape andpick the operator-app role for the running platform; a feed with no app role
is an honest "no update" (ADR 0100), never a crash.
MatouChannelClient.apply(matouChannel.ts:229) only stages theverified bytes under
<stateDir>/updates/<version>/; nothing installs thestaged
.deband relaunches. Wire the on-launch/on-apply installer thatapplies the staged, signature-verified artifact and relaunches, refusing a bad
signature or digest mismatch (never installing it) — ADR 0098.
scripts/release-rail/+cmd/release-cutpublishcontrol-plane/control-panel/agent/idss-idproles intochannel/testing.jsonand never the operator-app.deb. Add the per-platformoperator-app artifact.
Acceptance — as filed in the issue body (the four checkboxes stand). AC1–AC3
are unit/seam-provable in-repo; AC4 is the live install+self-update drive this
session must run.
Scope note: macOS/Windows per-platform installers are their own ticket
(#2083). This ticket's
.debleg is the Linux operator-app artifact and thecross-cutting reader/apply wiring.
Not an app report (no
origin: app-reportmarker on this ticket or on #2166);lands by push, like its parent.
Ruled by agent under ADR 0174 — veto anytime. Landed the two provable, two-way legs on
main(32c8ca22, push mode); relabellingready-for-humanfor the residue, which is one-way / design.What landed (two-way, proven)
AC2 — the reader learns the fleet feed shape.
app/src/lib/matouChannel.tsparsed a single top-levelartifact; the real feed (get.idss.nz/channel/testing.json) carries a role-keyedartifactsmap (internal/matouchannel.ReleaseManifest, ADR 0248), soloadFeed()returned null on it andcheck()reported no update even when one existed — exactly the "pin checks but shows nothing" gap #2166 left. The reader now reads the fleet manifest shape and selects its own per-platform roleapp-<platform>-<arch>(operatorAppRole, fromprocess.platform/process.arch, resolved once at the entry intoChannelConfig.appRole). The sharedYYYY.MM.Nnumber (DDR 0290 — the app is packaged under the same one viarelease-number.mjs, soapp.getVersion()is directly comparable) orders releases;kind === 'security'raises the strip as advice (ADR 0015); a feed with no app role for this platform is an honest no-update (ADR 0100), never a crash. Bad signature / digest mismatch / wrong key still never stage — the ladder gate is unchanged (proven green).AC1 (cut side) — the cutter can carry the app build.
release-cut --app <os-arch>=<path>(repeatable, optional) carries the per-platform operator-app build as roleapp-<os-arch>at its immutable versioned URL (channel/<name>/<rev>/app-<os-arch>) — the cut-side contract the reader selects against. Malformed--appis refused before anything is cut.Proof:
app/tests/unit/matouChannel.test.tsrewritten onto the real role-keyed signed fixture (12 tests — platform selection over a siblingcontrol-planerole, no-app-role and different-platform → no-update, security advice, tamper/digest/wrong-key never staged);cmd/release-cut/main_test.goTestCut_AppRolePerPlatform. app update-path suites (50) +vue-tsc+eslintgreen;go test ./cmd/release-cut/+go vet+gofmtclean. Commit32c8ca22.Why human (the one-way / design residue)
Three legs need a one-way door or a design ruling and so cannot land as a two-way agent change:
scripts/release-rail/). No CI can build/package the Electron.deb: the Forgejo runner cannot execute the packaged Electron (the glibc wall, GOTCHAS #377), no workflow runselectron-builder/package-app, and installing on a real machine is alreadyready-for-humanas #471. Which runner packages the operator-app.debinto each cut, and how is a design + infra call. The cut-side contract is ready (--app <os-arch>=<path>→ roleapp-<os-arch>, matching the reader'soperatorAppRole); the rail wiring is the remaining half..debneeds root — a security-posture widening (pkexec/privilegeddpkg), which is a one-way door under ADR 0174 rule 2, and there is no designed update-install mechanism yet (PACKAGING.md: "the update feed [is] later work"; the current "restart" is only a rendererlocation.reload()). The whole install+relaunch mechanism (privilege model + relaunch) wants a design ruling before it is built. (Note: "a bad signature/digest is refused, not installed" is already guaranteed — a bad artifact never reachesdownloaded, so apply never runs on it; proven by the never-staged tests.)testingchannel signing seed (a publish-workflow org secret, not on this host) and a real machine to build + install the.deb; it would publish to the feed Whakatōhea Demo pins — non-routine, member-affecting spend.Overlap with #2169
#2169 (ACs 1–2, split from #2166) is covered by this work on the reader (AC2) and the cut side of AC1; its residue is the same AC1 rail-build leg as above.
Ruled by agent under ADR 0174 — veto anytime. (matou-workstation standing session)
This session was launched on #2167 from a
ready-for-sessionsnapshot, but on re-checkingorigin/main+ ticket state at commit time I found it had already been landed concurrently —32c8ca22(elitebook-03) covers exactly the two provable legs (the role-keyed reader + per-platform selection inmatouChannel.ts/channel.ts, and the cutter--app <os-arch>=<path>→ roleapp-<os-arch>), and the ticket is already routedready-for-humanfor the residue (comment above, 21:50). I had built the same two legs independently; per the concurrent-session discipline I discarded my full duplicate and did not clobber the landed work.The one thing the landing left behind: the GOTCHAS #410 NOTE was stale — it still called the reader a single-
artifactmanifest and pointed the publish half at #2169, both now false. I pushed a docs-only follow-up correcting it to the landed naming and the real residue:21c67ff7— GOTCHAS #410: correct the NOTE to the shape fix #2167 landed (docs-only, two-way).Routing unchanged: I have left the ticket
ready-for-humanexactly as32c8ca22set it. The residue stands as routed there — the rail.debbuild+publish (pnpm package, glibc wall), the Electron install+relaunch (root = security-posture widening, no install/relaunch mechanism designed yet), and the live end-to-end leg (needs the testing signing seed + a real machine). No label change, not closing.