Skip to content

ci(agent): one dispatch builds, signs and publishes a Maple Work release - #1420

Merged
AnthonyRonning merged 3 commits into
masterfrom
codex-relcut-maple
Nov 1, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
codex-relcut-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

A release is one command

# after merging a version bump of apps/maple-agent/Cargo.toml
gh workflow run agent-desktop-build.yml --ref master -f release=true -f notes="What changed"

That run builds and signs Prod for macOS, Linux, Windows x64 and Windows ARM64. Then a new publish job signs the four update manifests and uploads the packages, per-version envelopes and feed pointers to R2. Nobody downloads or checks anything.

Before: a master push build, then a separate Publish Agent Updates dispatch with run ID, version, notes and three platform toggles. That ran verify → reserve → sign → publish, with three updates-production approvals, plus an operator CLI that re-downloaded and re-verified every stage by hand and ended with a 125-request live check.

Speed

  • Master push builds: the four Verify downloaded * / Attest Linux jobs are gone, as are the in-job verify steps (the deps/SQLCipher graph checks, PE/host-spawn fixtures, archive scanners and Nix version checks).
  • Windows ARM64 (Agent: add native Windows ARM64 builds and updates #1401) was an uncached 48-minute job on every master push. It took Agent Desktop Builds from about 33 to 54 min p50 and made x64 Windows signing wait on it. It now builds only nightly, on dispatch and for releases, with its own exact-key release cache. Push builds are back to the pre-ARM64 critical path (macOS, about 30 min). Each push also saves about 50 ARM64 runner-minutes and about 20 minutes of verify jobs.
  • agent-package-windows-arm64 (35–40 min uncached) leaves the ci:windows label and gets a nightly-saved cache like x64. It no longer runs the updater tests or the install smoke.
  • Publishing: one job, no Nix. It downloads this run's artifacts, installs minisign from apt, then signs and uploads.

Ordinary PR CI was not affected: unlabeled Agent PRs are at p50 4.0 / p90 5.5 min to ci-ok.

What was cut

Removed Lines
services/agent-updates/publisher/ (publisher.py, release_helpers operator CLI, 17 test files) ~13,000
agent-updates-publish.yml, agent-windows-signature-probe.yml, signature reference checker ~670
Verify/smoke/archive-scanner scripts and the validate-release-archive / windows_signature_probe examples ~900
Agent packaging script test suites ~5,800
windows-release.py smoke harness, re-extraction and inspections (1,510 → 183 lines) ~1,330
Linux ELF audit/AppImage output, release-info.py verify/extract/compare, macOS verify-only commands ~500
Publisher-bound CI contract tests ~250

The docs were rewritten for a new agent: apps/maple-agent/docs/updates.md (403 → 87 lines), desktop-builds.md (344 → 106), services/agent-updates/README.md (209 → 52), plus the publication section of the develop-maple-agent skill.

Compatibility with installed clients

The feed paths, R2 layout, envelope and v1–v4 manifest bytes are unchanged; build is still the producing run's number. I checked publish.py's output from fake packages and a throwaway key with:

  • the removed publisher's strict parse_envelope + minisign -V (all 8 envelopes);
  • the client's manifest::verify_envelope for all four targets, and the legacy pre-Linux v1 validator (tests/fixtures/legacy-v1-validator.rs);
  • the live updates.maple.ai feed's shape (sorted compact JSON, same comments).

Windows: the updater archive is now written from the signed payload directory instead of re-extracting it from the installer with 7-Zip. These are the same bytes in the same order, so the tar is identical.

The publish job refuses a version that is already live, because release paths are cached as immutable. Bump the version and release again.

Verification

  • nix flake check (actionlint, workflow policy, contracts, 536 CI script tests): green
  • Pre-commit hook: repo, Research, Auth, updates, agent-updates green; Agent 783 + 1178 tests green apart from one timing flake (hosted_oauth::dropping_wait_closes_listener_without_a_callback), which passed 5 of 5 on rerun
  • ci:package on this PR runs the trimmed Linux, Windows x64 and Windows ARM64 packaging

After merge

  • The repository variables AGENT_UPDATES_ENABLED and AGENT_UPDATE_PUBLIC_KEY are unused now and can be deleted.
  • updates-production still has a required reviewer. That is one click per release instead of three; removing it would also affect Research's updates-publish.yml.
  • The 0.0.16 publish run (41346624118) that is waiting at reserve uses the old workflow from its own SHA. Approving or cancelling it is unaffected by this PR.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

A release is now `agent-desktop-build.yml` dispatched with `release=true`
after a version bump. Its new `publish` job signs the four update manifests
and uploads packages, per-version envelopes and feed pointers to R2 with a
140-line `services/agent-updates/publish.py`, byte-compatible with what
installed clients parse.

Removed:
- agent-updates-publish.yml (verify/reserve/sign/publish, three approvals),
  the publisher, the release_helpers operator CLI and their tests
- the verify-macos/verify-linux/verify-windows/attest-linux jobs and the
  verification and smoke scripts they ran
- the Windows signature probe workflow and its reference checker
- verification steps inside the build jobs and packaging scripts
  (windows-release.py 1510 -> 183 lines)
- the packaging script test suites

Windows ARM64 no longer builds on master pushes (it was an uncached
48-minute job that also held x64 signing back); it builds nightly, on
dispatch and for releases, with its own release cache. The ARM64 packaging
rehearsal gets a cache and leaves the ci:windows label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning AnthonyRonning added the ci:package Build unsigned packages on this PR label Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Maple Auth development preview: https://f95458cd.maple-auth-dev.pages.dev

Commit: 0bf79e56a7c909dfecc6ce1b3cbb2673b973b923

Uses development services. Cloudflare Access applies. Provider OAuth is not configured for PR URLs; use the stable Auth Dev host for OAuth rehearsal.

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Maple development preview: https://ac86b238.maple-ca8.pages.dev

Commit: 0bf79e56a7c909dfecc6ce1b3cbb2673b973b923

Uses development API, billing, flags and PCR configuration. Cloudflare Access applies.

…thon smoke probe

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HTTP/2 stream resets ("Error in the HTTP2 framing layer", "Failed sending
data to the peer") cut NAR downloads short; Nix then resumes from an offset
past the end of the compressed file and cache.nixos.org answers 416, which
fails the job. The CDN serves ranges correctly (a mid-file range returns
206). Set `http2 = false` on the shared setup-nix action and on every direct
Nix install outside the release and EIF workflows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit 6f67e8f into master Nov 1, 2026
41 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-relcut-maple branch November 1, 2026 23:00
AnthonyRonning added a commit that referenced this pull request Nov 2, 2026
…ml; docs (#1427)

* ci: give the ARM64 packaging rehearsal its own cache family

The x64 Windows rehearsal restores by the prefix
`ci-v1-agent-package-Windows-`, which also matched the ARM64 lane's
`ci-v1-agent-package-Windows-ARM64-<hash>` keys (same paths, same store),
so once the nightly run saved an ARM64 entry the x64 rehearsal could
restore ARM64 objects. The ARM64 family is now
`ci-v1-agent-package-ARM64-Windows-`; no ARM64 entry has been saved yet,
and the x64 keys are unchanged, so nothing goes cold.

C4 now checks behaviour instead of only pinning the text: with each job's
runner.os filled in, no Agent packaging family's key or restore prefix can
match another cache's keys, and no other cache's prefix can match a
packaging key. It fails on the old ARM64 key in both directions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: the nightly report waits for ci.yml's scheduled run

GitHub creates the scheduled runs 5-6.5 hours after their cron times, and
nightly.yml's Report job starts only about an hour after ci.yml's run
does, while that run takes 35-60 minutes. On 2026-10-30 the report ran at
11:49:49, ci.yml's run finished at 11:52:23, and the ci-nightly issue said
"still in_progress".

The Report job now polls the API (the token's existing actions: read) once
a minute until today's scheduled ci.yml run has finished, for at most
CI_WAIT_MINUTES (120 on schedule, 0 for dispatched dry runs), then decides
as before; a run still missing or unfinished after the wait is reported as
it was. API errors while waiting are retried. Its timeout grows to 135
minutes. No trigger, required check or permission changes.

The cron comments and the docs no longer present cron times as start
times or rely on one schedule starting before another.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: describe what the packaging rehearsals and nightly builds do now

#1420 removed the verification and smoke steps from `just
package-rehearsal` and the Agent's post-build verify jobs, and #1401
added the native ARM64 lane, but some names and docs still said
otherwise:

- the Linux and macOS rehearsal step names no longer claim to verify and
  smoke-test;
- docs/ci.md: the Dev nightly builds and signs (no verify), for every
  platform including Windows ARM64; ci:package includes the ARM64
  installer (the skill's label table too);
- lanes.py: the 16-core GitHub Windows runner now serves only packaging,
  and the free runner the updater suites;
- the skill: the Agent PR long pole is agent-macos or agent-test (28 Agent
  PR runs since 10-29: agent-macos 11, agent-test 11, agent-windows 3),
  the ARM64 runner constant and its release cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: bound the nightly report's API calls and close review gaps

The Report job now waits up to two hours, so a hung `gh api` call could
hold it until its 135-minute timeout and leave the night unreported. Every
call now times out after 60 seconds, and a timed-out poll is retried like
a failed one.

Tests now cover what the review found untested: a red or cancelled ci.yml
run ends the wait at once; CI_WAIT_MINUTES is read as minutes (the 10-30
replay needs three polls, more than 120 seconds allows); nightly.yml's
Report job outlasts its longest wait, and a dispatched dry run does not
wait; and every API call carries a timeout.

Docs: the Agent Dev nightly signs only the macOS and Windows packages (the
Linux bundle is attested only when published); GitHub has started the
scheduled runs 5-7 hours late; and `ci-v1-agent-arm64-release-` joins the
release-reserved prefixes ci.yml must never write.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
pages-pr-1420 — 0bf79e56 Deployed Nov 1, 2026 by github-actions[bot]
auth-pages-pr-1420 — 0bf79e56 Deployed Nov 1, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:package Build unsigned packages on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant