You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix: avoid unsupported ORT instructions by default - #78
Fixes SIGILL on older x86_64 CPUs (including Ivy Bridge) when invoking graph-only commands such as test-context.
Root cause: the CLI and MCP binaries enabled the kompress feature by default, which links the downloaded prebuilt ONNX Runtime archive. That archive contains newer x86 instructions and is loaded into every process, even when no ML compression is requested.
Keeps ML output compression available as an explicit opt-in feature while leaving graph indexing/query functionality baseline-compatible.
What changed
Make kompress opt-in for infigraph-cli and infigraph-mcp.
Document the explicit --features kompress build requirement and CPU compatibility tradeoff.
Preserve loopback-only MCP HTTP binding by default, with INFIGRAPH_MCP_BIND as the explicit exposure opt-in.
Add a process-level CLI regression test that indexes a temporary fixture and runs test-context without machine-specific paths or external indexes.
Re-run the Ivy Bridge/Forkara test-context reproducer with the existing index read-only.
Start a fresh infigraph-mcp process and verify generate_test_context returns an MCP error/result instead of terminating the transport.
Verify normal search, stats, callers, impact, and project-discovery paths remain usable.
Verify the HTTP server remains loopback-only unless INFIGRAPH_MCP_BIND is explicitly set.
Limitations
The prebuilt ONNX Runtime archive may still require newer x86 instructions when kompress is explicitly enabled. Users on older CPUs should omit that feature; extractive compression remains the fallback.
This change does not alter Forkara or existing graph/index data.
Notes
The fix is intentionally narrow: it removes an unconditional native ML dependency from graph-only invocations instead of disabling semantic search or changing the database/query engine.
Verified locally: core fix works correctly — infigraph --root <tmp> test-context --file src/calculator.py --limit 1 runs successfully and produces correct output (confirms the CLI no longer SIGILLs without kompress, and the loopback-bind fix in web/mod.rs is conflict-free against current main).
However, the new regression test itself has a bug: crates/infigraph-cli/tests/cli_parity.rs::test_context_runs_in_the_cli_process asserts stdout.contains("Test Context"), but the actual CLI output header is "Test Generation Context" — "Test Context" is not a substring of that (different word order), so the assertion fails even though the command's output is correct. This looks like a pre-existing output format (confirmed via git log -S, "Test Generation Context" predates this PR) that the test's string match just doesn't account for. Could you fix the assertion to check for "Test Generation Context" instead? Once that's fixed this looks ready to merge — everything else I checked (build, loopback-bind regression test, kompress-opt-in Cargo.toml changes) is clean.
Verified locally: core fix works correctly — infigraph --root <tmp> test-context --file src/calculator.py --limit 1 runs successfully and produces correct output (confirms the CLI no longer SIGILLs without kompress, and the loopback-bind fix in web/mod.rs is conflict-free against current main).
However, the new regression test itself has a bug: crates/infigraph-cli/tests/cli_parity.rs::test_context_runs_in_the_cli_process asserts stdout.contains("Test Context"), but the actual CLI output header is "Test Generation Context" — "Test Context" is not a substring of that (different word order), so the assertion fails even though the command's output is correct. This looks like a pre-existing output format (confirmed via git log -S, "Test Generation Context" predates this PR) that the test's string match just doesn't account for. Could you fix the assertion to check for "Test Generation Context" instead? Once that's fixed this looks ready to merge — everything else I checked (build, loopback-bind regression test, kompress-opt-in Cargo.toml changes) is clean.
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
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.
Summary
test-context.kompressfeature by default, which links the downloaded prebuilt ONNX Runtime archive. That archive contains newer x86 instructions and is loaded into every process, even when no ML compression is requested.What changed
kompressopt-in forinfigraph-cliandinfigraph-mcp.--features kompressbuild requirement and CPU compatibility tradeoff.INFIGRAPH_MCP_BINDas the explicit exposure opt-in.test-contextwithout machine-specific paths or external indexes.Test plan
cargo fmt --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test --allcargo build --release -p infigraph-cli -p infigraph-mcptest-contextreproducer with the existing index read-only.infigraph-mcpprocess and verifygenerate_test_contextreturns an MCP error/result instead of terminating the transport.INFIGRAPH_MCP_BINDis explicitly set.Limitations
kompressis explicitly enabled. Users on older CPUs should omit that feature; extractive compression remains the fallback.Notes
The fix is intentionally narrow: it removes an unconditional native ML dependency from graph-only invocations instead of disabling semantic search or changing the database/query engine.