Skip to content

fix(harness): identity-check PATH whip; masquerading binaries fall back to pinned v0.6.5 - #56

Merged
anish-inf merged 2 commits into
context-labs:mainfrom
anish-inf:fix-whip-pin-guard
Sep 25, 2026
Merged

anish-inf merged 2 commits into
context-labs:mainfrom
anish-inf:fix-whip-pin-guard

Conversation

@anish-inf

@anish-inf anish-inf commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Re-reviews on consumer repos (e.g. [zdr]) inter-
mitted with:

whip exited 1: whipcode: unknown model "glm-5.3" (models: deepseek-v4-flash-0731, glm-5.2-fast, kimi-k3, kimi-k3-fast)

Root cause: those repos' CI install steps still download the latest whip release and save it as /usr/local/bin/whip. Since v1.0.0 the latest release's binary is whipcode (renamed CLI, different config dir), so loupe's PATH check passed while the binary was actually whipcode — which ignores the materialized WHIP_HOME panel, reads the runner's real ~/.whipcode con
fig, and rejects loupe's -m glm-5.3.

Fix: loupe never trusts an unverified whip. resolveWhipBinary now identity-checks the PATH binary with whip --version before using it (isGenuineWhipOnPath):

  • output starts with whip v (genuine whip, any version) → used as-is
  • anything else (whipcode masquerading as whip, broken binary, etc.) → discarded; loupe downloads and uses the pinned [v0.6.5](https://github.com/con
    labs/whip/releases/tag/v0.6.5)
    release from its own ~/.loupe/bin/whip cache instead

So regardless of what a CI workflow installs — "latest", unpinned, or a renamed imposter — harness whip now always ends up running genuine whip, pinned to 0.6.x via the fallback. Version bumps to the pin remain a deliberate change in loupe.

Verified: oxfmt --check, oxlint, tsc --build clean; 454/454 tests passing (including the new whip-resolution tests on main).


Note

Medium Risk
Changes which whip executable runs in CI and local harness paths; wrong behavior would break reviews but the fallback pin limits blast radius.

Overview
Fixes intermittent harness failures when CI installs the latest upstream release as /usr/local/bin/whip but that binary is actually whipcode (post–v1.0.0 rename). Loupe used to treat any whip on PATH as valid, so reviews could hit whipcode: unknown model "glm-5.3" because whipcode ignores loupe’s materialized WHIP_HOME panel.

resolveWhipBinary now verifies the PATH binary via new isGenuineWhipOnPath, which runs whip --version and accepts it only when output starts with whip v. Imposters, whipcode, or broken binaries are ignored and loupe falls back to the existing pinned v0.6.5 download in ~/.loupe/bin/whip, same as when nothing is on PATH.

Reviewed by Cursor Bugbot for commit 6ad775b. Bugbot is set up for automated code reviews on this repo. Configure here.

@anish-inf
anish-inf merged commit 04b28b3 into context-labs:main Sep 25, 2026
3 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