Skip to content

feat: complete Godot static-graph reverse edges and add CLI explore/node - #133

Merged
sunerpy merged 1 commit into
mainfrom
feat/godot-static-graph-and-cli-explore-node
Jul 10, 2026
Merged

sunerpy merged 1 commit into
mainfrom
feat/godot-static-graph-and-cli-explore-node

Conversation

@sunerpy

@sunerpy sunerpy commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses the four gaps from the Godot-team liaison doc (rev 25), all verified still-broken on 0.28.3 against a real Godot project, all confirmed static-analysis / tool-consistency concerns (no WorldFlipper DSL or runtime semantics).

  1. String-form signal callbacks — X.connect("sig", callback.bind(...)) now enters callers. scan_connect classifies the SECOND arg as the handler via the existing connect_handler/split_bind_head/callable_handler (no fork, no new subkind), matching the object-form .connect(cb.bind()).
  2. Resource reverse-impact — load/preload("res://X.tscn") resolves to an imports edge on the loader, and .tscn/.tres have no file node, so affected/audit --impact <resource> missed the loader. resource_impact + a new dependent_file_paths_via_import_name now also consult imports edges whose target import node normalizes (strip res://) to the changed resource. Query-side, no new subkind, golden-neutral. (The doc's original "add to allow-list" premise was wrong — those refs resolve to edges and leave unresolved_refs; corrected via first-diagnose.)
  3. Main-scene UID — parse the .tscn uid="uid://..." header into a deterministic uid→path map (sorted, first-write-wins); project.godot run/main_scene="uid://..." resolves to the scene file and enters its reverse impact, via the same untagged References path as the res:// form.
  4. CLI parity — add codegraph explore and codegraph node subcommands reusing the MCP ExploreSubgraph engine (no fork), so the shell fallback the tool hint documents actually exists. MCP dispatch and tools/list unchanged.

Verification

  • make ci green (fmt + clippy + test + guardrail + equivalence 10/10).
  • Golden .schema byte-stable — the shipped godot fixture has no string-connect / run/main_scene / uid://, so extraction output is unchanged; no regen. tools_list golden unchanged.
  • Real godot-project: all four probes confirmed (callers non-empty; impact/affected/audit list the loader; audit lists project.godot as main-scene referrer; explore/node return output).
  • Independent oracle review: APPROVE (0 blocker/major) — determinism, no double-count, no scope creep.

Scope: static extraction / query-side reverse-dependency / CLI only. No exclusion-list domains touched.

Addresses four gaps reported by the Godot-team liaison doc, all verified
still-broken on 0.28.3 and confirmed static-analysis / tool-consistency
concerns (no WorldFlipper DSL or runtime semantics).

- Signal callbacks: the string-form `X.connect("sig", callback.bind(...))`
  now enters callers. `scan_connect` classifies the SECOND argument as the
  handler (via the existing connect_handler/split_bind_head/callable_handler),
  matching the object-form `.connect(cb.bind())` behavior. No new subkind.

- Resource reverse-impact: `load/preload("res://X.tscn")` resolves to an
  imports edge whose node lives on the loader, and .tscn/.tres have no file
  node, so `affected`/`audit --impact` missed the loader. resource_impact and
  a new dependent_file_paths_via_import_name now also consult imports edges
  whose target import node normalizes to the changed resource. Query-side,
  golden-neutral, no new subkind.

- Main-scene UID: parse the .tscn `uid="uid://..."` header into a
  deterministic uid->path map (sorted, first-write-wins) so
  `project.godot run/main_scene="uid://..."` resolves to the scene file and
  enters its reverse impact, via the same untagged References path as the
  res:// form.

- CLI parity: add `codegraph explore` and `codegraph node` subcommands that
  reuse the MCP ExploreSubgraph engine (no fork), so the shell fallback the
  tool hint documents actually exists. MCP dispatch and tools/list unchanged.

Golden .schema byte-stability preserved (the shipped godot fixture has no
string-connect / run/main_scene / uid://, so extraction output is unchanged);
equivalence and tools_list goldens untouched.
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.32143% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...es/codegraph-resolve/src/frameworks/godot_scene.rs 93.51% 7 Missing ⚠️
crates/codegraph-cli/src/main.rs 97.61% 2 Missing ⚠️
crates/codegraph-graph/src/graph/mod.rs 88.88% 2 Missing ⚠️
...s/codegraph-resolve/src/frameworks/godot_script.rs 99.07% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #133      +/-   ##
==========================================
+ Coverage   95.63%   95.65%   +0.01%     
==========================================
  Files         115      115              
  Lines       55348    55790     +442     
==========================================
+ Hits        52934    53364     +430     
- Misses       2414     2426      +12     
Files with missing lines Coverage Δ
crates/codegraph-mcp/src/engine.rs 97.54% <100.00%> (+<0.01%) ⬆️
crates/codegraph-resolve/src/frameworks/godot.rs 86.36% <100.00%> (+0.09%) ⬆️
.../codegraph-resolve/src/frameworks/godot_project.rs 97.87% <100.00%> (+0.66%) ⬆️
crates/codegraph-store/src/queries.rs 98.43% <100.00%> (+0.03%) ⬆️
...s/codegraph-resolve/src/frameworks/godot_script.rs 99.76% <99.07%> (-0.11%) ⬇️
crates/codegraph-cli/src/main.rs 89.22% <97.61%> (+0.19%) ⬆️
crates/codegraph-graph/src/graph/mod.rs 95.29% <88.88%> (-0.09%) ⬇️
...es/codegraph-resolve/src/frameworks/godot_scene.rs 96.90% <93.51%> (-1.18%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sunerpy
sunerpy merged commit 158a1e0 into main Jul 10, 2026
7 checks passed
@sunerpy
sunerpy deleted the feat/godot-static-graph-and-cli-explore-node branch July 10, 2026 11:18
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.

1 participant