Release channels: dev (default) and stable - #107
Open
raphaelvigee wants to merge 4 commits into
Open
Conversation
Introduce the concept of a release channel: the stream a heph release comes from. Two channels ship: `nightly` (from hephbuild/heph-artifacts-v1, the default and what the site showed until now) and `stable` (from hephbuild/heph), which has no release published yet. Site: - `website/src/releaseChannels.ts` is the single source of truth: channel metadata, the repository each publishes to, and `DEFAULT_RELEASE_CHANNEL`. Making another channel the default is a one-line change there. - A channel selector is drawn on top of every code block carrying a version or release URL, and the choice is shared page-wide (context in `Root`) and persisted in localStorage. `?channel=<id>` pins a channel for a single visit. - Docs blocks use `<HEPH_ARTIFACTS_URL>` in place of hardcoded heph-artifacts-v1 download URLs, so they follow the selected channel. This also fixes blocks titled `ci.hephconfig`, whose placeholders were never substituted (the old wrapper matched the exact title `.hephconfig`). - Landing chrome keeps quoting the default channel. - A channel with no release yet (stable, today) says so instead of rendering the generic "could not resolve the version" error. Installer: `HEPH_CHANNEL=nightly|stable` picks the repository; unknown values fail with a clear message. Docs: new reference page "Release channels", linked from getting started and the `version` key; plugin skill references updated in the same change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017fcBWHbsCSTCSopBkF8W8t
Same channel, same repository (hephbuild/heph-artifacts-v1) — only the id and label change: `nightly` -> `dev`, `Nightly` -> `Dev`. Covers the channel model, the installer's HEPH_CHANNEL values, the docs, and the plugin skill references. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017fcBWHbsCSTCSopBkF8W8t
⚡ Cloudflare Pages preview
|
The version lookup hit the GitHub API from every component that asked for it, and remembered only successes. A docs page with three channel-aware code blocks therefore fired one request per block, and flipping the channel selector fired another round every time — measured against the dev server, 39 requests on load and 429 after twenty flips. Unauthenticated the API allows 60 per hour per IP, so a reader could exhaust their quota on a single page and get 403s where the version belongs. Lookups are now shared per channel: callers that arrive while a request is in the air join it instead of starting a second one, a resolved version and an empty channel are remembered for the life of the page, and a failure is remembered for a minute so a flurry of clicks cannot retry it sixty times. The same page is now 1 request on load and 2 after twenty flips — one per channel, ever. Switching channel mid-flight drops the pending answer rather than aborting it: the request is shared, and its result is still worth caching for whoever asks next. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017fcBWHbsCSTCSopBkF8W8t
fetchChannel deliberately never rejects — the promise is shared by every component waiting on that channel and is cached once it settles, so throwing would poison the entry for all of them. Discarding the reason along with the exception was not deliberate: the usual cause is a 403 from the API's 60-requests-per-hour-per-IP limit, which is invisible from the page and had to be read out of response headers by hand. The failure is now reported once per channel, with the rate-limit case named explicitly instead of surfacing as a bare status code. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017fcBWHbsCSTCSopBkF8W8t
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.
What
Adds the concept of a release channel — the stream a heph release comes from.
devhephbuild/heph-artifacts-v1stablehephbuild/hephSite
website/src/releaseChannels.ts— single source of truth: channel metadata, the repo each publishes to, andDEFAULT_RELEASE_CHANNEL. Flipping which channel readers get by default is a one-line change there.Root) and persisted inlocalStorage.?channel=<id>pins a channel for one visit (same spirit as?search=).<HEPH_ARTIFACTS_URL>instead of hardcodedheph-artifacts-v1download URLs, so they follow the selected channel. Side effect: blocks titledci.hephconfigfinally get substituted — the old wrapper matched the exact title.hephconfig, so their<HEPH_VERSION_URL>shipped raw.stable, today — says so, instead of the generic "could not resolve the version" error.Installer
HEPH_CHANNEL=dev|stableselects the repository;HEPH_VERSIONstill pins a tag within it. Unknown channel fails with a clear message.Docs
New reference page Release channels, registered in the sidebar and linked from getting started and the
versionkey. Plugin skill references (heph-expert,heph-go) updated in the same change per the drift rule; plugin/marketplace versions bumped.Checks
lintclean,buildsucceeds. Screenshotted both channel states in the dev server.🤖 Generated with Claude Code
https://claude.ai/code/session_017fcBWHbsCSTCSopBkF8W8t