Repository navigation
feat(scripts): --base runs a second live-test server at another ref - #558
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
5 of 7 tasks
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:05
c39ae0a to
7c919e0
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:05
a8483d3 to
b9e4554
Compare
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:06
7c919e0 to
88d81ed
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:06
b9e4554 to
8d683f2
Compare
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:09
88d81ed to
19da1ed
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:09
8d683f2 to
ded7b66
Compare
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:16
19da1ed to
7140218
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:16
ded7b66 to
d3dde9b
Compare
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:24
7140218 to
561c2ed
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:24
d3dde9b to
794867d
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:29
794867d to
2a9db07
Compare
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…tries and bounds its start Review fixes for #558: - Before the base's script is run, the checkout must be this repository at the commit the build recorded. It is never reset. A failing base status now fails the command. - The clock is recorded in the manifest and given to the base on every start, and the output says when the base predates the clock and cannot honour it. - The base's checkout, install and start run in their own process. A start waits for it within the one time budget and otherwise returns, saying it is still being prepared. - A ref with shell characters is refused, since the ref is printed inside commands. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:43
3cdf4ad to
1b935fd
Compare
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…tries and bounds its start Review fixes for #558: - Before the base's script is run, the checkout must be this repository at the commit the build recorded. It is never reset. A failing base status now fails the command. - The clock is recorded in the manifest and given to the base on every start, and the output says when the base predates the clock and cannot honour it. - The base's checkout, install and start run in their own process. A start waits for it within the one time budget and otherwise returns, saying it is still being prepared. - A ref with shell characters is refused, since the ref is printed inside commands. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:43
e6c7a15 to
57ebd01
Compare
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 04:46
1b935fd to
a66e0c1
Compare
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…tries and bounds its start Review fixes for #558: - Before the base's script is run, the checkout must be this repository at the commit the build recorded. It is never reset. A failing base status now fails the command. - The clock is recorded in the manifest and given to the base on every start, and the output says when the base predates the clock and cannot honour it. - The base's checkout, install and start run in their own process. A start waits for it within the one time budget and otherwise returns, saying it is still being prepared. - A ref with shell characters is refused, since the ref is printed inside commands. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 04:46
57ebd01 to
0ee4c5e
Compare
Jacksondr5
force-pushed
the
j5code/live-test-for-dev
branch
from
October 12, 2026 05:18
8f2afe7 to
4bd7b5d
Compare
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…tries and bounds its start Review fixes for #558: - Before the base's script is run, the checkout must be this repository at the commit the build recorded. It is never reset. A failing base status now fails the command. - The clock is recorded in the manifest and given to the base on every start, and the output says when the base predates the clock and cannot honour it. - The base's checkout, install and start run in their own process. A start waits for it within the one time budget and otherwise returns, saying it is still being prepared. - A ref with shell characters is refused, since the ref is printed inside commands. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…d knows about Review fix for #558. The base's checkout, install and start ran in a detached process nothing recorded, so a rebuild could delete the checkout under a running install, and a second start ran a second install beside the first. Its pid and start time are now recorded as a server's are. A start joins a preparation that is running, status reports it as running or failed, and stop and rebuild stop it on the same proof before touching the checkout. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 05:18
621ccfb to
58b84d1
Compare
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 05:20
58b84d1 to
ccc20f2
Compare
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…tries and bounds its start Review fixes for #558: - Before the base's script is run, the checkout must be this repository at the commit the build recorded. It is never reset. A failing base status now fails the command. - The clock is recorded in the manifest and given to the base on every start, and the output says when the base predates the clock and cannot honour it. - The base's checkout, install and start run in their own process. A start waits for it within the one time budget and otherwise returns, saying it is still being prepared. - A ref with shell characters is refused, since the ref is printed inside commands. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…d knows about Review fix for #558. The base's checkout, install and start ran in a detached process nothing recorded, so a rebuild could delete the checkout under a running install, and a second start ran a second install beside the first. Its pid and start time are now recorded as a server's are. A start joins a preparation that is running, status reports it as running or failed, and stop and rebuild stop it on the same proof before touching the checkout. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
added a commit
that referenced
this pull request
Oct 12, 2026
…tarted with it Review fixes for #558: - Each step runs in its own process group, awaited in the foreground. At the deadline the whole group is ended and waited for, so an install or a build the step started cannot go on writing after the command has returned. - A base build cut off part-way leaves a home its own script will not build over, so the server step rebuilds it and the same command recovers. - When time has run out, the steps are reported from disk without asking the base's server. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A start or rebuild with --base <ref> adds a git worktree of this repository at that ref under .j5code/live-test, installs it, and runs that checkout's own copy of this script, so the base gets its own ports, home, generator and process record. Both builds are given one clock, which the generator now reads from J5_LIVE_TEST_NOW, so their replayed threads are dated alike. A ref without the script is refused before anything is deleted. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A switch of mode removes the base with git worktree remove, so no stale worktree entry is left, and refuses with git's reason if git will not. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tries and bounds its start Review fixes for #558: - Before the base's script is run, the checkout must be this repository at the commit the build recorded. It is never reset. A failing base status now fails the command. - The clock is recorded in the manifest and given to the base on every start, and the output says when the base predates the clock and cannot honour it. - The base's checkout, install and start run in their own process. A start waits for it within the one time budget and otherwise returns, saying it is still being prepared. - A ref with shell characters is refused, since the ref is printed inside commands. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…remove it The base checkout is verified on every command; on stop the check comes after the base server has stopped, and a rebuild skips it because it replaces the build. The output says the checkout is a worktree of this repository and which command removes it when the before and after work is done. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d knows about Review fix for #558. The base's checkout, install and start ran in a detached process nothing recorded, so a rebuild could delete the checkout under a running install, and a second start ran a second install beside the first. Its pid and start time are now recorded as a server's are. A start joins a preparation that is running, status reports it as running or failed, and stop and rebuild stop it on the same proof before touching the checkout. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The base's checkout, install and start no longer run in a detached process. Each run of the command does the steps in the foreground, as far as fits in its time budget, and leaves each step's result on disk. A run that is out of time stops, says which steps are done and which are left, and exits non-zero; the same command picks up at the first step that is not done. status reports each step as done, not done or failed from what is on disk, and stop and rebuild have nothing hidden to race with. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tarted with it Review fixes for #558: - Each step runs in its own process group, awaited in the foreground. At the deadline the whole group is ended and waited for, so an install or a build the step started cannot go on writing after the command has returned. - A base build cut off part-way leaves a home its own script will not build over, so the server step rebuilds it and the same command recovers. - When time has run out, the steps are reported from disk without asking the base's server. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The hard kill was armed only after the step's command had exited, so a command that ignored SIGTERM held the script for ever. It is now armed when the deadline passes. If the script itself is told to stop while a step runs, it ends the step's group first. Part of #546. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jacksondr5
force-pushed
the
j5code/live-test-base
branch
from
October 12, 2026 05:33
e0c7c31 to
43b4d78
Compare
19 tasks done
Jacksondr5
marked this pull request as ready for review
October 12, 2026 05:44
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 48 minutes for your next included review. View limit details
Comment |
4 of 8 tasks
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.
Problem
A UI change needs before and after screenshots on the same data. Today an agent builds a second checkout and a second seeded server by hand to get the "before". Part of #546 (stage 3, fourth of five stacked PRs; based on #556).
What changed
A start or
rebuildtakes--base <ref>:It starts the usual server from this checkout (the head) and a second one from the base ref.
.j5code/live-test/base/, and installs it withpnpm install --frozen-lockfile..j5code/live-test, its own generator and its own process record. So the head script adds no second code path for starting, stopping or proving a server:status,restartandstopcall the base checkout's script with the same command and print what it says. A home built by the head's generator is never opened by the base's code.J5_LIVE_TEST_NOWwhen it is set. The script chooses the clock once, records it in the manifest, and gives it to the base on every start, so a retry dates the base the same. Thread ids are still random on each side.origin/j5/mainincluded, until this merges. The block then says the base's threads are dated from its own build.<root>/basemust be this repository checked out at the commit the build recorded; otherwise the script refuses and namesrebuild. Onstopthe check comes after the base server has stopped.rebuildskips it, because replacing the build is the way out of a moved checkout.rebuildwith no flag removes it when the before and after work is done.statuslists the steps as done, not done or failed from what is on disk.stopandrebuildhave nothing hidden to race with. The head server boots in its own process while the base's steps run.stopleaves it.rebuildstops the base server, then runsgit worktree removeon it, not forced, before deleting the directory. If git will not remove it, the script refuses with git's reason and deletes nothing else.--basegoes with the default build only; it is refused with--fresh,--peeror--for-dev.Live testing
On 2026-10-11, from this branch's worktree.
Exercised:
rebuild --base origin/j5/main(631025be1b, a base without the clock support): 83 s for the head build, the checkout, its install, its build and both starts. Head on web port 7594, base on 5829, each printing its own block.rebuild --base HEAD(a base with the clock support): the 15 replayed threads have identicalcreated_atvalues in the two homes.statusandstopreport both servers; the base's port is free afterstop.restart: 13 s.--base 276950b5f1and--base origin/j5/main~1: refused as having no script, with the existing build left in place.statusrefused, named both commits and said it had not changed the checkout.statuswith everything up lists the three steps as done, then the base's own block. After astopit listsserveras not done and names the command to continue.checkout failedinstatus, with both commits named and the checkout left as it was.rebuildwith no flag afterwards: the base checkout is gone fromgit worktree listand from disk.Known limits of the shared clock, both measured by the tester on a clock-aware base: all 15 replayed threads and their messages have identical creation times in the two homes, but (1) the two delivery-seed threads are stamped by the seed with its own time, and (2) the two
turn_interruptthreads get a differentupdated_aton each side, because each server finishes their checkpoint on its first start. Both show up as different activity ages in Fleet and the sidebar for those four threads.Not exercised live:
Checklist
FORK.md(case text and file-table row) in this PR (none edited)docs/j5/product/upstream.md(none)AGENTS.md).stopstops both;rebuildremoves the checkout.docs/j5/product/and user docs rewritten where this changes them (the skill text is in docs(j5): agents live-test with one setup script, the Browser panel and a testing skill #549)Tests:
vp test run scripts/j5/setup-agent-live-test.test.ts apps/server/src/j5/test-support/liveTestHome.test.ts(49 pass):--baseparsing with its ref and the combinations refused, the containment check on the base checkout, and the generator dating its threads from the given clock. Typecheck and lint are clean on the touched files.Built with Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code