Conversation
replayTimeline has returned per-step pass/fail since the recorder shipped, and nothing outside the library could call it. `replay` exposes it and exits 1 on the first failed step, so a recorded .json becomes a regression check that needs no test framework and no code. The personality, speed and seed the timeline was captured with are reused unless overridden -- replayTimeline on its own always starts from careful/human, and a run recorded as distracted replays differently.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
Note on the checks above: only Vercel ran. The full suite was run locally against this branch: |
This was referenced Sep 7, 2026
This branch was successfully deployed
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.
replayTimelinehas returned per-step pass/fail since the recorder shipped. Nothing outside the library could call it. This exposes it:Exit 1 on the first failed step. That is the whole feature — a recorded
.jsonbecomes a regression check that drops into CI with no test framework and no code. The.spec.tsexport is the other route; this is the one that needs nothing else installed.process.exitCodeis set rather thanprocess.exit()called, so stdout flushes. A truncated final line in a CI log is worse than useless.Replays reproduce what was recorded
A timeline stores the personality, speed and seed it was captured under.
replayTimelineignores all three and always starts fromcareful/human— so a run recorded asdistractedreplays as something else, which is the wrong default for a regression check.replayresolves each setting as flag → recorded value → default, and ignores a recorded value that is not a known option, since timelines are files on disk and may be hand-edited.This is why
--personalityand--speedbecame optional in the parser: the command needs to tell "not specified" from "explicitly set to the default".Two bugs found by actually running the round trip
Neither is visible from reading the code — both took recording a timeline and replaying it.
--recordlied about four of its five formats. The recorder's own output handling only distinguishes.giffrom video, so.json,.tsand.spec.tswere all routed to the video encoder and written as mp4s wearing the wrong extension — while the help text advertised all five. The CLI now owns the mapping, and checks the extension before launching a browser: a typo fails in 0.18s instead of after a full run.Timelines recorded by
democould not be replayed.demopassed aLocatortohover, and the recorder serialises a target withString(), so the timeline containedlocator('a[href]').first()— not a selector. The replay died on it every time. Targets are now narrowed with Playwright's>> nth=0, which avoids the strict-mode hang that motivated the Locator and survives the round trip.Also:
--timeout <ms>The failing replay above took 32.2 seconds on Playwright's 30s default to report something it knew in two. With
--timeout 3000the same failure lands in 5.3s. Applies to all three commands.Verification
80 unit tests in
@humanjs/cli(was 31): timeline parsing and its rejections, format dispatch including.spec.tsbeating bare.ts, setting resolution, summary wording,--timeoutparsing.End to end from
dist/:demo --record flow.jsonreplay flow.jsonPASS 6 steps · 3.2s, exit 0replaywith a broken targetFAIL step 5 of 6 (hover), exit 1--timeout 3000on that failure--record out.aviWhole suite:
lint,typecheck(11/11),test(10/10),build(8/8),check:exports(15/15).Next up is
compare <url>— the side-by-side robotic-vs-humanized asset, generated for the user's own site.