Skip to content

LOCAL: decode fork feed tags once so in-app fork updates find their release - #27

Merged
kiwidream merged 1 commit into
swaplabs/mainfrom
fork-updater/skip-bare-upstream-tags
Sep 29, 2026
Merged

kiwidream merged 1 commit into
swaplabs/mainfrom
fork-updater/skip-bare-upstream-tags

Conversation

@kiwidream

@kiwidream kiwidream commented Sep 29, 2026 •

Copy link
Copy Markdown
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​69 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​68
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​21 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​18

ELI5

Fork builds checking for updates asked GitHub for the wrong file name, got "not found" every time, and told the user the update server was unreachable. This fixes the name, so a fork build finds its newer release.

What Changed

Before: clicking Check for Updates on a SwapLabs build (seen on a Mac at 2026-09-29 18:43Z) showed "Update Check Failed: Couldn't reach the update server", even though the newer release and its assets were all published.

After: the check finds the newer SwapLabs release. If a release really isn't installable yet, the card says "A newer release isn't available for this device yet".

Mechanism:

  • GitHub's releases feed writes fork tags percent-encoded (swaplabs-v1.4.214%2B202609282117, + as %2B). The feed parser kept that form, and every URL built from the tag encoded it again (%252B). Every manifest request 404'd, so the check came back "not ready".
  • The parser now decodes the tag once.
  • The fork repo's feed also lists upstream's bare tags (v1.4.216, v1.4.215, …), which carry no fork assets. Those entries are now skipped instead of spending manifest probes on them.
  • A fork source has only one channel, so a "not ready" result now gets the same "not available yet" message a stable-channel user gets, instead of the network-error message.

Why

I replayed the real feed-resolution code against live GitHub for a Mac on …202609281805. Before the fix, every manifest request went to %252B URLs and 404'd, and the result was not-ready. After the fix, …2117 resolves as ready and nothing is fetched for the bare upstream tags. Linux fork builds used the same path, so this affected every in-app fork update.

Decoding at the single place the feed is parsed fixes every consumer: the pinned feed URL, the manifest probes, and the Mac installer. The alternative was to stop encoding when building URLs, but upstream tags and REST-sourced tags rely on that encoding.

Linked Issue

N/A. Operator report of the Mac "Update Check Failed" card (fork workstream 4).

Visual Proof

N/A. The only visible change is the error text choice, which is covered by a test. The fix itself is in network resolution.

Testing

  • updater-prerelease-feed.test.ts: the fork-feed fixture now writes hrefs the way GitHub does (percent-encoded). 7 fork cases, including a new one that uses a mirrored upstream tag, fail on the old code and pass now.

  • updater.check-failure.test.ts: a new case checks that a fork build's not-ready check shows "A newer release isn't available…". It fails on the old code.

  • pnpm tc:node, check:code-quality:changed, oxlint and oxfmt pass.

  • 5 tests in updater.server-update-help-url / linux-root-package-install / headless-serve-install fail identically on the swaplabs/main base without this change. They are not touched here.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

AI Disclosure

Claude Opus 5.5 via Claude Code.

Review

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Fork-only (LOCAL:). Decoding is a no-op for upstream tags (v1.4.216 has nothing encoded), and the bare-tag skip only removes entries that name another source's version, so upstream-source checks are unchanged.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

🤖 Generated with Claude Code


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

…elease

GitHub's releases.atom serves a fork tag percent-encoded
(swaplabs-v1.4.214%2B202609282117). The feed parser kept it that way and
every download URL encoded it again (%252B), so each fork manifest 404'd,
the check came back not-ready, and a Mac showed "Couldn't reach the update
server". Decode the href once, skip mirrored upstream tags (v1.4.216) that
name another source's version instead of probing them, and give a fork
source's not-ready check the "not available yet" copy.

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

tenki-reviewer Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


Adds decodeFeedTag percent-decoding and other-source tag filtering to the prerelease update feed, plus tests for fork-vs-upstream tag handling.

Reviewed commit: 7b67ac2

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T19:18:31.469918Z 7b67ac2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kiwidream
kiwidream merged commit 7f1dd49 into swaplabs/main Sep 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant