Skip to content

fix(scip-ingest): prepend ~/.codehub/bin to indexer spawn PATH#160

Merged
theagenticguy merged 1 commit into
mainfrom
fix/scip-runner-codehub-bin-path
May 29, 2026
Merged

fix(scip-ingest): prepend ~/.codehub/bin to indexer spawn PATH#160
theagenticguy merged 1 commit into
mainfrom
fix/scip-runner-codehub-bin-path

Conversation

@theagenticguy
Copy link
Copy Markdown
Owner

Summary

SCIP indexers installed by codehub setup --scip=<tool> (scip-clang, scip-ruby, the scip-kotlin JAR) land in ~/.codehub/bin, but the analyze runner spawned them with the inherited PATH unchanged. An ambient version-manager shim (mise/asdf) that resolves on PATH but has no version pinned for the project exits non-zero before the real indexer runs — the "No version is set for shim" failure — and could shadow a perfectly good setup-installed binary, making that language skip.

This is the gap surfaced on a real codehub analyze run against an external project: scip-python was reachable via a mise shim that then errored with No version is set for shim. Vendoring wouldn't help (the binary "exists"); the fix is resolution order.

Fix

Prepend ~/.codehub/bin to the spawn env PATH in runCommand — the single chokepoint both the index spawn and the version probe flow through — so codehub's own installed indexers win over a broken shim.

spawn env PATH:  ~/.codehub/bin : <inherited PATH>
  • Honors a caller-supplied PATH in envOverlay (reads the resolved env value, not process.env).
  • Cross-platform: matches the PATH key case-insensitively (Windows Path) and uses the platform delimiter (; vs :).
  • Idempotent — never double-prepends.
  • Does not mutate the input env object.

Why not vendor the indexers instead?

Considered and rejected: vendoring scip-clang/scip-ruby native binaries would re-introduce exactly what ADR 0015 removed from the npm-distributed boundary (platform-specific blobs + the GHCR-fetch failure mode that broke npm install -g). The system-toolchain indexers (scip-go, rust-analyzer, scip-typescript, …) also shouldn't be pinned — they must track the user's compiler version. Indexers stay opt-in installs via codehub setup; this PR just makes them resolve reliably once installed.

Verification

  • Runtime proof: with a mise-shims dir earlier on PATH, ~/.codehub/bin still lands first.
  • 73/73 scip-ingest tests (7 new: prepend / idempotency / empty-PATH / absent-PATH / caller-PATH / preserve-other-vars / no-mutation).
  • ingestion (the consumer) 602/602; typecheck + biome clean.

Test plan

  • bin dir prepended ahead of existing PATH
  • idempotent when already first
  • empty / absent PATH → just the bin dir
  • caller-supplied PATH honored
  • input env not mutated

@theagenticguy theagenticguy force-pushed the fix/scip-runner-codehub-bin-path branch from 7701080 to fbd6e0d Compare May 29, 2026 12:56
SCIP indexers installed by `codehub setup --scip=<tool>` land in
~/.codehub/bin, but the analyze runner spawned them with the inherited PATH
unchanged. An ambient version-manager shim (mise/asdf) that resolves on PATH
but has no version pinned for the project exits non-zero before the real
indexer runs — the "No version is set for shim" failure — and could shadow a
perfectly good setup-installed binary, making the language skip.

Prepend ~/.codehub/bin to the spawn env PATH in runCommand (the single
chokepoint for both the index spawn and the version probe) so codehub's own
installed indexers win over a broken shim. Honors a caller-supplied PATH in
envOverlay, is cross-platform (Windows `Path` casing + `;` delimiter), and
idempotent.

This is the no-vendoring fix for the gap surfaced on the bonk run: indexers
stay opt-in installs (ADR 0015 keeps native binaries out of the npm tarball),
but once installed they resolve reliably.

73/73 scip-ingest tests pass (7 new covering prepend/idempotency/empty-PATH/
caller-PATH/Windows-casing/no-mutation).
@theagenticguy theagenticguy force-pushed the fix/scip-runner-codehub-bin-path branch from fbd6e0d to 01f532b Compare May 29, 2026 13:14
@theagenticguy theagenticguy merged commit 4418db9 into main May 29, 2026
43 of 45 checks passed
@theagenticguy theagenticguy deleted the fix/scip-runner-codehub-bin-path branch May 29, 2026 14:40
@github-actions github-actions Bot mentioned this pull request May 29, 2026
theagenticguy pushed a commit that referenced this pull request May 29, 2026
🤖 Automated release via release-please
---


<details><summary>analysis: 0.3.2</summary>

##
[0.3.2](analysis-v0.3.1...analysis-v0.3.2)
(2026-05-29)


### Bug Fixes

* **deps:** downgrade write-file-atomic 8.0.0→7.0.1 to match supported
node range
([#155](#155))
([a723e53](a723e53))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/storage bumped to 0.2.2
    * @opencodehub/wiki bumped to 0.2.2
</details>

<details><summary>cli: 0.5.4</summary>

##
[0.5.4](cli-v0.5.3...cli-v0.5.4)
(2026-05-29)


### Features

* **cli:** doctor checks vendored wasm grammars + scip indexers
(--strict)
([#159](#159))
([36a241e](36a241e))


### Bug Fixes

* **deps:** downgrade write-file-atomic 8.0.0→7.0.1 to match supported
node range
([#155](#155))
([a723e53](a723e53))
* **scanners:** correct scanner exit-code handling and stop duplicate
skip logs
([#156](#156))
([5d30eb4](5d30eb4))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/analysis bumped to 0.3.2
    * @opencodehub/ingestion bumped to 0.4.4
    * @opencodehub/mcp bumped to 0.4.3
    * @opencodehub/pack bumped to 0.2.3
    * @opencodehub/scanners bumped to 0.2.1
    * @opencodehub/search bumped to 0.2.2
    * @opencodehub/storage bumped to 0.2.2
    * @opencodehub/wiki bumped to 0.2.2
</details>

<details><summary>cobol-proleap: 0.1.8</summary>

##
[0.1.8](cobol-proleap-v0.1.7...cobol-proleap-v0.1.8)
(2026-05-29)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/ingestion bumped to 0.4.4
</details>

<details><summary>ingestion: 0.4.4</summary>

##
[0.4.4](ingestion-v0.4.3...ingestion-v0.4.4)
(2026-05-29)


### Bug Fixes

* **deps:** downgrade write-file-atomic 8.0.0→7.0.1 to match supported
node range
([#155](#155))
([a723e53](a723e53))
* **ingestion:** vendor graphty Leiden to drop node-pty install fetch
([#157](#157))
([790ca4e](790ca4e))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/analysis bumped to 0.3.2
    * @opencodehub/scip-ingest bumped to 0.2.4
    * @opencodehub/storage bumped to 0.2.2
</details>

<details><summary>mcp: 0.4.3</summary>

##
[0.4.3](mcp-v0.4.2...mcp-v0.4.3)
(2026-05-29)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/analysis bumped to 0.3.2
    * @opencodehub/pack bumped to 0.2.3
    * @opencodehub/scanners bumped to 0.2.1
    * @opencodehub/search bumped to 0.2.2
    * @opencodehub/storage bumped to 0.2.2
</details>

<details><summary>pack: 0.2.3</summary>

##
[0.2.3](pack-v0.2.2...pack-v0.2.3)
(2026-05-29)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/analysis bumped to 0.3.2
    * @opencodehub/ingestion bumped to 0.4.4
    * @opencodehub/storage bumped to 0.2.2
</details>

<details><summary>scanners: 0.2.1</summary>

##
[0.2.1](scanners-v0.2.0...scanners-v0.2.1)
(2026-05-29)


### Bug Fixes

* **scanners:** correct scanner exit-code handling and stop duplicate
skip logs
([#156](#156))
([5d30eb4](5d30eb4))
</details>

<details><summary>scip-ingest: 0.2.4</summary>

##
[0.2.4](scip-ingest-v0.2.3...scip-ingest-v0.2.4)
(2026-05-29)


### Bug Fixes

* **scanners:** correct scanner exit-code handling and stop duplicate
skip logs
([#156](#156))
([5d30eb4](5d30eb4))
* **scip-ingest:** prepend ~/.codehub/bin to indexer spawn PATH
([#160](#160))
([4418db9](4418db9))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/analysis bumped to 0.3.2
</details>

<details><summary>search: 0.2.2</summary>

##
[0.2.2](search-v0.2.1...search-v0.2.2)
(2026-05-29)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/storage bumped to 0.2.2
</details>

<details><summary>storage: 0.2.2</summary>

##
[0.2.2](storage-v0.2.1...storage-v0.2.2)
(2026-05-29)


### Bug Fixes

* **storage:** retry transient lbug WAL→checkpoint race in bulkLoad
([#161](#161))
([450714c](450714c))
</details>

<details><summary>wiki: 0.2.2</summary>

##
[0.2.2](wiki-v0.2.1...wiki-v0.2.2)
(2026-05-29)


### Bug Fixes

* **deps:** downgrade write-file-atomic 8.0.0→7.0.1 to match supported
node range
([#155](#155))
([a723e53](a723e53))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @opencodehub/storage bumped to 0.2.2
</details>

<details><summary>root: 0.6.5</summary>

##
[0.6.5](root-v0.6.4...root-v0.6.5)
(2026-05-29)


### Features

* **cli:** doctor checks vendored wasm grammars + scip indexers
(--strict)
([#159](#159))
([36a241e](36a241e))


### Bug Fixes

* **ci:** isolate verify-global-install into a per-run npm prefix
([#162](#162))
([3b59373](3b59373))
* **deps:** bump qs 6.15.1→6.15.2 and tmp 0.2.4→0.2.6 to clear osv
findings
([#151](#151))
([2f798ec](2f798ec))
* **deps:** downgrade write-file-atomic 8.0.0→7.0.1 to match supported
node range
([#155](#155))
([a723e53](a723e53))
* **ingestion:** vendor graphty Leiden to drop node-pty install fetch
([#157](#157))
([790ca4e](790ca4e))
* **scanners:** correct scanner exit-code handling and stop duplicate
skip logs
([#156](#156))
([5d30eb4](5d30eb4))
* **scip-ingest:** prepend ~/.codehub/bin to indexer spawn PATH
([#160](#160))
([4418db9](4418db9))
* **storage:** retry transient lbug WAL→checkpoint race in bulkLoad
([#161](#161))
([450714c](450714c))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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