Repository navigation
fix(harness): identity-check PATH whip; masquerading binaries fall back to pinned v0.6.5 - #56
Merged
Merged
Conversation
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.
Re-reviews on consumer repos (e.g.
[zdr]) inter-mitted with:
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 materializedWHIP_HOMEpanel, reads the runner's real~/.whipcodeconfig, and rejects loupe's
-m glm-5.3.Fix: loupe never trusts an unverified
whip.resolveWhipBinarynow identity-checks the PATH binary withwhip --versionbefore using it (isGenuineWhipOnPath):whip v(genuine whip, any version) → used as-iswhip, broken binary, etc.) → discarded; loupe downloads and uses the pinned [v0.6.5](https://github.com/conlabs/whip/releases/tag/v0.6.5) release from its own
~/.loupe/bin/whipcache insteadSo regardless of what a CI workflow installs — "latest", unpinned, or a renamed imposter — harness
whipnow 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 --buildclean; 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/whipbut that binary is actually whipcode (post–v1.0.0 rename). Loupe used to treat anywhipon PATH as valid, so reviews could hitwhipcode: unknown model "glm-5.3"because whipcode ignores loupe’s materializedWHIP_HOMEpanel.resolveWhipBinarynow verifies the PATH binary via newisGenuineWhipOnPath, which runswhip --versionand accepts it only when output starts withwhip 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.