Skip to content

ci(release): start the download mirror as soon as a release is published - #1059

Merged
yaacovcorcos merged 4 commits into
mainfrom
claude/release-mirror-trigger-20261121
Nov 21, 2026
Merged

yaacovcorcos merged 4 commits into
mainfrom
claude/release-mirror-trigger-20261121

Conversation

@yaacovcorcos

@yaacovcorcos yaacovcorcos commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Installed apps check downloads.scientfactory.com for updates. That site's mirror worker only copied a new GitHub release on its own schedule, so stable 0.6.32 took about 15 minutes to reach the feeds and earlier releases took 20–30.

Depends on ScientFactory/ScientFactory-website#80: the mirror's POST /sync trigger, the CPU-limit fix and retries. Land and deploy that first. Until its secrets are set, the new workflow only prints a notice.

What changed

  • release.yml, publish job: a new step, "Start the download mirror for this release".
    • It runs right after the Stable or Beta publication is verified and before the hosted-app deploy, so a failed deploy can't skip it.
    • It dispatches sync-download-mirror.yml with the channel and tag.
    • continue-on-error: a failed dispatch warns and doesn't fail the release.
  • New sync-download-mirror.yml (manual dispatch with channel and tag):
    • A validate job first admits only a tag that names a release on its channel.
    • Checks the three feed manifests (latest*.yml or beta*.yml) first, then calls POST $RELEASE_MIRROR_SYNC_URL?channel=… with the bearer token and prints the streamed report.
    • Calls again a minute apart until all three feeds offer the version, within one 20-minute deadline that also covers the first feed check (job limit 25).
    • Runs outside release.yml's release lock, in its own concurrency group per channel and validated tag, so only a repeat dispatch for the same release replaces a run.
    • permissions: {}. Missing secrets or a timeout only warn, and the mirror's schedule still publishes the release.
    • It can also be run by hand to publish an existing release.
  • SCIENT-FORK markers on the release.yml step. docs/operations/release.md describes both.

Codex review

Round 1 asked for two changes, both fixed in 4d4d1c8:

  1. The wait used to hold the workflow-wide release lock for up to 30 minutes. It now runs in its own workflow with one deadline.
  2. A failed hosted-web dispatch could skip the trigger. The mirror is now dispatched before it.

The recheck found two more, fixed in 62703d6: the tag is now in the concurrency key, so a mistyped dispatch can't cancel a running sync, and the deadline now starts before the first feed check. A third pass found two edge cases, fixed after 62703d6: the tag is now validated before it enters the concurrency group (GitHub compares group names without case), and every request's time limit must be positive (curl treats 0 as unlimited).

Platforms

CI only (ubuntu runner). It covers the macOS, Windows and Linux feeds alike.

Tests

  • scripts/scient-release-machinery.test.ts and scripts/scient-beta-publication.test.ts: 32 passed.
  • actionlint: the new workflow is clean, and release.yml has the same 4 findings as main.
  • Seam check passes.
  • I ran the workflow's script locally:
    • Release already offered: exits early.
    • Secrets missing: notice.
    • Bad tag: error.
    • Unreachable trigger: warning, then exits 0 at the deadline.
  • Not run: a real dispatch. The workflow file must be on main first. The first Stable or Beta after this merges is its live test, and a manual run for 0.6.32 can check it sooner.

🤖 Generated with Claude Code

Installed apps update from downloads.scientfactory.com, which the website's
mirror worker filled only on its own schedule. A new Publish to the download
mirror job calls the mirror's POST /sync for the release's channel right
after Publish GitHub release, streams its report, and waits until all three
update feeds offer the new version (up to five calls, a minute apart).

It is a separate job so the publish job's 10-minute limit and publication
lock don't apply, and it uses continue-on-error with no token permissions:
without the RELEASE_MIRROR_SYNC_URL/TOKEN secrets, or on failure, it only
warns, and the mirror's schedule publishes the release anyway.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:M labels Nov 21, 2026
From Codex's review of #1059:
- The wait ran inside release.yml, under its workflow-wide release lock, so
  a stalled mirror call could hold the next same-channel release for up to
  30 minutes. It now runs in sync-download-mirror.yml (its own concurrency
  group, newer release supersedes), with one 20-minute deadline for every
  call and check, and it checks the feeds before calling.
- The dispatch happens right after the publication is verified and before
  the hosted-app deploy, so a failed deploy can no longer skip it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added size:L and removed size:M labels Nov 21, 2026
yaacovcorcos and others added 2 commits November 21, 2026 22:12
… release

From Codex's recheck of #1059:
- The concurrency group includes the tag, so a dispatch for another tag
  (a typo) can no longer cancel a sync in progress.
- The 20-minute deadline starts before the first feed check, every feed
  request is capped at the time left, and each mirror call leaves time for
  the check after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From Codex's final check of #1059:
- A validate job admits only a tag that names a release on its channel;
  the sync job's concurrency group uses that output. GitHub compares group
  names without case, so a mistyped tag (V0.6.32) could otherwise cancel a
  running sync before failing validation.
- Every request's time limit comes from one clock reading and must be
  positive; curl treats --max-time 0 as no limit.

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

Copy link
Copy Markdown
Contributor Author

Codex review (read-only, gpt-6.2-sol high), four rounds. Round 1 raised the release lock held by the wait and a trigger skipped after a failed hosted-web dispatch. Round 2 raised a typo dispatch cancelling a sync and feed checks running outside the deadline. Round 3 raised a case-only typo and a possible --max-time 0. All were fixed. Round 4 on 46deae9 returned APPROVE. The owner authorized merging once Codex approved. Depends on ScientFactory/ScientFactory-website#80, which is merged and deployed, with the secrets set.

