Repository navigation
ci: run npm test and the hooks against a released ix - #36
Merged
Merged
Conversation
The mcp job now runs `npm test` (mock-ix suite) after the committed-dist check. A new `real ix` job installs ix v0.12.0 from its release tarball (sha256-verified), points IX_ENDPOINT at a dead port, and runs tests/real-ix: the hooks.json commands against the real CLI, asserting they parse ix's real error records, exit 0 with Cursor-protocol output when the backend is unreachable, and that the CLI accepts every flag the plugin passes it. CI Passed now needs both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EqMeW5huGYgRUWS2TtuvF8
…uage The only checksum came from the same release, so a tarball replaced together with its .sha256 passed. Pin the sha256 in the workflow too. The Grep payload's path was the project root, so pre-search passed no --path, and no payload had a type. The optional filters were only checked from a hand-written argv list, which a renamed flag in pre-search would not change. Run a Grep scoped to a subdirectory with a type, and require both flags among the argv the hooks actually ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KageBinary
commented
Oct 4, 2026
KageBinary
left a comment
Collaborator
Author
There was a problem hiding this comment.
Reviewed against the released ix v0.12.0. Fixed in a0066a3:
- Pinned the tarball's sha256 in the workflow.
- The Grep
pathwas the project root, sopre-searchsent no--path, and no payload had atype.--pathand--languagewere only checked against a hand-written argv list. A scoped Grep (lib/,ts) now makes the hook send both, and the test requires them among the argv it actually ran; renaming--languagenow fails 2 tests.
Note: the status and map argv lists are still hand-written. Real-ix 7/7 and npm test 27/27 on Node 22; CI is green. Merging.
KageBinary
marked this pull request as ready for review
October 4, 2026 23:04
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.
Audit remediation PL-03.
What changes
npm test(the mock-ixsuite; the mock is bash, so it stays on Linux). The existing "Committed dist matches the build" step already rebuilds and fails on anymcp/distdrift (including untracked emit), so no second dist check was added.ixv0.12.0 from the release tarball (sha256sum -cagainst the.sha256sidecar), Node 22, ripgrep;IX_ENDPOINT=http://127.0.0.1:1,IX_NO_UPDATE_CHECK=1; runsnpm run test:real-ix.CI Passednow needs it.mcp/tests/real-ix/hooks.real-ix.ts(+ its committed dist emit, sincetsccompiles tests intomcp/dist). Named*.real-ix.tssonpm testdoes not pick it up.What the real-ix test asserts
Hooks are run exactly as Cursor runs them: the
node "${CURSOR_PLUGIN_ROOT}/mcp/dist/hooks/*.js"commands fromhooks/hooks.json, withIX_BINunset so the realixon PATH is used, tempHOME/IX_HOME/XDG_STATE_HOME.ix --versionis the pinned release.parseIxJsonreads ix's realworkspace_not_mappederror record (exit 1, JSON on stdout).ix textstill reachadditional_context; output keys are ones Cursor reads.ix impact's exit-1 error body is parsed and the hook stays silent.IX_DEBUG_LOG), plus the two auto-map argv and pre-search's optional--path/--language, is accepted by this CLI: nounknown option. Checked locally that a CLI rejecting--silentturns this test red.No version fields changed.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EqMeW5huGYgRUWS2TtuvF8