Repository navigation
ci(release): start the download mirror as soon as a release is published - #1059
Conversation
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>
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>
… 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>
|
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 |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Installed apps check
downloads.scientfactory.comfor 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 /synctrigger, 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".sync-download-mirror.ymlwith the channel and tag.continue-on-error: a failed dispatch warns and doesn't fail the release.sync-download-mirror.yml(manual dispatch withchannelandtag):validatejob first admits only a tag that names a release on its channel.latest*.ymlorbeta*.yml) first, then callsPOST $RELEASE_MIRROR_SYNC_URL?channel=…with the bearer token and prints the streamed report.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.SCIENT-FORKmarkers on therelease.ymlstep.docs/operations/release.mddescribes both.Codex review
Round 1 asked for two changes, both fixed in
4d4d1c8: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 after62703d6: 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.tsandscripts/scient-beta-publication.test.ts: 32 passed.actionlint: the new workflow is clean, andrelease.ymlhas the same 4 findings asmain.mainfirst. 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