Repository navigation
feat: record a real session and replay it in the playground - #4
Merged
Merged
Conversation
The recorder closes the loop the landing page was already claiming: - src/collector/record.ts samples /api/health and snapshots every change burst - shadow-git stages into a throwaway index and writes commit objects with commit-tree, so HEAD, the branch and the user's index are never touched - npm run record writes session.json - /playground accepts that file and replays it: timeline, diff, 3D city, autopsy Verified locally: a 14s recording against the deployed app produced 2 turns with real diffs and a clean metric stream.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The landing page claimed Ghost records every change burst. It didn't — the collector and the metrics runner were implemented but nothing called them, and
/playgroundalways replayed the same fixture.This closes the loop.
npm run dev npm run record -- --repo . --health http://localhost:3000/api/health --duration 60session.json→ load session in/playground→ the timeline, diff, 3D city and autopsy are built from your own repository.How it stays honest
GIT_INDEX_FILEin tmp) and written withcommit-tree.HEAD, the branch and your real index are never touched.git status, so uncommitted work that predates the recording is part of the baseline instead of showing up as a fake turn on every tick./api/health, not from the agent's report. One warmup probe is discarded so a cold start doesn't register as a hang.Verified
A 14-second recording against the deployed app produced 2 turns with real diffs (
src/__probe.ts), 7 metric samples, 2 snapshots, and no false anomaly. Earlier runs that showed 9 empty turns and a bogushangwere the two bugs above; both are fixed.Test plan
npx tsc --noEmit✅npm run build✅ (playground 10.4 kB)