Skip to content

feat(scripts): --fresh gives the live-test server an empty home - #554

Merged
Jacksondr5 merged 4 commits into
j5/mainfrom
j5code/live-test-fresh
Oct 12, 2026
Merged

Jacksondr5 merged 4 commits into
j5/mainfrom
j5code/live-test-fresh

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Problem

A change to startup, onboarding or settings defaults needs a live test on an empty home, where the first-run wizard shows. setup-agent-live-test could only build a home with the test project and pre-made threads. Part of #546 (stage 3, first of five stacked PRs).

What changed

A start or rebuild takes --fresh:

node scripts/j5/setup-agent-live-test.ts --fresh
node scripts/j5/setup-agent-live-test.ts rebuild --fresh

It makes an empty home and a manifest recording the mode. The home generator is not run, so there is no project, thread or persona, and no default model is pinned: the mode exists to show the app's real defaults. The test repository is still built beside the home, by the same code as the default mode, but it is not registered. Its path is printed as the one directory to add when the wizard or a test asks for a project. The dev server is still kept from registering <worktree>/apps/server as a project. The printed block drops the persona, playbook and hold lines, says the first-run wizard shows only in a browser profile that has not completed it (found by the tester: that state lives in the browser), and keeps the line against adding a real repository beside the test repository's path.

How modes coexist: a worktree has one live-test home at a time, under .j5code/live-test/, and its mode is fixed when it is built. status, restart and stop take no flag and act on whatever is built. A start in another mode is refused with two commands: the one that uses the home as built, and the rebuild that replaces it. A bare start counts as asking for the default mode, so it is refused on a fresh home; that keeps anyone from testing against data they did not ask for.

Live testing

On 2026-10-11, from this branch's worktree, through the Browser panel.

Exercised:

  • rebuild --fresh from a default home: 9 s. The home's database has no projects and no threads, there is no settings file, and test-repo/ has its four commits.
  • Paired in a clean incognito tab: the app lands on /welcome with "Set up J5 Code" (Connect, Providers, Projects) and "No projects yet".
  • A bare start on the fresh home, and --fresh on a default home: both refused with the two commands.
  • restart on the fresh home keeps the mode; stop.

A tester (a peer agent in its own worktree, working from the output alone) ran the mode on the first commit and passed it: the wizard completed in an incognito tab, status, restart, stop and start worked, and both mode mismatches and rebuilds behaved. Its report is the artifact test-reports/setup-agent-live-test-fresh.md. Two of its findings changed the output here: the wizard's "done" state lives in the browser, so the block now says to pair in an incognito tab; and a persona launch can resolve to its second model route, so the Personas line in the default mode now names both routes.

Not exercised live: walking the wizard's steps, adding the test repository as a project through the UI, and a turn on a fresh home.

Checklist

  • One concern: the description has no "also"
  • Tests cover the changed behavior (backend changes ship with focused tests)
  • UI changes: before/after screenshots above, and a video for motion or interaction (no UI change)
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR (none edited)
  • Upstream product: any change to what upstream's product does has a human decision linked above and a register entry in docs/j5/product/upstream.md (none)
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md). A developer tool; rebuild without the flag is the way back to the default home.
  • Docs: definitions under 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 (22 pass): flag parsing in both positions, flags refused on status, restart and stop, and the mode refusal in both directions. Typecheck and lint are clean on the touched files.

Built with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

A start or rebuild with --fresh builds an empty home, so the first-run wizard
shows. A worktree has one live-test home at a time and its mode is fixed when
it is built: a start in another mode is refused with the command to use the
home as built and the rebuild that replaces it.

Part of #546.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
j5-code Ready Ready Preview Oct 12, 2026 4:09am UTC

Request Review

… home

The repository is not registered as a project. Its path is printed as the one
directory to add when the wizard or a test asks for a project. No default
model is pinned, so the mode shows the app's real defaults.

Part of #546.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wser profile

Whether the first-run wizard shows is stored in the browser, so a profile
that has completed it lands on an empty app instead.

Part of #546.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…route

A persona launch can resolve to its second route, so printing only the first
model overstated what the persona is pinned to.

Part of #546.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview — d8262203 Deployed Oct 12, 2026 by vercel[bot]
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.

1 participant