Skip to content

feat(graph): add OCaml tags.scm — call edges for the breadth tier - #200

Open
Frankie-Xu wants to merge 5 commits into
trailhq:mainfrom
Frankie-Xu:feat/ocaml-tags-scm
Open

Frankie-Xu wants to merge 5 commits into
trailhq:mainfrom
Frankie-Xu:feat/ocaml-tags-scm

Conversation

@Frankie-Xu

@Frankie-Xu Frankie-Xu commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add OCaml breadth-tier tags for parameterized let / let rec, fun / function bindings, modules, types, and application calls. Individual binding scopes preserve mutually recursive functions and grouped types/modules, so later symbols and their call owners are retained.

Fixes #197.

Validation

  • Before/after exact-source probes demonstrate the original missing OCaml bindings and incorrect call ownership, then the corrected behavior.
  • Regression coverage: mutually recursive functions and both call directions; grouped type/module symbols and individual spans.
  • Normal merge of current upstream main (fe30ead39d5e6f0c921018d364da2bdbc9d4b3ad) preserves current language registry and existing tests.
  • Node 24.18.1 focused OCaml regression tests: 3 pass, 0 fail. Local npm ci including the full npm run build passed.
  • Official CI is green on head 2ab801e: full Ubuntu/Windows suites and prepare/build, Node 24 WASM regression, CodeQL analyze/result, blast, and publish. The duplicate queued local affected suite was cancelled before execution.
  • Align CodeQL init/analyze to v4.38.1, reusing the single-line CI repair verified on fix(llm): recover bare arrays and truncated JSON from gateway content (#253) #269.

Scope

Bare value bindings and infix operators (|>, @@, etc.) remain outside this query. This uses the bundled OCaml implementation grammar; it adds no separate interface grammar or receiver typing.

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🌱 graft blast radius

Nothing outside this diff depends on it. 1 area changed; no indexed dependents at depth 2.
Tests: no test reaches Graph Scope Definition.
Tag: @shhdwi — Graph Scope Definition

Who knows this code — 1 person across 1 area
Area Who knows it
Graph Scope Definition · changed @shhdwi — 7 commits, last 2mo ago

Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no @ has no GitHub handle in its commit email — tag them by hand, or add a .mailmap entry. A suggestion from history, not a CODEOWNERS rule.

Test signal per changed area — 1 ✗

Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.

  • ✗ Graph Scope Definition — 0 of 1 reached · no test file reaches it
    • not reached: defScope

⚠️ 2 changed files not in the graph (.github/workflows/codeql.yml, src/graph/queries/ocaml.scm) — no parser claims the extension, or the index predates the file.

graft blast · origin/main...HEAD · depth 2 · 4 changed files

Open the interactive graph → — click an area to see its dependent symbols at file:line.

github-actions Bot added a commit that referenced this pull request Aug 25, 2026
github-actions Bot added a commit that referenced this pull request Aug 25, 2026
@Frankie-Xu
Frankie-Xu marked this pull request as draft August 26, 2026 09:49
@Frankie-Xu

Copy link
Copy Markdown
Contributor Author

Rebased onto current main. Kept the existing PHP wasm / throwing-grammar tests and layered the OCaml tags.scm fixture on top. Waiting on CI before marking ready.

github-actions Bot added a commit that referenced this pull request Sep 11, 2026
@Frankie-Xu
Frankie-Xu marked this pull request as ready for review September 11, 2026 12:57
@Frankie-Xu

Copy link
Copy Markdown
Contributor Author

Rebased onto current main. CI is green. Ready for review.

Ercaner1988 added a commit to Ercaner1988/Graft that referenced this pull request Sep 12, 2026
- generic-extract.test.ts: the union merge of trailhq#196, trailhq#200 and trailhq#201 spliced
  their appended tests into one another and left the file unterminated.
  Rebuilt as trailhq#196's file plus trailhq#200's and trailhq#201's appended blocks verbatim.
- The trailhq#139 test asserted that a cached parse failure is replayed without a
  re-parse; trailhq#317 (fixes trailhq#312) deliberately re-parses it instead and did not
  update the test. It now asserts the re-parse and that the error still
  comes back.
- The trailhq#319 symlink test (trailhq#328) needed symlink privilege on Windows. Directory
  links are junctions there, as test/graph-root and test/ingest-fs already
  do, and the file-link case is skipped with a diagnostic when it cannot be
  created.

Co-Authored-By: Claude Opus 5 <[email protected]>
github-actions Bot added a commit that referenced this pull request Oct 7, 2026

This branch has not been deployed

No deployments
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.

ocaml/zig: no tags.scm — symbols come from the node-kind walker fallback, call edges are absent

1 participant