Skip to content

fix(deps): raise tree-sitter runtime floor to >=0.25 for ABI 15 grammars - #4148

Closed
JFWaskin wants to merge 1 commit into
Graphify-Labs:v8from
JFWaskin:fix/tree-sitter-runtime-floor
Closed

JFWaskin wants to merge 1 commit into
Graphify-Labs:v8from
JFWaskin:fix/tree-sitter-runtime-floor

Conversation

@JFWaskin

@JFWaskin JFWaskin commented Oct 6, 2026

Copy link
Copy Markdown

Summary

The declared runtime floor tree-sitter>=0.23.0,<0.26 is lower than any runtime that can load the grammars this same file allows. This PR floors the runtime at the oldest release that supports the grammars we already ship.

The problem

tree-sitter 0.23 and 0.24 report LANGUAGE_VERSION = 14. The grammars pinned alongside them ship ABI 15:

package pin resolves to ABI
tree-sitter-javascript >=0.23,<0.26 0.25.0 15
tree-sitter-powershell >=0.26,<0.28 0.26.4 15
tree-sitter-scala >=0.23,<0.27 0.26.0 15

So the constraint set admits a resolution where the runtime cannot load the grammars. Every parse then fails with Incompatible Language version 15. I reproduced this locally: 61 test failures from that single error, 390 in total once knock-on effects are counted.

A resolver is free to land there. Demonstrated with uv pip compile:

# with the current floor
tree-sitter==0.23.2            <- ABI 14
tree-sitter-javascript==0.25.0 <- ABI 15   => broken pair

# with >=0.25
tree-sitter==0.25.2            <- ABI 15
tree-sitter-javascript==0.25.0 <- ABI 15   => consistent

The grammar versions are identical in both rows. Only the runtime is constrained differently.

The fix

Floor the runtime at >=0.25, the oldest release supporting ABI 15.

This does not change the locked resolution

uv.lock already resolved tree-sitter to 0.25.2. Re-locking after this change edits exactly one line — the recorded specifier string — and leaves all 201 resolved versions byte-identical:

-    { name = "tree-sitter", specifier = ">=0.23.0,<0.26" },
+    { name = "tree-sitter", specifier = ">=0.25,<0.26" },

The floor had simply lagged the lock.

Scope and impact

Worth being precise about what this does and does not fix:

  • CI was never red. .github/workflows/ci.yml runs uv sync --all-extras --frozen, which uses the lock and already got 0.25.2.
  • This only affects resolution from pyproject.toml — uv tool install, pip install graphifyy, and long-lived environments where grammars get upgraded without the runtime.
  • On a correctly resolved tree the suite goes from 390 failed / 3841 passed to 8 failed / 4480 passed.

The 8 residual failures are environmental, not code defects:

  • 7 × tests/test_security.py — the sandbox resolver returns 198.18.0.8 for example.com (RFC 2544 benchmark range, classified is_private=True), so the SSRF guard in graphify/security.py correctly blocks it. The guard is behaving as designed; the tests assume real DNS.
  • 1 × tests/test_extract.py::test_collect_files_skips_hidden — the checkout path itself contains a dot-directory component, and the assertion walks absolute path parts. Passes when run from a non-hidden checkout.

Testing

  • uv lock --check clean
  • uv sync --all-extras resolves tree-sitter==0.25.2, LANGUAGE_VERSION = 15, ABI-15 JavaScript grammar loads
  • Full suite: 4480 passed, 8 failed (environmental, listed above)

Two files: pyproject.toml, uv.lock.

The declared runtime floor tree-sitter>=0.23.0 is lower than any runtime
that can load the grammars this same file allows. 0.23/0.24 report
LANGUAGE_VERSION=14, while the pinned grammars ship ABI 15
(tree-sitter-javascript 0.25.0, tree-sitter-powershell 0.26.4,
tree-sitter-scala 0.26.0), so the constraint set admits a resolution that
fails every parse with "Incompatible Language version 15". Reproduced
locally: 61 failures from that error alone.

Floor the runtime at 0.25, the oldest release supporting ABI 15.

This does not change the locked resolution: uv.lock already resolved
tree-sitter to 0.25.2, so the only tree-sitter edit is the recorded
specifier string and all 210 resolved versions stay byte-identical. The
floor had simply lagged the lock.

Re-locking also syncs a pre-existing staleness on v8: the committed
uv.lock records graphifyy 0.9.76 while pyproject.toml says 0.9.77, so
'uv lock --check' already failed before this change. That is not
introduced here; it just becomes consistent as a side effect.

