Repository navigation
Description
Problem
Agents that work on J5 Code need to live-test on real servers with real provider agents; unit tests only go so far. A review of 96 past threads that did live testing (2026-09-08 to 2026-10-11) found that live testing reliably catches bugs green unit suites miss, but that every tester rebuilds the same rig by hand, and that the rig has put real repositories at risk.
What the review found:
- Every tester rewrites the same harness. One reviewer wrote 170 ad hoc scripts and another about 118: a browser driver, a WebSocket client, SQL to stand down a copied database, server start and stop, and the evidence upload.
- Copies of real data reach real things. Test agents left branches and worktrees in the real j5code and trade-tracker repositories. On 2026-10-03 copied threads started real Claude sessions. A turn on a copied thread also resumes the developer's real provider session and appends to it.
- The
test-t3-appskill is out of date. It names.t3paths, and tells agents to stop when the Browser panel reports unavailable. Several testers stopped there. - About half of each tester brief is host boilerplate, and Jackson granted live-agent permission by hand 11 times and asked "what couldn't you test?" 12 times.
- Peering, remote connections and desktop had almost no live coverage.
Two things changed during the review:
- The Browser panel now works on a headless host. Upstream moved its browser onto the server (feat(preview): run the browser on the environment server pingdotgg/t3code#15328, in J5 since the 2026-10-09 sync). It was driven end to end on Claude and Codex on 2026-10-11, so Playwright is no longer needed.
- Writing MCP tools are refused when a native subagent outlives its parent's turn. This is upstream's rule; reported on delegate_task from a background native Claude subagent fails with parent_not_active after the parent's turn settles pingdotgg/t3code#16808. Peer agents and waited-on subagents are unaffected.
The plan
An agent that needs to live-test runs one script and follows what it prints. The script builds a safe, self-contained test server in the agent's own worktree. The agent drives it through the Browser panel.
Decisions (Jackson, 2026-10-11)
- Use the Browser panel, as upstream does.
- Two modes. Agent testing uses a test repo and pre-made threads only, with nothing real reachable.
--for-devuses a copy of the developer's data for a server the developer uses; the agent takes no turns on it. - Pre-made threads are for viewing. Live turns go in new threads.
- Each tester gets its own copy of the test repo and home, inside its worktree's
.j5code. - Testers are peer agents, not native subagents. The builder commits first and the tester's worktree starts from that commit.
- Claude Haiku and GPT Luna need no permission for live turns. A more expensive model is raised to Jackson first. The test home defaults new threads to Haiku.
- Extra test passes are conditional on what the change touches, and the report lists each as run or not applicable with a reason.
- Restart tests happen only at rest, or during a turn held open by a gate. Narrow windows such as mid-migration belong in deterministic tests.
- The tester saves its report as an artifact and sends a short message pointing to it.
- Two skills, both referenced from
AGENTS.md.
Work
- Dev server restarts when another worktree installs dependencies #544 Narrow the dev server's watch to source directories (fix(server): another worktree's install no longer restarts a dev server #550)
-
setup-agent-live-test, default mode (feat(scripts): one command sets up a live-test server in a worktree #551; also hasrebuild)- Check first that a dev server renders a home built by upstream's replay kit, and measure how long the build takes
- A small TODO-app test repo, with a gate script for holding a turn open and two trivial playbooks
- Pre-made threads from the replay kit (
apps/server/src/orchestration-v2/testkit) plus J5's delivery seed - Light personas pinned to Haiku and Luna; Haiku as the default model
- Start the server with inherited variables unset; print ports, pairing URL, project to use and the stop command
-
stop,statusandrestart(graceful, same home, waits for "V2 orchestration recovery completed")
-
--fresh: an empty home, so the first-run wizard shows -
--peerand--poll: two servers with separate homes, peered, reusing the steps inscripts/j5/pr-env.sh- Two servers on one machine report the same name #545 Name the two servers (feat(server): a server's name can be set, so two on one machine can be told apart #548,
J5CODE_SERVER_NAME) "Local" and "Remote" - See pr-env --peer: add Remote to the browser with a ready link, and mint scoped pairing tokens without a restart #257 for adding the second server to the browser
- Two servers on one machine report the same name #545 Name the two servers (feat(server): a server's name can be set, so two on one machine can be told apart #548,
-
--for-dev: a copy of the developer's data viamigrate-dev-db, shared over the tailnet (see A switch to start a test server with background work disabled #497 for what a copy still starts) -
--base <ref>: a base and head pair from the same seed, for before and after shots - An evidence upload script for PNG screenshots: check each file, push to
j5/evidence, verify links with therefs/heads/form, print the before and after table - Edit
test-t3-appin place:.j5codepaths, the working panel recipe, the live-run rule, recovery after a timeout - A J5 live-testing skill: run the script, peer-agent testers, model permission, the conditional passes, restart rules, the report shape
- Reference both skills from
AGENTS.md, and correct its rules that now conflict (subagents and dev servers, asking before browsers) - A "Live testing" section in the PR template: verdict, what was not exercised live, what to test by hand, link to the report artifact
Conditional passes
Always: the feature's own flow including the way back out, and one real turn sent through the UI.
| When the change touches | Also run |
|---|---|
| The turn path, provider adapters or MCP tools | One turn each on Codex and Claude |
| Stored state, deliveries or recovery | Restart at rest, then use the state; for interrupted runs, also restart during a gated turn |
| Migrations | A migration rehearsal on a copy, plus a --fresh run |
| Startup, onboarding or settings defaults | A --fresh run |
| Anything an agent is meant to use | Ask a real agent in plain language, without naming the tool |
| Peering or cross-server messaging | A --peer run |
| UI, after a rebase or review fixes that touched it | Re-run the browser pass before merge |
Not testable with this plan
- The desktop app: Electron, the packaged build, the updater and installers. A human verifies these.
- Relay and tunnel connections, a second physical machine, an unreachable peer.
- Continuing a pre-made thread, and real diffs inside pre-made threads.
- Behaviour under the developer's real data volume.
- Providers other than Codex and Claude on this host.
- Timer-driven features at real speed.
Unproven
- A dev server correctly rendering a replay-built home.
pr-env.sh's peering steps working from a worktree on currentj5/main.- The narrowed watch not following
node_modulessymlinks underpackages. - Thread-created worktrees staying inside the tester's
.j5code, and worktree removal deleting it. - The browser staying paired across a
restart. - Which setting controls the default model for new threads.
Parked
- Video in PRs: the panel records MP4, which GitHub does not play from a raw link.
- Desktop testing.
- Bulk seeding for volume tests.
- Two possible upstream reports: the "do not retry, use Playwright" error text that is out of date now the server has its own browser, and a timed-out panel action evicting the whole browser host.
- A scripted ACP mock provider for free, deterministic interactive tests.
Host
vp run dev --share fails for the dev user on Tailscale Serve permissions. Jackson is handling this separately.
Mobile is out of scope.
Planned with Claude Opus 5.5 in Claude Code.
Activity
Jacksondr5 commentedon Oct 12, 2026
Findings from the
vp run dev --shareinvestigation on the dev host (2026-10-11), relevant to--for-dev:tailscale servewas refused because no operator was set. Jackson ransudo tailscale set --operator=j5dev.--sharenow starts, prints a tailnet pairing URL, and removes its mapping on SIGTERM.--shareserves on the worktree's derived web port (5734 to 8733), so the shared URL is unreachable from other devices. Confirmed from a second device: the worktree port timed out, and a temporary mapping on 8443 to the same server returned 200. 8444 is the live install. Two options are with Jackson: a policy rule allowing the derived range, or serving on a fixed allowed port, which permits one shared server at a time.tailscale serve --bg --https=8443 http://localhost:<webPort>, removed withtailscale serve --https=8443 off. The printed pairing URL then carries the wrong port, and pairing through 8443 was not verified.For the setup script:
--for-devcould own the fixed-port mapping itself (create it on start, remove it onstop, print the pairing URL with the right port), with no change to upstream's dev runner.serve reset.curlto the shared origin proves nothing, because local traffic bypasses the policy. Reachability has to be checked from another device.setsid cmd &forks, so$!is not the process group. Record it withsetsid sh -c 'echo $$ > pgid.file; exec …'.vpis not on PATH on this host, so the worktree setup script can fail silently and leave nonode_modules.Jacksondr5 commentedon Oct 12, 2026
Update on sharing (2026-10-11): the port problem is fixed too, so the 8443 workaround above no longer applies.
vp run dev --sharetherefore works as documented, with no manualtailscale servestep.--for-devcan use it directly and does not need to own a fixed-port mapping.curldoes not prove reachability; a failed share only logs a warning.Jacksondr5 commentedon Oct 12, 2026
The "New worktree" first-turn fault from the spike has a mechanism, and it is not a test-home problem (builder's trace, 2026-10-12; 3 of 3 reproductions on the script-built home, not yet reproduced on a plain home).
apps/web/src/components/BranchToolbarBranchSelector.tsx(about 540-550), the effect that defaults the worktree base callssetThreadBranch(candidate, null, true)when the thread shows no worktree path and no branch. Once a server thread exists, that sendsupdateThreadMetadata({ branch, worktreePath: null }).Orchestrator.ts(about 3345) sees the worktree path change and detaches the session with "Workspace changed.", which interrupts the turn. The later branch rename restores the path.So it is a race in upstream's web client that automation hits and people have not. The setup script tells testers to take live turns in "Current checkout". No J5 fix, in line with not patching upstream behaviour that has not hit real use. Parked as a possible upstream report, with a plain-home reproduction still to do.
fix(scripts): the live-test script says to install when node_modules …
feat(scripts): rebuild starts the live-test home over in one command
fix(scripts): the live-test script derives its paths and checks them …
fix(scripts): a live-test server that is not serving can still be sto…
fix(scripts): the live-test script also refuses a linked state directory
fix(server): live-test personas name the two routes a persona needs
189 remaining items
fix(scripts): --base prepares its base in resumable foreground steps
fix(scripts): a base step that runs out of time takes everything it s…
fix(scripts): a base step that ignores the request to end is killed
Jacksondr5 commentedon Oct 12, 2026
--for-devreachability is verified end to end (2026-10-12): Jackson opened the tailnet pairing link from another device, it paired, and he could navigate the copied threads. The server was then stopped, its own tailnet mapping was removed, the installed server's mapping was unchanged, and the copy was replaced with the default test home.Merged so far: #550 (watch), #548 (server name), #551 (default mode), #554 (
--fresh), #555 (--peer,--poll), #556 (--for-dev). Remaining: #558 (--base), #559 (evidence upload), then the skills andAGENTS.mdPR #549 and the cold-run check.feat(scripts): --base runs a second live-test server at another ref (#…
feat(scripts): pr-evidence publishes before and after screenshots for…
feat(scripts): pr-evidence takes an after-only image for a state the …
fix(scripts): pr-evidence pushes to GitHub only on the evidence branch
fix(scripts): pr-evidence restricts branches on every remote that is …
fix(scripts): pr-evidence refuses another branch unless the remote is…
feat(scripts): pr-evidence publishes before and after screenshots for…
docs(j5): agents live-test with one setup script, the Browser panel a…
docs(j5): agents live-test with one setup script, the Browser panel a…
Jacksondr5 commentedon Oct 12, 2026
Done (2026-10-12). Merged: #550 (watch), #548 (server name), #551 (setup script, default mode), #554 (
--fresh), #555 (--peer,--poll), #556 (--for-dev), #558 (--base), #559 (evidence upload), #549 (skills,AGENTS.md, PR template).Acceptance check: two brand-new agents, one on Claude and one on Codex, each live-tested a change from a one-line brief using the skills alone.
Still parked, as listed above: video in PRs; desktop testing; bulk seeding for volume tests; a scripted mock provider; the "New worktree" first-turn race in upstream's web client (not reproduced on a plain home); the stale "do not retry, use Playwright" panel error text and the browser host being evicted when an action times out (possible upstream reports). The native-agent-tools channel is tracked in #336, and the
--shareport collision in #276.Known limits of the script: Linux only; it does not install dependencies; a first turn in "New worktree" mode can be interrupted or hang;
--baseleaves a registered, detached worktree of the repository untilrebuild.