Repository navigation
fix: integrate reviewed indexing, SCIP, and diagnostic fixes - #1766
Conversation
…lowlist #1735 inverted the read-only guard to a CALL allowlist, but listed only Neo4j db.* procedures, so `cgc query "CALL show_tables() RETURN *"` stopped working on Kùzu, the default backend. Adds Kùzu/LadybugDB's read-only table functions; config-setting CALLs and FTS index create/drop stay rejected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
scip-dotnet names method overloads Type#M()., Type#M(+1)., Type#M(+2). and reports kind 0 for all of them. ScipIndexParser keeps only the first overload as a definition and names the rest, and calls to them, M(+1) / M(+2). Occurrences are copied from real scip-dotnet output over a three-overload fixture. Co-Authored-By: Claude Sonnet 5 <[email protected]>
…rom names scip-dotnet disambiguates method overloads as Type#M(+N). and reports kind 0. The kind-0 fallback matched only the '().' suffix, so every overload but the first was dropped as a definition. _name_from_symbol stripped '()' but not '(+N)', so calls to those overloads were named 'M(+1)'. A callable descriptor is now '().' or '(+N).'. Parameter descriptors such as 'M(+1).(x)' are unaffected. The C++ zero-kind inference is unchanged. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Indexing and the file watcher were resolving the same setting separately, so a large config could spawn an unbounded thread pool during a full index. Co-authored-by: Cursor <[email protected]>
…erload With (+N) overloads recognised, a C# file holds two `M` nodes. The SCIP nodes arrive with args == [] (scip-dotnet leaves display_name empty), and C# call records carry no arguments, so the Tree-sitter resolver resolves neither `M()` nor `M(1)`. Only the SCIP file-level edges remain. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hfh5zciucKoUGUdKjq3GwV
- The SCIP pipeline matches a SCIP function to its Tree-sitter twin by (name, line) instead of name alone, and fills empty `args` from it. - The C# Tree-sitter parser records a call's arguments instead of a hard-coded empty list. The existing arity check can then tell M() from M(int). Both calls resolve Caller -> M to the matching overload again. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Hfh5zciucKoUGUdKjq3GwV
ScipIndexParser treated kind 18 as Enum, 20 as Interface and 54 as Protocol. In scip.proto those are Getter, Instance and Type; Enum is 11, Interface 21 and Protocol 42. Producers that report real kinds therefore lost their interfaces, enums and protocols (scip-go's Reader interface, kind 21, was dropped), while a getter was filed as an enum. The kinds CGC infers for producers that report 0 used the same old numbers (C/C++ enum 18, source-detected interface 20), so they move to the schema values too: routing now has one numbering for both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Current SCIP producers such as scip-go write an occurrence's position only in the typed `single_line_range` / `multi_line_range` fields (and the enclosing range in `*_enclosing_range`); the repeated-int `range` and `enclosing_range` fields are deprecated. The bundled scip_pb2 predated the typed fields, so for scip-go every definition got line 0 and every reference was dropped, which also dropped all SCIP call edges. Regenerate scip_pb2.py from scip-code/scip@08b592d with protoc 3.20.3, which matches the pinned protobuf runtime (>=3.20,<3.21), and read every range through one helper: the typed form when present (it takes precedence per the schema), otherwise the deprecated list. Indexes that only use the deprecated fields parse exactly as before. Co-Authored-By: Claude Opus 5.5 <[email protected]>
get_server() was a sync FastAPI dependency and ran in the threadpool, where MCPServer found no running loop and fell back to a fresh one nobody runs. Index jobs scheduled onto it with run_coroutine_threadsafe stayed pending forever whenever the first request to the gateway was a REST call. Make the dependency async and pass the running loop explicitly; await it in the two SSE handlers. Adds a regression test that fails on main. Closes #1744
Neither GraphBuilder.parsers nor the generic-extension set knows .tf, .tfvars or .hcl, so discovery drops them before a parser is chosen and an infrastructure repository indexes to nothing. Blocks become Class nodes under their Terraform address, variable/output/locals/inputs become Variable nodes, and literal module sources, includes and dependency paths become imports. Imports merge into Module nodes by name alone, which is why an unresolved expression is not an import and a reference relative to its own file is resolved. .terraform and .terragrunt-cache join the default ignore patterns for the same reason node_modules is there.
…he whole property The entropy fallback flags any string of 16+ characters containing one of ten common words at 3.8 bits, which ordinary source clears: on one graph 10,598 of 14,765 Class bodies and 19,353 of 98,706 Function bodies were stored as [REDACTED], and a redacted body is also invisible to the full-text index. A multi-line value is now scanned per line. Regex coverage is unchanged: patterns are written with \\s, which matches a newline, so the whole value is still checked and redacted wholesale when a pattern spans lines, whatever the line pass found. Key blocks go BEGIN to END. Three credential names with no name-anchored pattern get one. Nothing replaces entropy for a body, which the pull request states as a reduction.
…erraform and Terragrunt
A value counted as a string literal when its text started and ended with a quote, which also holds for `"../a" == "" ? "../b" : "../c"`, so such an expression became an import of a path nobody wrote. Strings are now read from the tree: a quoted string or template, or a heredoc. A heredoc `description` therefore becomes the docstring too, which is how longer Terraform variable descriptions are usually written.
Terragrunt's `dependencies { paths = [...] }` becomes one import per literal path, a bare identifier label counts as a label, and `ephemeral` blocks get their Terraform address. Resolved paths are checked with Path.is_absolute so the tests hold on Windows, where as_posix() yields "C:/...".
…es in the global defaults Every Terraform root module has a .terraform.lock.hcl beside it. It is provider hashes, not code, but its `provider "registry.terraform.io/..."` blocks indexed as one Class per stack: 645 lock files against 1,365 hand-written .hcl files on one estate. `*.lock.hcl` follows the existing `*.ext` form of the default list. .terraform/ and .terragrunt-cache/ were only in DEFAULT_IGNORE_PATTERNS, so the global .cgcignore written by `ensure_global_cgcignore` lacked them; obj/ already sits in both lists for the same reason.
…yout The fixture now has a local module consumed from both Terraform and Terragrunt, a Terragrunt root with live/ stacks, `dependency` and `dependencies` paths, a heredoc description and a lock file that must not be indexed. Its `dependency` previously pointed at ../vpc, outside the project: a resolved path there is machine-specific, so it could not appear in a golden. Every relative reference now stays inside the project, and the bundle export rewrites those to ./-relative names.
HCL joins the per-language toolkits behind Advanced_language_query, and contributing_languages documents which labels, properties and relationships HCL writes, the way the other languages' sections do. The Kuzu smoke test indexes the sample project through GraphBuilder and checks that node_type, value and docstring land in the embedded backend's declared columns, that the lock file is skipped, and that a local module imported from Terraform and from Terragrunt meets on one Module node whose name equals its Directory.path.
Generated with `pytest tests/integration/test_parser_goldens.py -k sample_project_hcl --update-goldens` on FalkorDB Lite, like the Kotlin golden: 37 nodes and 38 edges, covering every block as a Class under its Terraform address, variables, outputs, locals, inputs and tfvars as Variables, and IMPORTS for the registry modules, the local module (from main.tf and from live/app) and the live/vpc dependency. The absolute repo root inside each `uid` is normalised to <REPO_ROOT>; `uid` is volatile and never compared. The fixture's .cgcignore is the one indexing writes, as for the other sample projects. The golden also passes from a copy of the repository at a different absolute path, and against tree-sitter-language-pack 1.6.0, the declared floor.
…eeping entropy coverage
Preserve sequential SCIP cancellation checks and bounded failure tracebacks; combine HCL parser registration and secret-body redaction with identity safety. Original contributor commits are retained as merge parents.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ |
🔍 PR Code Graph Analysisfix: integrate reviewed indexing, SCIP, and diagnostic fixes (#1766) 📊 Interactive VisualizationView the blast radius graph: PR Reviewer Dashboard 📦 ArtifactsThe graph JSON has been uploaded as a build artifact: Generated by CodeGraphContext using FalkorDB Lite |
Review of all 37 PRs open at the start of this passFinal disposition: 22 original PRs merged; 15 left open with the blockers below. Contributor commits for the integration set are retained as parents. Drafts remain drafts.
All 93 initially open issues received individualized technical/status comments. There are now 74 open issues; completed items were closed only after verification. The first pass merged #1766 (maintenance integration), #1767 (origin URL / #1230), #1768 (GitLab bundles / #1234), #1769 (safe rejection audit / #1233), #1770 (remote Falkor retry / #1222), #1771 (portable batching), #1772 (MCP transport), and #1773 (Ladybug numeric identity corruption / #1730). #1765 was closed as a duplicate landing PR after its commits reached main through #1766. The continuation merged six more follow-ups:
Also verified the earlier worker-resolution (#1732) and scan-feedback (#1447) fixes on main and closed both issues. Seven additional issues were closed in this continuation. The remaining fifteen original PR heads were unchanged during this pass; their blockers above still apply. Latest combined validation: 1,828 unit + integration tests passed, 8 skipped, using the documented fast suite. The combined production website build and actual React component loading/error/navigation/hover checks pass. Native regressions exercise Kuzu/Ladybug graph queries and ORM edges; Neo4j/Falkor entity tests preserve relationship properties. Every follow-up PR head passed CI before merging, including Python 3.12–3.14, platform E2E, strict four-backend parity, lint/security and packaging where applicable. Website preview deployments succeeded. No parity allowances or license changes were introduced. The earlier expanded native Kuzu/Ladybug fixture validation also matched exact node/relationship counts and CONTAINS endpoint identities. Previously corrupted Ladybug indexes and repositories with missing MyBatis/ORM links require a force reindex after upgrading; see TROUBLESHOOTING.md. #1750 stays open for separate stdio-dispatch consolidation. |
|
Local validation update: all unit tests pass on the combined tree — 1,652 passed, 8 skipped. Wheel and source-distribution builds pass. Dedicated transport integration (#1772) passes all 43 API tests under MCP 2.3; batching follow-up (#1771) passes 65 writer/identity tests with one skip. Strict four-backend parity, platform E2E, lint, packaging, CodeQL and graph-analysis checks pass on this PR; the three Python build/test jobs are still running. No failed check is being waived. |
Shashankss1205
left a comment
There was a problem hiding this comment.
Final source review complete. The combined tree preserves identities during body redaction, all current grammar pins, sequential graph writes, cancellation boundaries and both diagnostics sections. 1,652 unit tests pass locally (8 skips); source/wheel builds pass; Chinese README has no missing relative links. Current CI passes strict four-backend parity, all platform E2E, lint, CodeQL, packaging, graph analysis and the Python 3.14 build/test job. Awaiting completion of the remaining Python build jobs before merge.
|
Merged to main after every current-head check completed successfully, including Build Test on Python 3.12/3.13/3.14 and strict four-backend parity. The original included PRs were automatically marked merged with their commits preserved. #1765 was closed as the duplicate liveness landing path. The separately reviewed #1729 and #1757 are also merged. Remaining new issue fixes and the transport/batching follow-ups keep their own CI gates. |
Indexing can leave gateway jobs pending, block health requests, lose failure diagnostics, or misread modern SCIP symbols. This integrates the reviewed fixes and resolves their overlapping files while retaining every original contributor commit.
Included PRs: #1739 (read-only introspection), #1740 (C# overloads), #1741 (worker config), #1742/#1743 (SCIP kinds/ranges), #1747 (gateway loop), #1749 (setup links), #1752 (HCL), #1753 (body redaction), #1756 (configurable inference provider), #1759 (bounded tracebacks), #1763/#1765 (gateway responsiveness), #1764 (Chinese README).
Conflict resolutions retain both SCIP cancellation checks and traceback logging, both troubleshooting sections, current parser registration, and identity exemptions alongside span-based redaction. No draft or scope-deferred feature is included.
Validation: 39 focused regressions passed before expanding the candidate. Full unit/integration validation and this PR's platform/parity workflows are in progress; results will be posted before merge. The combined tree is used to validate contributor changes whose individual workflows await authorization.
Closes #1744.
Closes #1745.
Closes #1755.
Closes #1092.