Skip to content

feat(timetravel): v2.1 Time-Travel Codebase — reason about code evolution (#746) - #860

Merged
AmitoVrito merged 2 commits into
SynapseKit:mainfrom
DhruvGarg111:feat/issue-746-time-travel-codebase
Jul 29, 2026
Merged

AmitoVrito merged 2 commits into
SynapseKit:mainfrom
DhruvGarg111:feat/issue-746-time-travel-codebase

Conversation

@DhruvGarg111

@DhruvGarg111 DhruvGarg111 commented Jul 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes #746. Implements the TimeTravelAgent system for reasoning across the evolution of code, git history, and historical memory files.

Changes Included

  1. GitBackend & AsOf: Subprocess-based git history navigation, file content retrieval at historical commits, and as_of(date) scoping.
  2. EvolutionIndex: AST-based symbol and file change graph indexing, timeline generation, and PR linkage extraction (#NNN).
  3. DriftDetector: Heuristic detector for abstractions whose original justification or caller counts have drifted over time.
  4. DiffNarrativeGenerator: Produces structured markdown evolution timelines with optional LLM reasoning fallback.
  5. TimeTravelAgent: High-level facade integrating evolution index, drift detection, and memory file patch history.
  6. Package Exports & Test Suite: Exports TimeTravelAgent in synapsekit.timetravel and top-level synapsekit, verified with unit test suite in tests/timetravel/.

Commit History (2 commits)

  • feat(timetravel): add TimeTravelAgent engine and bitemporal codebase evolution analysis (#746)
  • test(timetravel): add unit test suite for TimeTravelAgent and git evolution index (#746)

Verification

  • Passed ruff check and ruff format on all files.
  • Passed 12/12 unit tests in tests/timetravel/test_timetravel.py.

@DhruvGarg111
DhruvGarg111 force-pushed the feat/issue-746-time-travel-codebase branch from a7c3169 to 732c4d7 Compare July 22, 2026 12:41
@AmitoVrito
AmitoVrito merged commit 732c4d7 into SynapseKit:main Jul 29, 2026
7 checks passed
@AmitoVrito

Copy link
Copy Markdown
Collaborator

Merged into the v2 batch — thanks Dhruv, really like this one. Two things I fixed landing it: the git subprocess calls were running on the event loop (now offloaded via to_thread), and as_of() with a pre-history date was resolving to HEAD instead of the first commit. Added a regression test for that. Co-authored the fix to you.

ayushbhatt1224 pushed a commit to ayushbhatt1224/SynapseKit that referenced this pull request Aug 12, 2026
ayushbhatt1224 pushed a commit to ayushbhatt1224/SynapseKit that referenced this pull request Aug 12, 2026
AST checker that fails CI on any blocking file/subprocess/sleep/network
call directly inside an async def (offload via asyncio.to_thread /
run_in_executor). Skips nested sync helpers and awaited calls; supports a
# allow-blocking escape hatch. Guards the async-first invariant that let
blocking IO slip past review in SynapseKit#860/SynapseKit#861/SynapseKit#862.
ayushbhatt1224 pushed a commit to ayushbhatt1224/SynapseKit that referenced this pull request Aug 12, 2026
Formatting drift from the SynapseKit#860/SynapseKit#861 async fixes broke `ruff format --check`.

Co-authored-by: Dhruv Garg <[email protected]>
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.

v2.1: Time-Travel Codebase — reason about code evolution, not just current state

2 participants