Skip to content

plan: incremental graph rebuild (3-PR sequence)#283

Merged
HumanBean17 merged 3 commits into
masterfrom
plan/incremental-graph
Jun 7, 2026
Merged

plan: incremental graph rebuild (3-PR sequence)#283
HumanBean17 merged 3 commits into
masterfrom
plan/incremental-graph

Conversation

@HumanBean17

Copy link
Copy Markdown
Owner

Summary

  • Adds PLAN-INCREMENTAL-GRAPH.md implementing the approved INCREMENTAL-GRAPH-PROPOSE proposal as a 3-PR landing sequence
  • PR-G1: source_file on all edge tables + FileHashTracker class + ontology bump 16→17
  • PR-G2: Incremental orchestrator with scoped pass 1–4, global pass 5–6, single-hop dependent expansion (cap 50), crash marker safety
  • PR-G3: CLI increment now updates both Lance and graph; --vectors-only preserves old Lance-only behavior

Highlights

  • Delete-and-rebuild strategy scoped to changed files + single-hop dependents
  • Phantom nodes (external types) never deleted by file-scoped logic
  • Crash safety via .graph_increment_in_progress marker + full-reprocess fallback
  • 29 named tests across the three PRs
  • No changes to MCP tools or query API — pipeline change only

Test plan

Plan-only PR. Baseline tests should be unaffected.

🤖 Generated with Claude Code

HumanBean17 and others added 3 commits June 7, 2026 14:48
Adds PLAN-INCREMENTAL-GRAPH.md implementing the INCREMENTAL-GRAPH-PROPOSE
proposal. Three-PR sequence: G1 (edge source_file schema + hash tracker),
G2 (incremental orchestrator with scoped rebuild + dependent expansion),
G3 (CLI integration with --vectors-only flag).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 fixes from code review:
- C1: correct source_file derivation for EXPOSES/DECLARES_CLIENT/DECLARES_PRODUCER
  (must be source Symbol's filename, not target node's)
- C2: add note acknowledging 3-PR divergence from proposal's "Single PR"
- I1: replace source_file_schema BOOLEAN with ontology_version >= 17 check
- I2: add _load_existing_members() before pass 3 for call resolution
- I3: clarify pass 5-6 edge tables are always globally rebuilt, not scope-deleted
- I4: clarify _find_dependents() excludes non-Symbol-to-Symbol edges
- I5: fix "read-only" to "read-write" in incremental_rebuild() step 1
- M1: remove empty _drop_all section
- M2: correct _write_unresolved reference (inlined in _write_edges)
- M3: fix first-column justification (convention, not functional)
- M4: add _populate_declares_rows/_populate_overrides_rows to scoped write

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit 7913117 into master Jun 7, 2026
1 check passed
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