Skip to content

fix: integrate reviewed indexing, SCIP, and diagnostic fixes - #1766

Merged
Shashankss1205 merged 27 commits into
mainfrom
maintenance/reviewed-fixes-20261015
Oct 15, 2026
Merged

Shashankss1205 merged 27 commits into
mainfrom
maintenance/reviewed-fixes-20261015

Conversation

@Shashankss1205

Copy link
Copy Markdown
Collaborator

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.

Shashankss1205 and others added 27 commits September 27, 2026 16:40
…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.
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.
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
code-graph-context-pack Ready Ready Preview Oct 15, 2026 10:51am UTC

@github-project-automation github-project-automation Bot moved this to Backlog tasks in CGC Progress Board Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi! 👋 Join our CodeGraphContext Discord channel to collaborate: https://discord.gg/dR4QY32uYQ

@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Code Graph Analysis

fix: integrate reviewed indexing, SCIP, and diagnostic fixes (#1766)

📊 Interactive Visualization

View the blast radius graph: PR Reviewer Dashboard

📦 Artifacts

The graph JSON has been uploaded as a build artifact: pr-code-graph-1766


Generated by CodeGraphContext using FalkorDB Lite

Shashankss1205 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator Author

Review of all 37 PRs open at the start of this pass

Final 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.

PR Evaluation and disposition
#642 Hold: conflicts with current pipeline; original author reported no time. Port import resolution rather than restoring the old graph-builder layout.
#667 Hold: conflicts; five unrelated features lack focused current-server tests.
#766 Hold: contributor draft; backend scope, maintenance and full parity remain unsettled.
#781 Hold: conflicts across CI, packaging and website; regenerate focused cleanups on current main.
#811 Hold: conflicts; separate MCP framing, FTS and systemd/deployment work.
#1013 Changes requested: random/hard-coded values are still labeled live telemetry.
#1052 Hold: contributor draft; reconcile worker resolver with #1741 before readiness/CI.
#1243 Changes requested: unclosed mobile-menu wrapper, plus unrelated lockfile/dependency churn.
#1298 Changes requested: File has no uid; repository scope missing from queries/traversals; real-backend tests needed.
#1302 Hold: broad backend migration conflicts with current native probing; needs an explicit migration/maintenance decision.
#1637 Changes requested on updated head: location/fences fixed, but incomplete translation, stale backend wording and broken relative references remain.
#1723 Merged via #1777: constructor targets included; recursive paths work on native Kuzu/Ladybug; scoped and exact paths normalize for Windows. The unrelated overload monkey-patches were omitted; #1724 remains separate.
#1724 Changes requested: runtime method monkey-patching and untested response/schema changes.
#1728 Hold: deferred subsystem/scope decision and old red parity checks; retain default-off design.
#1729 Merged: exact diff removes one duplicated CSS comment, with no behavior change.
#1733 Hold: contributor draft; role-file sandboxing, precedence, distribution and neutral default require readiness review.
#1736 Hold: contributor draft; snapshot identities/moves and independent integration need validation.
#1737 Merged: native-engine probe validated locally and by Windows/macOS/Linux + strict parity CI.
#1739 Merged via #1766: explicitly allowlisted read-only embedded introspection; mutating CALLs remain rejected.
#1740 Merged via #1766: C# (+N) overload recognition and line-specific augmentation.
#1741 Merged via #1766: shared, bounded worker config. Does not mark draft #1052 ready.
#1742 Merged via #1766: SCIP kind numbers follow the schema rather than incompatible hard-coded enum values.
#1743 Merged via #1766: modern typed ranges with legacy encoding compatibility and regenerated schema.
#1747 Merged via #1766: serving-loop singleton creation; callers await get_server().
#1748 Merged via #1771: corrected the portable fixture, optimized Kuzu node/relationship batches, retained conservative Ladybug writes and added native subprocess coverage. Writer/identity tests and strict parity CI pass.
#1749 Merged via #1766: replacement setup documents exist and obsolete references are removed.
#1751 Merged via #1772: integrated SDK 2 Streamable HTTP with #1747's awaited serving-loop binding. All 45 API tests pass locally; legacy SSE, auth/Origin checks and current grammar pin are preserved. Stdio consolidation stays in #1750.
#1752 Merged via #1766: HCL parser registration, literal imports, ignores, toolkit, fixture/golden and smoke coverage.
#1753 Merged via #1766 after contributor revision: redact offending spans in multiline bodies while retaining entropy detection; keep #1760 identity exemptions.
#1756 Merged via #1766: optional configurable provider and request-shape/default regression coverage; existing precedence preserved.
#1757 Merged: actual component passed delayed lazy-route, duplicate-click, completion and Back-reset checks; production build passes.
#1759 Merged via #1766: bounded traceback/error_type, backward-compatible errors[0], and failure serialization/tests.
#1760 Merged: identity keys preserved; source/docstring/value remain scanned.
#1761 Merged: supported-parser startup errors retain causes and fail instead of reporting hollow success.
#1762 Merged: strict containment identity/count gate and retained diagnostics; no deficit allowance.
#1763 Merged to its original dependency branch; the same commits reached main through #1766.
#1764 Merged via #1766: updates Chinese README structure/content and corrects relative documentation links.

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:

PR Delivered behavior
#1775 Project dotenv discovery stops at the working directory; closes #1099.
#1776 Reviewed optional API Route provider from newly arrived #1774; contributor commit retained.
#1777 Reviewed constructor/recursive query repair from #1723, including repository boundaries, native portability and Windows paths.
#1778 Unique MyBatis namespace → Java source resolution and fqn-keyed ORM table writes, with datasource backfill/preservation; closes #890.
#1779 Working contribution page/footer links, canonical guideline source and testing-guide links; closes #1227.
#1780 Readable comparison badge hover colors and active GitHub/GitLab tab feedback; closes #1237 and #1303.

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.

Copy link
Copy Markdown
Collaborator Author

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 Shashankss1205 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

@Shashankss1205
Shashankss1205 merged commit ee8a67d into main Oct 15, 2026
22 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

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.

This branch was successfully deployed

1 active deployment
Preview — 80f485c1 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment