docs: promote #83 and #71 to Tier 0 in backlog#470
Conversation
Expand the deferred Phase 3 items into a dedicated phase after TypeScript Migration with detailed descriptions for each sub-item: event-driven pipeline, unified engine strategy, subgraph export filtering, transitive confidence, query caching, config profiles, pagination standardization, and plugin system. Renumber subsequent phases 5-9 → 6-10 with all cross-references updated.
Add openRepo() utility that accepts an injected Repository instance or falls back to SQLite, enabling tests to bypass the filesystem entirely. - Add openRepo(dbPath, opts) to src/db/connection.js - Make findMatchingNodes and buildDependencyGraph polymorphic (accept db or Repository via instanceof check) - Refactor triageData, sequenceData, communitiesData to use openRepo - Convert triage, sequence, communities test fixtures to createTestRepo() fluent builder (sequence dataflow tests stay on SQLite) - Mark ROADMAP 3.13 InMemoryRepository migration item complete Impact: 10 functions changed, 11 affected
Impact: 2 functions changed, 18 affected
Add new Phase 4 covering the port of JS-only build phases to Rust: - 4.1-4.3: AST nodes, CFG, dataflow visitor ports (~587ms savings) - 4.4: Batch SQLite inserts (~143ms) - 4.5: Role classification & structure (~42ms) - 4.6: Complete complexity pre-computation - 4.7: Fix incremental rebuild data loss on native engine - 4.8: Incremental rebuild performance (target sub-100ms) Bump old Phases 4-10 to 5-11 with all cross-references updated. Benchmark evidence shows ~50% of native build time is spent in JS visitors that run identically on both engines.
Greptile SummaryDespite being titled a docs-only PR, this change bundles two distinct bodies of work: (1) a significant ROADMAP.md restructuring that inserts a new Phase 4 — Native Analysis Acceleration and renumbers all downstream phases, and (2) a substantial code refactoring that migrates Key observations:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Caller as Feature (communities / sequence / triage)
participant openRepo as openRepo()
participant Repo as Repository (interface)
participant SQLite as SqliteRepository
participant InMem as InMemoryRepository
Caller->>openRepo: openRepo(dbPath, opts)
alt opts.repo is set
openRepo-->>Caller: { repo: opts.repo, close: noop }
else open SQLite
openRepo->>SQLite: new SqliteRepository(db)
openRepo-->>Caller: { repo: SqliteRepository, close: db.close }
end
Caller->>Repo: repo.findCallees(id)
Repo-->>Caller: callee rows
Note over Caller,SQLite: sequence.js dataflow path only
Caller->>SQLite: instanceof SqliteRepository check
Caller->>SQLite: repo.db.prepare(...) — raw SQL
SQLite-->>Caller: dataflow rows
|
docs/roadmap/ROADMAP.md
Outdated
| **Depends on:** 6.4 (`risk_score`, `complexity_notes`), 6.5 (module summaries) | ||
| **Depends on:** 7.4 (`risk_score`, `complexity_notes`), 7.5 (module summaries) | ||
|
|
||
| ### 10.6 -- Auto-generated Docstrings |
There was a problem hiding this comment.
Missed section renumber
Phase 10 was renumbered to Phase 11 throughout the file, but this subsection heading was left as 10.6 instead of 11.6. All other subsections under Phase 11 (11.1–11.5) were updated correctly.
| ### 10.6 -- Auto-generated Docstrings | |
| ### 11.6 -- Auto-generated Docstrings |
There was a problem hiding this comment.
Fixed in ed1d34d. The subsection heading was renumbered from 10.6 to 11.6 — it belongs under Phase 11 (Interactive Visualization & Advanced Features), not Phase 10.
| if (minConfidence != null) { | ||
| edges = db | ||
| .prepare("SELECT source_id, target_id FROM edges WHERE kind = 'calls' AND confidence >= ?") | ||
| .all(minConfidence); | ||
| if (isRepo) { | ||
| // minConfidence filtering not supported by Repository — fall back to getCallEdges | ||
| edges = dbOrRepo.getCallEdges(); | ||
| } else { | ||
| edges = dbOrRepo | ||
| .prepare("SELECT source_id, target_id FROM edges WHERE kind = 'calls' AND confidence >= ?") | ||
| .all(minConfidence); | ||
| } |
There was a problem hiding this comment.
minConfidence silently ignored for Repository path
When dbOrRepo is a Repository and minConfidence is set, the code falls back to getCallEdges() with no filtering — returning all call edges regardless of confidence. The comment acknowledges this, but callers (e.g. viewer.js, export.js) pass minConfidence expecting it to filter low-confidence edges. This means Repository-backed graphs will include edges that would be excluded in the SQLite path.
Consider filtering in JS after fetching:
| if (minConfidence != null) { | |
| edges = db | |
| .prepare("SELECT source_id, target_id FROM edges WHERE kind = 'calls' AND confidence >= ?") | |
| .all(minConfidence); | |
| if (isRepo) { | |
| // minConfidence filtering not supported by Repository — fall back to getCallEdges | |
| edges = dbOrRepo.getCallEdges(); | |
| } else { | |
| edges = dbOrRepo | |
| .prepare("SELECT source_id, target_id FROM edges WHERE kind = 'calls' AND confidence >= ?") | |
| .all(minConfidence); | |
| } | |
| if (isRepo) { | |
| // Repository has no minConfidence param — filter in JS | |
| edges = dbOrRepo.getCallEdges().filter(e => e.confidence == null || e.confidence >= minConfidence); | |
| } else { |
There was a problem hiding this comment.
This is roadmap documentation only — no code changes in this PR. The minConfidence silent-ignore issue for the Repository path was already fixed in PR #462 (merged). The roadmap text here describes future work, not current behavior.
Merge origin/main into docs/backlog-promote-tier0, keeping the PR's phase numbering (Phase 4 = Native Analysis Acceleration). Incorporated 'DX & onboarding' addition from main into Phase 6 summary. Fixed missed subsection renumber: 10.6 -> 11.6 (Auto-generated Docstrings is in Phase 11, not 10).
Keep main's cross-reference to 5.7 for the dependency audit step instead of duplicating the deliverable.
Summary
codegraph briefcommand) from Tier 1i — enriches passively-injected hook context with roles, caller counts, and risk tiersRationale
These two items deliver the highest immediate impact on agent experience and graph accuracy without requiring Rust porting or TypeScript migration.
brief(#83) improves the context agents actually see via hooks; type inference (#71) prevents hallucinated "no callers" for method calls through typed variables.Test plan