@yaacovcorcos
yaacovcorcos added this pull request to the merge queue Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 22.3 KiB 22.3 KiB 0 B (0.0%) 24.4 KiB ✅
Codex Live turn messages 1 1 0 (0.0%) 8 ✅
Claude Total thread wire 5.5 KiB 5.5 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 4.2 KiB 4.2 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.3 KiB 1.3 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 22.7 KiB 22.7 KiB 0 B (0.0%) 24.4 KiB ✅
Claude Live turn messages 1 1 0 (0.0%) 8 ✅

Other scenarios

All 64 scenario measurements match main.

All 64 scenario measurements
Provider Scenario Metric Main baseline This PR Impact PR ceiling
Codex short turn resume WebSocket decoded 12.0 KiB 12.0 KiB 0 B (0.0%) 12.7 KiB ✅
Codex short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn running, cold open HTTP decoded 281.7 KiB 281.7 KiB 0 B (0.0%) 302.7 KiB ✅
Codex long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Codex long turn running, history page HTTP decoded 92.4 KiB 92.4 KiB 0 B (0.0%) 107.4 KiB ✅
Codex long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Codex long turn finished, cold open HTTP decoded 381.5 KiB 381.5 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, socket cold open WebSocket decoded 381.6 KiB 381.6 KiB 0 B (0.0%) 410.2 KiB ✅
Codex long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Codex long turn finished, work page HTTP decoded 186.2 KiB 186.2 KiB 0 B (0.0%) 200.2 KiB ✅
Codex long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Codex idle thread resume WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell snapshot HTTP decoded 45.5 KiB 45.5 KiB 0 B (0.0%) 53.7 KiB ✅
Codex fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Codex fleet shell subscribe WebSocket decoded 65 B 65 B 0 B (0.0%) 200 B ✅
Codex fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Codex fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Codex fleet shell resume check rows 0 0 0 0 ✅
Codex stale shell reload HTTP decoded 45.5 KiB 45.5 KiB 0 B (0.0%) 53.7 KiB ✅
Codex stale shell reload rows 27 27 0 (0.0%) 27 ✅
Codex stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Codex stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Codex stale todo list cold open HTTP decoded 72.4 KiB 72.4 KiB 0 B (0.0%) 83.0 KiB ✅
Codex stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Codex stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Codex stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Codex stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅
Claude short turn resume WebSocket decoded 12.2 KiB 12.2 KiB 0 B (0.0%) 12.7 KiB ✅
Claude short turn resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn running, cold open HTTP decoded 283.3 KiB 283.3 KiB 0 B (0.0%) 302.7 KiB ✅
Claude long turn running, cold open rows 75 75 0 (0.0%) 75 ✅
Claude long turn running, history page HTTP decoded 93.4 KiB 93.4 KiB 0 B (0.0%) 107.4 KiB ✅
Claude long turn running, history page rows 75 75 0 (0.0%) 75 ✅
Claude long turn finished, cold open HTTP decoded 384.1 KiB 384.1 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, socket cold open WebSocket decoded 384.3 KiB 384.3 KiB 0 B (0.0%) 410.2 KiB ✅
Claude long turn finished, socket cold open WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude long turn finished, socket cold open rows 151 151 0 (0.0%) 151 ✅
Claude long turn finished, work page HTTP decoded 188.1 KiB 188.1 KiB 0 B (0.0%) 200.2 KiB ✅
Claude long turn finished, work page rows 150 150 0 (0.0%) 150 ✅
Claude idle thread resume WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude idle thread resume WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell snapshot HTTP decoded 46.1 KiB 46.1 KiB 0 B (0.0%) 53.7 KiB ✅
Claude fleet shell snapshot rows 27 27 0 (0.0%) 27 ✅
Claude fleet shell subscribe WebSocket decoded 66 B 66 B 0 B (0.0%) 200 B ✅
Claude fleet shell subscribe WebSocket messages 1 1 0 (0.0%) 1 ✅
Claude fleet shell resume check HTTP decoded 18 B 18 B 0 B (0.0%) 100 B ✅
Claude fleet shell resume check rows 0 0 0 0 ✅
Claude stale shell reload HTTP decoded 46.1 KiB 46.1 KiB 0 B (0.0%) 53.7 KiB ✅
Claude stale shell reload rows 27 27 0 (0.0%) 27 ✅
Claude stale shell resume WebSocket decoded 140 B 140 B 0 B (0.0%) 400 B ✅
Claude stale shell resume WebSocket messages 2 2 0 (0.0%) 2 ✅
Claude stale todo list cold open HTTP decoded 73.4 KiB 73.4 KiB 0 B (0.0%) 83.0 KiB ✅
Claude stale todo list cold open rows 75 75 0 (0.0%) 75 ✅
Claude stale todo list cold open nodes 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open subagents 2 2 0 (0.0%) 4 ✅
Claude stale todo list cold open plans 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open providerTurns 1 1 0 (0.0%) 2 ✅
Claude stale todo list cold open checkpoints 1 1 0 (0.0%) 2 ✅

Baseline: 7368ed0 · PR result: 46deae9 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Bounded compact HTTP snapshot with live cursor.

  • Codex decoded thread snapshot: 88.2 KiB
  • Claude decoded thread snapshot: 88.4 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Merged via the queue into main with commit c5595be Nov 21, 2026
75 checks passed
@yaacovcorcos
yaacovcorcos deleted the claude/release-mirror-trigger-20261121 branch November 21, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant