Repository navigation
ci(release): run the nightly every hour - #376
Merged
Merged
Conversation
Most changes reach phones as OTA updates, so an hourly nightly ships them soon after merging. The plan job still skips hours without releasable commits.
nixuuu
added a commit
that referenced
this pull request
Nov 10, 2026
Users sharing a public IP can exhaust GitHub's unauthenticated 60-request/hour allowance. Update discovery then reports every computer as failed, even though nothing failed to install. Canopy now reads a static release index first and presents an exhausted REST fallback as **Checks paused**, with an automatic retry at the reset time. ## Changes - Publish `https://itsoltech.github.io/canopy/releases/v1.json` through the existing Pages workflow after `publish-desktop` has verified and published the release. Include tags, prerelease flags, publication dates, all asset names/URLs and release notes. Exclude drafts and incomplete uploads; require the release that triggered publication. One serialized Pages deployment replaces the whole site/index. Ordinary site deployments also preserve the index. Pages already uses the workflow source; no settings change is needed. - Share a metadata client across desktop windows/peer requests, gateway resolution, BFF notes and phone release notes. Use a 15-minute cache, ETags/304 and in-flight deduplication. Immutable manifests are cached by the resolver. Fall back to REST only when the index is unavailable or invalid; missing tags/channels in a valid index do not trigger REST lookups. - Honor `x-ratelimit-reset` and `Retry-After` for 403/429, sharing cooldowns across API repositories within each process. Manual, wake and remote checks cannot bypass the pause. Desktop/gateway automatic checks retry at reset; Never still disables desktop automatic retries. Linked computers carry the same neutral message through existing fields. Genuine installation/signature failures still show Failed, and staged installers remain usable. - Keep manifest, checksum, installer signature and pinned TLS verification in place. No client tokens, protobuf changes, tags, workflow dispatches or repository settings changes. ### Discovery choice Pages provides atomic snapshots, the existing deployment path, complete metadata and release notes. A rolling download asset would need an additional mutable release/tag and replacement protocol. Atom lacks the complete asset inventory and manifest-presence contract. Desktop and its local gateway remain separate readers: CDN discovery removes the quota dependency without adding a privileged gateway proxy. ## Calls per hour One desktop/local gateway, one linked desktop/gateway, and one browser using the local BFF. Five independent processes; one Canopy releases page, unchanged metadata, no process restarts. Scheduled trace: desktop checks hourly, gateways every 15 minutes, one browser notes read. Active trace: each reader is requested once/minute, with concurrent duplicate callers. Pre-change counts follow the original 60-second desktop/BFF cache and uncached gateway paths; post-change counts come from fake-clock/mock-fetch hour-long traces in `packages/updater/src/catalog.test.ts`. No live anonymous API traffic was used. | Workload | Before: REST requests/h | After: REST requests/h | After: CDN requests/h | After with index unavailable: REST requests/h | | --- | ---: | ---: | ---: | ---: | | Scheduled checks and one notes read | 11 | 0 | 11 | 11 | | Active checks and notes once/minute | 300 | 0 | 20 | 20 | Counts include conditional HTTP requests, including 304s; they do not assume anonymous 304s are quota-free. Five processes initially receive bodies; subsequent validations reuse them. Fallback also retries the unavailable index at most once/15 minutes per active process. More API history pages multiply fallback list requests; the CDN index stays one request. Concurrent duplicate callers add no new requests. Artifact downloads and provider notes are separate: Claude/Codex notes remain REST-backed, with the same shared 15-minute/ETag/origin-backoff policy in the BFF. Older installed clients continue using REST. Caches/backoff are process-local and reset on restart. ## Copy audit (§8) `Failed · Update failed. Check again to retry.` / `Release server returned HTTP 403` → `Checks paused` plus `GitHub is limiting update checks from this network. Next check at <localized time and zone>.` The new text names the confirmed condition and the next automatic action without implying installation failure. Each sentence stays within the copy limits; sentence case, plain words and `Intl` time formatting are used. There are no new glossary terms, buttons or confirmations. The neutral message is visible in computer rows, including touch layouts; it is not available only through a tooltip. Real errors retain their existing recovery actions. No humour or jargon was added. Layouts reuse the existing row/action columns and wrapping styles; visual browser/device verification remains unperformed. ## Validation - `bun install`; `bun run typecheck`; targeted gateway typecheck after extracting worker row projection to preserve the 400-line limit. - `bun run lint`; `bun run format:check`; actionlint on both changed workflows. - 53 focused updater/desktop/gateway/index tests, including fallback, pagination, ETag/304, reset/Retry-After, remote/mobile state mapping, preserved staged installs and the hourly traffic traces. Another 24 existing release/publication tests passed. - `git diff --check`; `proto/canopy/update/v1` unchanged. No E2E, native installers, builds or workflow runs were executed. CI remains the merge gate; the first normal Release/Pages run validates deployment after merge. Additional mobile Expo lint reports 38 errors and 3 warnings in existing mobile code (for example synchronous effect state updates in `AttachmentViewer.tsx` and ref reads in `ImageCanvas.tsx`). A targeted check of the four touched mobile files reports the existing `Updates.UpdateInfoType` namespace diagnostic on the unchanged version-extraction line in `PhoneReleaseNotes.tsx`; the other three files pass. This is separate from the passing repository oxlint/typecheck gates; this PR does not expand into unrelated mobile lint fixes. Related: #376, #471
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The nightly release now runs every hour around the clock at :40 UTC (
40 * * * *), instead of four times a day (7:40, 11:40, 15:40, 19:40 UTC). Most changes reach phones as OTA updates, so they ship soon after merging.planstill runs a semantic-release dry run first and skips hours without releasable commits, so idle hours cost only a checkout and the dry run.docs/release.mddescribes the new schedule.