Skip to content

feat(graph): add Godot edge subkind, impact target/verify-plan, orphan confidence#88

Merged
sunerpy merged 1 commit into
mainfrom
feat/godot-audit-edge-subkind
Jun 28, 2026
Merged

feat(graph): add Godot edge subkind, impact target/verify-plan, orphan confidence#88
sunerpy merged 1 commit into
mainfrom
feat/godot-audit-edge-subkind

Conversation

@sunerpy

@sunerpy sunerpy commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

Six CLI/static-graph improvements from the v0.18.0 Godot feedback:

  • #1a impact target — every audit --impact --json affected row now echoes the changed path as target.
  • #1b finer edgeSubkind — a new STRUCTURAL label (not a domain label) distinguishing the otherwise-opaque references/instantiates edges a .tscn/.tres parser emits: script_attach, scene_instance, ext_resource, group_member, signal_method (and a reserved gdscript_load_path, deferred — no emit site today). Rides a new nullable unresolved_refs.reference_subkind column + edge.metadata.subkind, mirroring the existing fnRef channel. EdgeKind is NOT extended.
  • chore(main): release 0.1.0 #2 orphan confidenceaudit --orphans rows gain reason/confidence/note; godot resources/scenes are flagged confidence: "low" with a data-driven caveat (they may be referenced by numeric ids / DSL paths static analysis doesn't follow).
  • chore(main): release 0.1.0 #3 empty-impact note — when impact is empty for a godot resource/script, output explains numeric-id/DSL refs aren't included by default.
  • chore(main): release 0.1.0 #4 --verify-planaudit --impact X --verify-plan derives a static verification plan (loadScripts/openScenes/reasons) for Codex/CI/Godot MCP Pro to consume.

All strictly within CodeGraph's deterministic static-graph scope — no Godot runtime, no ResourceLoader, no WorldFlipper business semantics, no NL queries.

Schema bump (deliberate, isolated)

Adds unresolved_refs.reference_subkind TEXT (schema v5→v6, forward/idempotent/non-destructive ALTER). Governed by two rules that keep golden byte-stable:

  • G1: canonicalize omits the key when NULL → existing non-Godot canonical rows stay byte-identical.
  • G2: column added LAST (matching ALTER append) → fresh-create and migrated DBs render identical .schema.

The ONLY golden delta is the pinned .schema change (+1 line each in colby.schema.sql / mini/schema.sql) + the migrated mini/colby.db. No node/edge/unresolved/files canonical-row change.

Verification

  • make ci green (fmt + clippy -D warnings + workspace test + guardrail)
  • cargo test -p codegraph-bench green (golden oracle + sync equivalence)
  • v5→v6 migration test (old_v5_database_migrates_to_v6_without_data_loss) + fresh-vs-migrated .schema parity test pass
  • Hands-on QA: real Godot fixture — edgeSubkind/target/verify-plan/orphan-confidence/empty-note all correct
  • Final Verification Wave: F1 (goal/constraint) + F2 (code quality) + F3 (golden/invariant) all APPROVE

Downstream-only (no upstream colby analogue; v1.1.2 unrelated).

…n confidence

Surface six audit-CLI consumability improvements for Godot projects.

Batch 1 (golden-neutral, CLI-only):
- audit --impact: echo the changed path as `target` on every affected row,
  and emit a boundary `note` when impact is empty for a Godot resource/script
  path (data-driven numeric-id / DSL refs are not followed statically).
- audit --orphans: add static `reason`/`confidence`/`note` (confidence "low"
  for Godot resource/scene files, else "high").
- audit --verify-plan: derive a load/open plan (loadScripts/openScenes/reasons)
  from the impact result.

Batch 2 (deliberate schema v5->v6 + golden bump):
- New structural ReferenceSubkind enum (script_attach, scene_instance,
  ext_resource, group_member, signal_method, gdscript_load_path) threaded
  RefView -> UnresolvedRef -> store -> resolver edge.metadata.subkind ->
  resource_impact edgeSubkind. GdscriptLoadPath is reserved (no emit site yet).
- New nullable unresolved_refs.reference_subkind column (added LAST), forward
  idempotent migration, single named-access read mapper.
- Canonicalize omits the key when NULL so existing rows stay byte-identical;
  the only golden delta is the .schema column add (+ schema_versions v6).

EdgeKind is unchanged; subkind is orthogonal metadata. No domain semantics.
@sunerpy sunerpy merged commit 270a5e6 into main Jun 28, 2026
4 checks passed
@sunerpy sunerpy deleted the feat/godot-audit-edge-subkind branch June 28, 2026 09:01
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