Repository navigation
fix: self-heal missing platform bundle from GitHub Releases (#303) - #335
Merged
Merged
Conversation
Installing from a registry mirror (npmmirror/cnpm) that hadn't mirrored the per-platform optionalDependency left codegraph failing with "no prebuilt bundle for <platform>" — npm treats an unfetchable optional dep as success and silently skips it. The npm-shim now self-heals: when the bundle is missing it downloads the matching archive from GitHub Releases (checksum-verified, with a download timeout) and caches it, so a global install works on any registry. release.yml now publishes SHA256SUMS and triggers an npmmirror sync after publish. Adds hermetic tests for the shim (resolution, cache reuse, disable knob, download + checksum match/mismatch/absent). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jorgerobles
pushed a commit
to jorgerobles/codegraph
that referenced
this pull request
Jun 1, 2026
…enry#303) (colbymchenry#335) Installing from a registry mirror (npmmirror/cnpm) that hadn't mirrored the per-platform optionalDependency left codegraph failing with "no prebuilt bundle for <platform>" — npm treats an unfetchable optional dep as success and silently skips it. The npm-shim now self-heals: when the bundle is missing it downloads the matching archive from GitHub Releases (checksum-verified, with a download timeout) and caches it, so a global install works on any registry. release.yml now publishes SHA256SUMS and triggers an npmmirror sync after publish. Adds hermetic tests for the shim (resolution, cache reuse, disable knob, download + checksum match/mismatch/absent). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
inth3shadows
added a commit
to inth3shadows/codegraph
that referenced
this pull request
Nov 6, 2026
marionebl's colbymchenry#335 fix inserts an implicit `;` before any `<` that starts a line in a type or class body. Right after a bare member name tsc reads `find\n <T>(id): T` as one method, but the scanner split it into a property plus a call signature (no parse error in an interface), and a class method lost its call edges. The grammar now lists `(` as an external the scanner never produces, as JavaScript does for '||', and the scanner skips that `;` when `(` is valid, which is only right after a member name. colbymchenry#335's shapes (`a: string\n<A>(self: A): A`) still split. Comparing every node of every file over the four corpora, src and ui/src, the fix changes no tree (0 of 14,929); differential unchanged at 32. Also: node-kind test for both sides, tsx twins for the new strict fixtures, Known limits for parenthesized import types and the scanner's `in` edge cases, and doc provenance fixes.
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.
Problem
codegraph initfailing withno prebuilt bundle for <platform>afternpm i -g @colbymchenry/codegraph(#303). Not a packaging bug — npmjs has all six per-platform packages published correctly. The reporters install through the npmmirror/cnpm mirror, which had not mirrored the per-platform packages. The runtime ships as an optional dependency, and npm silently skips an optional package it can't fetch from the mirror, so the launcher ends up with no bundle.Reproduced end-to-end: a clean install from
registry.npmmirror.cominstalls only the shim (exact error); the same install from npmjs works.Fix
scripts/npm-shim.js— when the platform bundle isn't installed, download the same archive from GitHub Releases (the oneinstall.shuses), cache it under~/.codegraph/bundles/, and exec it. Works on any registry, corporate proxy, or--omit=optionalsetup.CODEGRAPH_NO_DOWNLOAD,CODEGRAPH_INSTALL_DIR,CODEGRAPH_DOWNLOAD_BASE.release.yml— publish aSHA256SUMSasset and trigger an npmmirror sync of all packages after publish (best-effort,continue-on-error).__tests__/npm-shim.test.ts: hermetic coverage (installed-bundle resolution, cache reuse, disable knob, and the download/checksum match/mismatch/absent paths via a local HTTPS mock).Also synced all 6 platform packages on npmmirror manually, so 0.9.2/0.9.3 already install there again.
Closes #303
🤖 Generated with Claude Code