Repository navigation
fix(cli): catalog says the registry could not be read instead of listing nothing - #7015
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Approving at 51801c93. I found no blockers.
- Fail-without-fix check: The
fails without the fix:line names two tests. I put back the base versions ofremote.tsandcatalog.ts(from036e41fa) and both tests failed. With the PR's code,remote.test.tsandcatalog.test.tspass (98 tests), and tsc reports no errors in the files this PR touches. - Contract:
fetchRegistryManifeststill returnsundefinedwhen the registry is unreachable and nothing is cached, solistRegistryItems, the picker fallback andtestHomebehave as before. Onlycatalogmoves to the version that throws. If a stale cache exists, it is still used before anything throws. - Catalog path:
finishCommand(1)returnsnever, somanifestis a non-optional type after the.catch. A reachable registry with no items still prints[]. - Nit (not blocking): With
--json, the error goes to stderr as plain text rather than JSON. That's fine for Desktop, which reads the exit code, but say so in the changelog if anything parses stderr.
CI: some runs (CI, CodeQL, Windows render verification) were still running when I reviewed. Every run that had finished had passed.
Contributor
Edit accuracy: accurate 271 (base branch 271), smooth 98 of thoseThe gate passes. Quarantined, measured but not gated (0) Unstable (2)
|
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 2, 2026
|
fix/catalog-fails-loudly |
Merged
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 3, 2026
Port upstream heygen-com#7015 (5a07ea2): catalog used to print an empty list and exit 0 when the registry was unreachable. It now exits 1 and explains why, in every output mode. The catalog test was ported by hand because of a conflict with fork tests. Watermarks stay put; the remaining upstream backlog is tracked in ROADMAP.md. Co-authored-by: Miguel Ángel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
When the registry can't be read and nothing is cached,
hyperframes catalogexits 1 and prints why, for exampleThe registry could not be read: fetch failed (getaddrinfo ENOTFOUND raw.githubusercontent.com). Before, it printed[](or "No items found in registry.") and exited 0.Why
An unreachable registry and a registry with no items gave the same answer. On networks that block raw.githubusercontent.com (mainland China and some ISPs elsewhere), HyperFrames Desktop read that
[]as an empty catalog and told people "The catalog is empty". Its retry could never help, and nothing said what was wrong.To reproduce before this change: deny raw.githubusercontent.com (for example
127.0.0.1 raw.githubusercontent.comin the hosts file), clear~/.hyperframes/cache, runhyperframes catalog --json. It prints[]and exits 0.Related work
Refs #7014, which adds a CDN mirror those networks reach. This PR is the part that stands alone: it says plainly what failed, mirror or not.
How
readRegistryManifest(registry/remote.ts) is the manifest read as before, fresh cache, then network, then stale cache. When all of those come up empty it throwsThe registry could not be read: <reason>instead of answeringundefined.fetchRegistryManifestkeeps its contract by wrapping it (undefinedwhen unreachable and uncached), solistRegistryItemsand the picker's fallback to bundled items are unchanged.catalogusesreadRegistryManifest, prints the message to stderr and exits 1. A reachable registry with no items still prints[].Test plan
fails without the fix:
remote.test.ts› "throws why when the registry host cannot be reached and nothing is cached",catalog.test.ts› "exits non-zero with the reason instead of printing an empty list"resolver.test.tsandtransport.test.tspass 3 runs in a row (126 tests).packages/clisuite has no failure that main doesn't also have in my environment (the existing ones come from packages not built there). oxlint, oxfmt and the comment ratchet are clean.Size
4 files, 67 lines. It's split from #7014 on purpose: that PR waits on the mirror going live, and this part helps people on blocked networks without it.