updates: the first stable promote cannot work — it drops idss-idp, reports success on a 409 while the production-signed feed never publishes, and nothing can serve stable (fix + prove publish.sh promote before the production key is minted) #1971

Closed
opened 2026-09-28 19:08:40 +00:00 by ben · 3 comments
Owner

Parent: #1562 — contract: ADR 0248 (decision 3 + amendments), ADR 0185, ADR 0068; rail built under #1578

What's true today (read on main @ be126a6b, 2026-09-28)

The testing lane is live and proven. The stable half of the rail — scripts/release-rail/publish.sh promote <revision> — has never been run, has no test (scripts/tests/release-rail-test.sh never names it), and cannot work as written. #1562's last step is Ben minting the production release key and running the first stable promote; the first run must not be the one that finds these.

  1. A promoted release drops the sign-in bridge. promote() downloads art-control-plane, art-control-panel and art-agent and never art-idss-idp, and calls release-cut without --idss-idp. publish() has carried the bridge since #1689. A stable release would have three artifacts where its testing source has four, so an IDIP community on stable runs its founding-day bridge forever — #1689 again, one channel over.
  2. The promote reports success while publishing nothing. promote() ends with publish_tree "$tree" "$rev" "stable", which uploads feed.json and the art-* files to registry version $rev of idss-fleet-release — the version the testing cut of that revision already holds. Forgejo answers 409 for every file; put() logs already present … (409) — idempotent and returns 0. The registry keeps the testing feed, the script logs promoted … onto stable. For the artifacts the 409 is harmless (same bytes). For the feed it is a false green: the production-signed manifest never leaves the machine.
  3. Nothing can serve stable. pull.sh follows ONE channel (RELEASE_CHANNEL, default testing) with ONE pinned key, and published_versions takes the newest version of the package whatever channel cut it. There is no way for a second pull instance to find "the newest stable release", and the unit files + README describe a single instance. https://get.idss.nz/channel/stable.json is 404 today (correct), and would stay 404 after a promote.

What to build

  • Promote carries every role its source carries. Read the roles from the published testing feed of <revision> (the way _download_verify_install does), verify that feed's signature and every artifact digest against the testing public key BEFORE re-signing — promote must never put the production signature on bytes it has not verified — and pass each role through to release-cut --channel stable --promote. A role the source carries and promote cannot fetch is a refusal, not a smaller release.
  • stable gets its own home in the registry. Proposed default (two-way door, ADR 0174 — the worker may rule otherwise and say so): a second generic package, idss-fleet-release-stable, one immutable version per promoted revision. testing versions stay untouched; published_versions works per package unchanged.
  • A 409 is idempotent only when the bytes match. On 409, put() compares the remote file's sha256 with the local one: equal = idempotent, different = fail loudly, non-zero exit. No path may log promoted unless the registry holds the production-signed feed; promote reads it back and verifies it against the production public key before it says so.
  • The pull half runs per channel. pull.sh takes its channel, package, public key and pin file from its environment so a second instance can follow stable beside the testing one without sharing state (RELEASE_PIN is per channel). Stage an instanced unit (or a second unit pair) + env-file template and the README install steps for the stable instance. The install on the droplet stays Ben's — see below.
  • Sequence. stable's signed sequence must advance per channel (#1579's high-water mark). Keep git rev-list --count <rev>; refuse a promote whose sequence does not advance the served stable feed's.
  • Docs in the same commit: scripts/release-rail/README.md (promote ritual + stable pull install), ADR 0248 amendment for the registry home, architecture 11's rail diagram, a GOTCHAS entry for the 409-as-success trap, STATUS.md.

Out of scope

  • Minting the production key, running the real promote, installing the stable pull instance on the droplet — Ben's hands, tracked on #1562.
  • Which communities follow stable, and moving a testing community onto it — a later ruling (ADR 0248 decision 3, 2026-09-18).

Acceptance

Offline, scripted against a local fake registry (the way scripts/tests/bootstrap-reseed-test.sh and release-rail-test.sh prove the rest of the rail), signing with throwaway keys generated in the test — never the committed TEST key as the "production" key:

  • Given a published testing revision carrying four artifacts, When promote <rev> runs with a throwaway production seed, Then the stable feed names the same four roles with the same sha256 digests, and verifies against the throwaway production public key
  • Given that promote, Then the registry's testing version of <rev> is byte-identical to before — feed and artifacts
  • Given a registry that answers 409 with DIFFERENT bytes for any file, Then promote exits non-zero and never logs a success line
  • Given a testing feed whose signature or any artifact digest does not verify, Then promote refuses before signing anything
  • Given a testing revision whose idss-idp artifact cannot be fetched, Then promote refuses; it never cuts a three-artifact release from a four-artifact source
  • Given a promote whose sequence does not advance the served stable feed's, Then it refuses
  • Given two pull instances (testing, stable) over one artifacts dir, When a newer testing release is published, Then only channel/testing.json advances; When a promote lands, Then only channel/stable.json advances, verified against the stable key; a stable feed signed by the testing key is refused and the previous release stays served
  • The existing 36 release-rail-test.sh checks stay green; publish (the testing path) is unchanged in behaviour

Notes

  • docs/GOTCHAS.md first — #221/#251 (wrong-200 fall-through), #123 (publish jobs starved by cancelled runs), #255 (download caps).
  • The workflow must keep refusing --channel stable (release-cut guard); nothing here gives a runner a path to stable.
  • Found by reading the code while checking what #1562 still needs (session, 2026-09-28); promote was not executed.
## Parent: #1562 — contract: ADR 0248 (decision 3 + amendments), ADR 0185, ADR 0068; rail built under #1578 ## What's true today (read on `main` @ `be126a6b`, 2026-09-28) The `testing` lane is live and proven. The `stable` half of the rail — `scripts/release-rail/publish.sh promote <revision>` — has **never been run**, has no test (`scripts/tests/release-rail-test.sh` never names it), and cannot work as written. #1562's last step is Ben minting the production release key and running the first `stable` promote; the first run must not be the one that finds these. 1. **A promoted release drops the sign-in bridge.** `promote()` downloads `art-control-plane`, `art-control-panel` and `art-agent` and never `art-idss-idp`, and calls `release-cut` without `--idss-idp`. `publish()` has carried the bridge since #1689. A `stable` release would have three artifacts where its `testing` source has four, so an IDIP community on `stable` runs its founding-day bridge forever — #1689 again, one channel over. 2. **The promote reports success while publishing nothing.** `promote()` ends with `publish_tree "$tree" "$rev" "stable"`, which uploads `feed.json` and the `art-*` files to registry version `$rev` of `idss-fleet-release` — the version the `testing` cut of that revision already holds. Forgejo answers 409 for every file; `put()` logs `already present … (409) — idempotent` and returns 0. The registry keeps the `testing` feed, the script logs `promoted … onto stable`. For the artifacts the 409 is harmless (same bytes). For the feed it is a false green: the production-signed manifest never leaves the machine. 3. **Nothing can serve `stable`.** `pull.sh` follows ONE channel (`RELEASE_CHANNEL`, default `testing`) with ONE pinned key, and `published_versions` takes the newest version of the package whatever channel cut it. There is no way for a second pull instance to find "the newest `stable` release", and the unit files + README describe a single instance. `https://get.idss.nz/channel/stable.json` is 404 today (correct), and would stay 404 after a promote. ## What to build - **Promote carries every role its source carries.** Read the roles from the published `testing` feed of `<revision>` (the way `_download_verify_install` does), verify that feed's signature and every artifact digest against the `testing` public key BEFORE re-signing — promote must never put the production signature on bytes it has not verified — and pass each role through to `release-cut --channel stable --promote`. A role the source carries and promote cannot fetch is a refusal, not a smaller release. - **`stable` gets its own home in the registry.** Proposed default (two-way door, ADR 0174 — the worker may rule otherwise and say so): a second generic package, `idss-fleet-release-stable`, one immutable version per promoted revision. `testing` versions stay untouched; `published_versions` works per package unchanged. - **A 409 is idempotent only when the bytes match.** On 409, `put()` compares the remote file's sha256 with the local one: equal = idempotent, different = fail loudly, non-zero exit. No path may log `promoted` unless the registry holds the production-signed feed; promote reads it back and verifies it against the production public key before it says so. - **The pull half runs per channel.** `pull.sh` takes its channel, package, public key and pin file from its environment so a second instance can follow `stable` beside the `testing` one without sharing state (`RELEASE_PIN` is per channel). Stage an instanced unit (or a second unit pair) + env-file template and the README install steps for the `stable` instance. The install on the droplet stays Ben's — see below. - **Sequence.** `stable`'s signed sequence must advance per channel (#1579's high-water mark). Keep `git rev-list --count <rev>`; refuse a promote whose sequence does not advance the served `stable` feed's. - **Docs in the same commit:** `scripts/release-rail/README.md` (promote ritual + stable pull install), ADR 0248 amendment for the registry home, architecture 11's rail diagram, a GOTCHAS entry for the 409-as-success trap, STATUS.md. ## Out of scope - Minting the production key, running the real promote, installing the `stable` pull instance on the droplet — Ben's hands, tracked on #1562. - Which communities follow `stable`, and moving a `testing` community onto it — a later ruling (ADR 0248 decision 3, 2026-09-18). ## Acceptance Offline, scripted against a local fake registry (the way `scripts/tests/bootstrap-reseed-test.sh` and `release-rail-test.sh` prove the rest of the rail), signing with throwaway keys generated in the test — never the committed TEST key as the "production" key: - [ ] Given a published `testing` revision carrying four artifacts, When `promote <rev>` runs with a throwaway production seed, Then the `stable` feed names the same four roles with the same sha256 digests, and verifies against the throwaway production public key - [ ] Given that promote, Then the registry's `testing` version of `<rev>` is byte-identical to before — feed and artifacts - [ ] Given a registry that answers 409 with DIFFERENT bytes for any file, Then promote exits non-zero and never logs a success line - [ ] Given a `testing` feed whose signature or any artifact digest does not verify, Then promote refuses before signing anything - [ ] Given a `testing` revision whose `idss-idp` artifact cannot be fetched, Then promote refuses; it never cuts a three-artifact release from a four-artifact source - [ ] Given a promote whose sequence does not advance the served `stable` feed's, Then it refuses - [ ] Given two pull instances (`testing`, `stable`) over one artifacts dir, When a newer `testing` release is published, Then only `channel/testing.json` advances; When a promote lands, Then only `channel/stable.json` advances, verified against the `stable` key; a `stable` feed signed by the `testing` key is refused and the previous release stays served - [ ] The existing 36 `release-rail-test.sh` checks stay green; `publish` (the `testing` path) is unchanged in behaviour ## Notes - `docs/GOTCHAS.md` first — #221/#251 (wrong-200 fall-through), #123 (publish jobs starved by cancelled runs), #255 (download caps). - The workflow must keep refusing `--channel stable` (`release-cut` guard); nothing here gives a runner a path to `stable`. - Found by reading the code while checking what #1562 still needs (session, 2026-09-28); `promote` was not executed.

swarm-claim host=bens-mac-04 run=35217
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=35217 (automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=35217
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=35217 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1971 — status success

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

envelope
{
  "issue": 1971,
  "status": "success",
  "commits": [
    "2596b1b30b757c63dc9a70097751b5cc2da8376c"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/GOTCHAS.md",
    "docs/adr/0248-design-fleet-auto-update-lands-a-signed-release-on-a-running-community.md",
    "docs/architecture/11-update-supply-chain.md",
    "scripts/release-rail/README.md",
    "scripts/release-rail/idss-release-pull-stable.env.example",
    "scripts/release-rail/idss-release-pull-stable.service",
    "scripts/release-rail/idss-release-pull-stable.timer",
    "scripts/release-rail/publish.sh",
    "scripts/release-rail/pull.sh",
    "scripts/tests/release-rail-test.sh"
  ],
  "tests": [
    {
      "command": "bash scripts/tests/release-rail-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/bootstrap-reseed-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash scripts/tests/reseed-publish-workflow-test.sh",
      "exit_code": 0
    },
    {
      "command": "node scripts/check-mermaid.mjs",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Given a published testing revision carrying four artifacts, When promote runs with a throwaway production seed, Then the stable feed names the same four roles with the same sha256 digests, and verifies against the throwaway production public key": "release-rail-test.sh scenario A: promote HEAD; asserts stable feed digest map == testing digest map, keys length == 4, includes idss-idp, and release-install --channel stable verifies against PROD_PUB (and REJECTS TEST_PUB). publish.sh promote reads roles from the source feed and re-cuts from the verified bytes.",
    "Given that promote, Then the registry's testing version of <rev> is byte-identical to before — feed and artifacts": "scenario A records sha256 of every testing file before promote and asserts equality after; publish.sh promote publishes to STABLE_PACKAGE (idss-fleet-release-stable), never the testing version.",
    "Given a registry that answers 409 with DIFFERENT bytes for any file, Then promote exits non-zero and never logs a success line": "scenario B pre-seeds the stable feed.json version with foreign bytes; promote exits non-zero, logs no 'promoted ... onto stable', names the 409, foreign feed unchanged. publish.sh put() reads the stored bytes back on 409 and fails on sha256 mismatch.",
    "Given a testing feed whose signature or any artifact digest does not verify, Then promote refuses before signing anything": "scenario C tampers a stored artifact (digest mismatch) and C2 seeds the source signed by the wrong key (signature mismatch); both refuse with no stable feed published. publish.sh promote runs release_install_verify against PROMOTE_SOURCE_PUBLIC_KEY before release-cut.",
    "Given a testing revision whose idss-idp artifact cannot be fetched, Then promote refuses; it never cuts a three-artifact release from a four-artifact source": "scenario D deletes art-idss-idp from the registry; promote refuses, names the role, no stable feed. publish.sh fetch_staging refuses a role the feed names but the registry cannot serve.",
    "Given a promote whose sequence does not advance the served stable feed's, Then it refuses": "scenario E pre-seeds a served stable feed with sequence 9999999; promote refuses naming the sequence guard, no stable feed. publish.sh promote reads the newest stable feed's sequence and refuses seq <= served.",
    "Given two pull instances (testing, stable) over one artifacts dir, When a newer testing release is published, Then only channel/testing.json advances; When a promote lands, Then only channel/stable.json advances, verified against the stable key; a stable feed signed by the testing key is refused and the previous release stays served": "scenario F: two pull.sh instances over one artifacts dir; testing advances rev1->rev2 with stable absent; a production-signed stable rev1 advances stable only (testing unchanged); a testing-key-signed stable feed is refused and stable stays rev1; per-channel RELEASE_PIN.<channel> files never collide. pull.sh takes channel/package/key/pin-file from env.",
    "The existing 36 release-rail-test.sh checks stay green; publish (the testing path) is unchanged in behaviour": "release-rail-test.sh now passes 83 checks (the original 36 unchanged, incl. the docs-only-refusal and workflow-property checks); publish_testing still cuts+publishes the same files via publish_tree/put (put's 409 byte-check only fires on 409, which the testing path is guarded against re-hitting)."
  },
  "summary": "Fixed publish.sh promote so the first stable promote works — carries every role, publishes to stable's own registry home, and treats a 409 as idempotent only when the bytes match; added the per-channel pull half + stable unit pair + docs, all proven offline against a fake registry.",
  "reason": "",
  "blockers": []
}
**close-report** for #1971 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1971, "status": "success", "commits": [ "2596b1b30b757c63dc9a70097751b5cc2da8376c" ], "changed_files": [ "STATUS.md", "docs/GOTCHAS.md", "docs/adr/0248-design-fleet-auto-update-lands-a-signed-release-on-a-running-community.md", "docs/architecture/11-update-supply-chain.md", "scripts/release-rail/README.md", "scripts/release-rail/idss-release-pull-stable.env.example", "scripts/release-rail/idss-release-pull-stable.service", "scripts/release-rail/idss-release-pull-stable.timer", "scripts/release-rail/publish.sh", "scripts/release-rail/pull.sh", "scripts/tests/release-rail-test.sh" ], "tests": [ { "command": "bash scripts/tests/release-rail-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/bootstrap-reseed-test.sh", "exit_code": 0 }, { "command": "bash scripts/tests/reseed-publish-workflow-test.sh", "exit_code": 0 }, { "command": "node scripts/check-mermaid.mjs", "exit_code": 0 } ], "criteria": { "Given a published testing revision carrying four artifacts, When promote runs with a throwaway production seed, Then the stable feed names the same four roles with the same sha256 digests, and verifies against the throwaway production public key": "release-rail-test.sh scenario A: promote HEAD; asserts stable feed digest map == testing digest map, keys length == 4, includes idss-idp, and release-install --channel stable verifies against PROD_PUB (and REJECTS TEST_PUB). publish.sh promote reads roles from the source feed and re-cuts from the verified bytes.", "Given that promote, Then the registry's testing version of <rev> is byte-identical to before — feed and artifacts": "scenario A records sha256 of every testing file before promote and asserts equality after; publish.sh promote publishes to STABLE_PACKAGE (idss-fleet-release-stable), never the testing version.", "Given a registry that answers 409 with DIFFERENT bytes for any file, Then promote exits non-zero and never logs a success line": "scenario B pre-seeds the stable feed.json version with foreign bytes; promote exits non-zero, logs no 'promoted ... onto stable', names the 409, foreign feed unchanged. publish.sh put() reads the stored bytes back on 409 and fails on sha256 mismatch.", "Given a testing feed whose signature or any artifact digest does not verify, Then promote refuses before signing anything": "scenario C tampers a stored artifact (digest mismatch) and C2 seeds the source signed by the wrong key (signature mismatch); both refuse with no stable feed published. publish.sh promote runs release_install_verify against PROMOTE_SOURCE_PUBLIC_KEY before release-cut.", "Given a testing revision whose idss-idp artifact cannot be fetched, Then promote refuses; it never cuts a three-artifact release from a four-artifact source": "scenario D deletes art-idss-idp from the registry; promote refuses, names the role, no stable feed. publish.sh fetch_staging refuses a role the feed names but the registry cannot serve.", "Given a promote whose sequence does not advance the served stable feed's, Then it refuses": "scenario E pre-seeds a served stable feed with sequence 9999999; promote refuses naming the sequence guard, no stable feed. publish.sh promote reads the newest stable feed's sequence and refuses seq <= served.", "Given two pull instances (testing, stable) over one artifacts dir, When a newer testing release is published, Then only channel/testing.json advances; When a promote lands, Then only channel/stable.json advances, verified against the stable key; a stable feed signed by the testing key is refused and the previous release stays served": "scenario F: two pull.sh instances over one artifacts dir; testing advances rev1->rev2 with stable absent; a production-signed stable rev1 advances stable only (testing unchanged); a testing-key-signed stable feed is refused and stable stays rev1; per-channel RELEASE_PIN.<channel> files never collide. pull.sh takes channel/package/key/pin-file from env.", "The existing 36 release-rail-test.sh checks stay green; publish (the testing path) is unchanged in behaviour": "release-rail-test.sh now passes 83 checks (the original 36 unchanged, incl. the docs-only-refusal and workflow-property checks); publish_testing still cuts+publishes the same files via publish_tree/put (put's 409 byte-check only fires on 409, which the testing path is guarded against re-hitting)." }, "summary": "Fixed publish.sh promote so the first stable promote works — carries every role, publishes to stable's own registry home, and treats a 409 as idempotent only when the bytes match; added the per-channel pull half + stable unit pair + docs, all proven offline against a fake registry.", "reason": "", "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.

Reference
Matou/idss#1971
No description provided.