Repository navigation
Feature/graph time travel - #17
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use node id fallback semantics when building the after-graph lookup for riskView, and cover the unlabeled-node regression with a targeted test. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR introduces a comprehensive "time travel" feature for comparing graph snapshots between two Git references. It adds a new CLI command ( Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as CLI Parser
participant Exec as CLI Executor
participant Cache as Cache Layer
participant Git as Git/Worktree
participant Graph as Graph Generator
participant Runtime as Comparison Runtime
participant Output as Formatter
User->>CLI: time-travel <from> <to> --view=risk
CLI->>Exec: parseTimeTravelArgs() returns options
Exec->>Cache: loadOrBuildSnapshot(from_ref, refresh=false)
alt Snapshot Cache Hit
Cache-->>Runtime: return cached TimeTravelSnapshot
else Cache Miss or Refresh
Cache->>Git: git rev-parse (resolve ref to SHA)
Cache->>Git: git worktree add (create detached worktree)
Git->>Graph: generateGraph(worktreeDir)
Graph->>Cache: return graph + report artifacts
Cache->>Cache: write metadata.json atomically
Cache-->>Runtime: return new TimeTravelSnapshot
end
Exec->>Cache: loadOrBuildSnapshot(to_ref, refresh=false)
Cache-->>Runtime: return second TimeTravelSnapshot
Exec->>Runtime: compareTimeTravelGraphs(beforeGraph, afterGraph, {view: 'risk'})
Runtime->>Runtime: compute graphDiff
Runtime->>Runtime: detect community drift & impact analysis
Runtime->>Runtime: rank top risks by limit
Runtime-->>Output: return TimeTravelResult
Exec->>Output: formatTimeTravelResult(result)
Output-->>User: display risk-ranked comparison
sequenceDiagram
participant Client as MCP Client
participant StdioServer as Stdio Server
participant ToolCall as Tool Handler
participant Infra as time-travel Infra
participant Runtime as Runtime Compare
participant Response as Response Builder
Client->>StdioServer: tools/call time_travel_compare {from_ref, to_ref, view}
StdioServer->>ToolCall: handleToolCall(..., time_travel_compare)
ToolCall->>ToolCall: validate from_ref, to_ref, view ∈ {summary|risk|drift|timeline}
ToolCall->>Infra: compareRefs({fromRef, toRef, view, refresh, limit})
Infra->>Infra: loadOrBuildSnapshot(fromRef)
Infra->>Infra: loadOrBuildSnapshot(toRef)
Infra->>Runtime: compareTimeTravelGraphs(beforeGraph, afterGraph, {view, limit})
Runtime->>Runtime: analyze graph differences by view type
Runtime-->>Infra: return TimeTravelResult
Infra-->>ToolCall: return result
ToolCall->>Response: serialize result as JSON text
Response-->>Client: tools/call response with text content
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Testing
npm run test:runnpm run typechecknpm run buildnpm pack --dry-run(if packaging or install behavior changed)Checklist
Related issues
Summary by CodeRabbit
New Features
graphify-ts time-travelcommand to compare Git refs with multiple analysis views: summary, risk, drift, and timeline.Documentation