Upstream CI was never red (uv sync --frozen uses the lock). This only
affects installs that resolve from pyproject.toml, such as uv tool
install, pip install graphifyy, and long-lived environments where
grammars get upgraded without the runtime.
@JFWaskin
JFWaskin requested a review from safishamsi as a code owner October 6, 2026 09:24
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

Thanks for the pull request, @JFWaskin. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic.

@graphify-labs graphify-labs Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify reviewed this change.

Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).


Graphify review — findings

Raises the tree-sitter runtime floor from 0.23 to 0.25, so resolvers can no longer pair an ABI-14 runtime with the ABI-15 grammars (e.g. tree-sitter-javascript 0.25). That mismatch made every parse fail with "Incompatible Language version 15". The new floor matches what uv.lock already resolves to, and the lock also picks up the graphifyy 0.9.77 version bump.

No blocking issues surfaced.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 1 function depends on the 1 function this change touches.

Health — grade A; no new coupling hotspots.

Verification — 1 function in the blast radius was not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 1 function(s) in the blast radius were not formally verified this run

Test selection

Test selection

334 of 334 test file(s) selected (100%) via static blast radius.

Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.

  • tests/test_affected_cli.py — full-run-safety
  • tests/test_affected_member_seed.py — full-run-safety
  • tests/test_agents_platform.py — full-run-safety
  • tests/test_analyze.py — full-run-safety
  • tests/test_anthropic_custom_endpoint.py — full-run-safety
  • tests/test_antigravity_install.py — full-run-safety
  • tests/test_apm_fallback_version.py — full-run-safety
  • tests/test_architecture_doc.py — full-run-safety
  • tests/test_astro_extraction.py — full-run-safety
  • tests/test_astro_import_ids.py — full-run-safety
  • tests/test_atomic_canvas_export.py — full-run-safety
  • tests/test_atomic_version_stamp.py — full-run-safety
  • tests/test_atomic_writes.py — full-run-safety
  • tests/test_backend_env_isolation.py — full-run-safety
  • tests/test_backend_extras.py — full-run-safety
  • tests/test_benchmark.py — full-run-safety
  • tests/test_benchmark_raw_graph.py — full-run-safety
  • tests/test_blade_extractor.py — full-run-safety
  • tests/test_build.py — full-run-safety
  • tests/test_build_located_semantic_identity.py — full-run-safety
  • tests/test_build_merge_dedup_scope.py — full-run-safety
  • tests/test_build_merge_hyperedges_and_prune.py — full-run-safety
  • tests/test_build_merge_shrink_guard.py — full-run-safety
  • tests/test_builtin_global_type_refs.py — full-run-safety
  • tests/test_cache.py — full-run-safety
  • tests/test_callflow_html.py — full-run-safety
  • tests/test_cargo_introspect.py — full-run-safety
  • tests/test_cargo_missing_manifest.py — full-run-safety
  • tests/test_carried_hyperedge_remap.py — full-run-safety
  • tests/test_case_sensitive_resolution.py — full-run-safety
  • tests/test_charmap_encoding.py — full-run-safety
  • tests/test_chunking.py — full-run-safety
  • tests/test_cjs_module_extension.py — full-run-safety
  • tests/test_claude_cli_backend.py — full-run-safety
  • tests/test_claude_md.py — full-run-safety
  • tests/test_cli_broken_pipe.py — full-run-safety
  • tests/test_cli_export.py — full-run-safety
  • tests/test_cli_help.py — full-run-safety
  • tests/test_cluster.py — full-run-safety
  • tests/test_cluster_exclude_hubs.py — full-run-safety
  • tests/test_cobol_extractor.py — full-run-safety
  • tests/test_codebuddy.py — full-run-safety
  • tests/test_community_hub_labels.py — full-run-safety
  • tests/test_community_labels_skill.py — full-run-safety
  • tests/test_confidence.py — full-run-safety
  • tests/test_corrupt_graph_json.py — full-run-safety
  • tests/test_cpp_method_declarations.py — full-run-safety
  • tests/test_cpp_nested_and_cli.py — full-run-safety
  • tests/test_cpp_objc_cross_file_calls.py — full-run-safety
  • tests/test_cpp_preprocess.py — full-run-safety
  • … and 284 more

non-code file(s) changed (pyproject.toml, uv.lock) → running the full suite for safety (a code graph can't see config/fixture/data deps)

changed code file(s) with no mapped test (pyproject.toml) — a coverage gap or a missing link — running the full suite rather than only the selected tests

Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.

safishamsi pushed a commit that referenced this pull request Oct 7, 2026
…ars (#4148)

0.23/0.24 cap at ABI 14 while pinned grammars ship ABI 15, so a resolver could
pair a 0.23 runtime with ABI-15 grammars and fail every parse. Floor at 0.25,
the oldest runtime that loads them (uv.lock already resolves there). Lock
regenerated on 0.9.80.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
filipechagas added a commit to lawnstarter/graphify that referenced this pull request Oct 7, 2026
* upstream/v8: (184 commits)
  release: 0.9.80 — include Graphify-Labs#4195, Graphify-Labs#4198
  feat(python): resolve obj.method() through an annotated/constructor-bound local (Graphify-Labs#4198)
  perf(extract): resolve and parse each path once in the id remap and call tie-break
  release: 0.9.80
  fix(deps): raise tree-sitter runtime floor to >=0.25 for ABI 15 grammars (Graphify-Labs#4148)
  fix(build): give --no-cluster graph.json the same endpoint rules as build_from_json
  fix(watch): keep extract()'s run-only keys out of --no-cluster graph.json
  fix(watch): drop an external import stub once no edge references it
  fix(detect): drop a previous checkout's absolute manifest keys (Graphify-Labs#4175)
  fix(python): keep TYPE_CHECKING-only imports out of import cycles (Graphify-Labs#3159)
  fix(python): resolve self.<attr>.<method>() calls through the attribute's constructor type (Graphify-Labs#2860)
  fix(cache): treat an AST hit whose import target is gone as a miss
  fix(extract): preserve cross-drive syntax warnings
  fix(extract): let the Windows console script use the extraction pool
  fix(resolution): keep re_exports from both files whose ids collide
  fix(markdown): resolve links to file names that contain a space
  fix(java): capture methods and calls inside anonymous class bodies
  test: skip optional-extra tests when the extra is not installed (Graphify-Labs#4190)
  fix(serve): show the graph's build commit in graph_stats
  perf(serve): build the MCP traversal view and shortest-path graphs once per graph
  ...

# Conflicts:
#	CHANGELOG.md
#	graphify/extract.py
#	graphify/extractors/engine.py
#	graphify/serve.py
#	pyproject.toml
#	uv.lock
filipechagas added a commit to lawnstarter/graphify that referenced this pull request Oct 7, 2026
* upstream/v8: (184 commits)
  release: 0.9.80 — include Graphify-Labs#4195, Graphify-Labs#4198
  feat(python): resolve obj.method() through an annotated/constructor-bound local (Graphify-Labs#4198)
  perf(extract): resolve and parse each path once in the id remap and call tie-break
  release: 0.9.80
  fix(deps): raise tree-sitter runtime floor to >=0.25 for ABI 15 grammars (Graphify-Labs#4148)
  fix(build): give --no-cluster graph.json the same endpoint rules as build_from_json
  fix(watch): keep extract()'s run-only keys out of --no-cluster graph.json
  fix(watch): drop an external import stub once no edge references it
  fix(detect): drop a previous checkout's absolute manifest keys (Graphify-Labs#4175)
  fix(python): keep TYPE_CHECKING-only imports out of import cycles (Graphify-Labs#3159)
  fix(python): resolve self.<attr>.<method>() calls through the attribute's constructor type (Graphify-Labs#2860)
  fix(cache): treat an AST hit whose import target is gone as a miss
  fix(extract): preserve cross-drive syntax warnings
  fix(extract): let the Windows console script use the extraction pool
  fix(resolution): keep re_exports from both files whose ids collide
  fix(markdown): resolve links to file names that contain a space
  fix(java): capture methods and calls inside anonymous class bodies
  test: skip optional-extra tests when the extra is not installed (Graphify-Labs#4190)
  fix(serve): show the graph's build commit in graph_stats
  perf(serve): build the MCP traversal view and shortest-path graphs once per graph
  ...

# Conflicts:
#	CHANGELOG.md
#	graphify/extract.py
#	graphify/extractors/engine.py
#	graphify/serve.py
#	pyproject.toml
#	uv.lock
@safishamsi

Copy link
Copy Markdown
Member

Thanks @JFWaskin — this is already in place: pyproject.toml pins tree-sitter>=0.25,<0.26, so the runtime floor is already at 0.25 for the ABI 15 grammars. Closing as already-applied.

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.

3 participants