Skip to content

feat(scripts): live-test upgrade runs the head build on Base's home - #653

Merged
Jacksondr5 merged 5 commits into
j5/mainfrom
j5code/live-test-upgrade
Oct 19, 2026
Merged

Jacksondr5 merged 5 commits into
j5/mainfrom
j5code/live-test-upgrade

Conversation

@Jacksondr5

@Jacksondr5 Jacksondr5 commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Problem

The live-test skill's "Migrations" row asks for a rehearsal, but the rig had no way to run one: --base <ref> gives two servers on two homes, so the head build never opens a home the base build wrote. In the people-and-access round (#638) testers did it by hand, by stopping Base, copying its home and moving the base checkout to the head commit, which the skill forbids.

What changed

node scripts/j5/setup-agent-live-test.ts upgrade, in a --base <ref> build only (shape approved by Jackson on 2026-10-18):

  • It stops Head's server and Base's (through the base checkout's own script). Then it starts this worktree's build on Base's own home, in place, at Base's ports. An open tab and its sign-in carry over on reload, the way a browser does across an update.
  • Ports: read from Base's own log on the first upgrade and recorded in the manifest. The dev runner is pinned to them with T3CODE_PORT_OFFSET plus an explicit --port and --dev-url, so it takes exactly those and never searches for free ones. Before starting, the script refuses if either port has a listener, or if the port is the live one (5773) or the inherited one.
  • The upgraded server is a Head process with its own log and record under .j5code/live-test/upgrade/. It is classified and signalled like every other server: pid, start time, cwd.
  • The first upgrade copies Base's home to upgrade/home-before while everything is stopped, then records the upgrade in the manifest. Each later upgrade stops the server, puts that copy back and upgrades again.
  • After an upgrade, status, restart, stop, guest and a bare --base <ref> start act on the upgraded server. guest uses the base's test project and this worktree's code. The base build never starts again, because it would be opening a home a newer build migrated. rebuild stops everything and removes the base checkout and the root, as before. Only upgrade prints "UPGRADED"; status and restart say "RUNNING", with a line saying the server runs on Base's home upgraded to .
  • rebuild now asks git whether the base checkout has edits before deleting the base's .j5code. Before, it deleted that home and then reported "Nothing else was deleted" when git refused. With upgrade that would have lost the upgraded home.
  • A start whose server exits returns at once. When the server exits under node --watch (for example, on a failed migration), the start prints the log up to the exit and how to stop it, instead of waiting out its budget. A start that another command stops while it waits says so, instead of reporting an unverified process group. That happened in testing: the leader had exited while stop ended the group.
  • Children run with --disable-warning=ExperimentalWarning added to NODE_OPTIONS, so SQLite's warning no longer buries the output. No other warnings are silenced.
  • Test homes turn provider update checks off (enableProviderUpdateChecks: false). The "Updates Available" toast covered the People page's top-right controls. upgrade sets the same thing in Base's home, since a base generator from before this change leaves the checks on. The kept copy is left as Base wrote it.
  • It refuses, saying what to run instead, when the build is not a --base build or Base never started. It does not refuse an old base: one too old for the head's migrations is a real upgrade path.
  • Skill: one row in "Other setups", one bullet, and the "Migrations" row now points at upgrade.

Live testing

Run by the author (Claude Opus 5.5) on this host at 7b09506fbc, with the cache-line, rebuild-check and test changes since verified live too. The flags were --base origin/j5/main (747aa79), with a throwaway migration 063, since dropped, that creates and fills a probe table.

  • Old state on Base: a new thread with a real Claude Haiku 5.5 turn, plus a guest added with the base checkout's own guest, signed in in a second tab. Live.
  • upgrade: took 11 s. The listeners on Base's ports run from the head worktree. Base's home reached migration 63 with one probe row, and the kept copy stayed at 62. Live, checked in the database.
  • Tab carry-over: after a reload, the owner tab stayed signed in on the old thread, and a follow-up Haiku turn worked. The guest's tab stayed signed in too. Live.
  • upgrade again: the database came back from the copy (one probe row with a new timestamp, and the post-upgrade turn gone from the database). Live.
    • Rig finding, now handled: the tab kept showing the post-upgrade turn. The web client caches thread state in IndexedDB (t3code:connection-runtime), with a cursor ahead of the restored home. Deleting that database and reloading keeps the sign-in and shows the right state. The repeat's "Next" line says so, and so does the skill.
  • restart, stop, status (running and stopped), bare --base start, guest refusal: live.
  • rebuild with an edited base file refuses before deleting anything, and the upgraded home stays. A clean rebuild removes the base worktree registration and upgrade/. upgrade on a default build refuses. Live.
  • Scenario testers then ran it: GPT-6 Astra (a 2026-10-13 build up to this head), Claude Sonnet 5.5 (a probe migration branch, with a brief that never named upgrade), and GPT-6.1 Sol (a probe migration that fails on old data, which it found and fixed). All passed. Reports: test-reports/j5code-test-upgrade-big-jump.md, j5code-test-upgrade-probe-a.md, j5code-test-upgrade-probe-c.md.
  • After their findings, at 8715cbffa9, author live run with --base origin/j5/main (3a55dfe) and the probe migration applied uncommitted: live.
    • --base setup printed 89 lines with no ExperimentalWarning.
    • With a guest on Base, upgrade onto the failing migration returned in 5 s with the migration error and the stop command. stop then ended it cleanly.
    • stop run while a waiting upgrade was starting: the upgrade printed "The dev server was stopped by another command while this one waited for it to start."
    • With the migration fixed: upgrade, then guest on the upgraded server. The People page listed both guests as "added by Test owner", with no update toast.
    • restart printed RUNNING and the "Runs … Base's home, upgraded to …" line.
    • The head home's and the upgraded home's settings.json both have enableProviderUpdateChecks: false.
  • Testing decision (the live-testing coordinator's): the author's own run at 8715cbffa9 covers each of the five changes made after the scenario testers, so no further peer run.
  • Not exercised live: the "Base never started" refusal (unit test only); a base old enough to be missing several of the head's migrations; macOS.

Checklist

  • One concern: the description has no "also". The rebuild check guards the state upgrade creates.
  • Tests cover the changed behavior: upgradeTarget, upgradeRunner (against the real dev runner's --dry-run), formatUpgrade, path guards, parsing
  • UI changes: not applicable, no UI change
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: none edited (scripts/j5/ and .agents/skills/j5-live-test/ are J5-owned)
  • Upstream product: unchanged
  • Surfaces: a dev script, so clients, providers, contracts and connection modes do not apply. Reverse state: upgrade again starts over and rebuild ends it
  • Docs: the skill is updated; no product definitions or user docs are affected

Built by Claude Opus 5.5 in J5 Code (Claude Code harness).

🤖 Generated with Claude Code

@vercel

vercel Bot commented Oct 18, 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 19, 2026 1:02am UTC

Request Review

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 effective changed lines (test files excluded in mixed PRs). labels Oct 18, 2026
… so at once

guest acts on the upgraded server after upgrade. restart and status say
plainly that the server runs on Base's upgraded home. A start whose server
exits under node --watch returns with the log up to the exit instead of
waiting out its budget, and a start that another command stopped says so.
Children run with experimental warnings silenced, and test homes turn
provider update checks off so no update toast covers the page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Jacksondr5
Jacksondr5 marked this pull request as ready for review October 19, 2026 02:03
@Jacksondr5
Jacksondr5 merged commit d41e3f1 into j5/main Oct 19, 2026
33 checks passed
@Jacksondr5
Jacksondr5 deleted the j5code/live-test-upgrade branch October 19, 2026 02:04
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 10 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 39 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 61f65076-a793-4927-b5af-9356e59afcf3
📥 Commits

Reviewing files that changed from the base of the PR and between 3a55dfe and 67bb605.

📒 Files selected for processing: 5
  • .agents/skills/j5-live-test/SKILL.md
  • apps/server/src/j5/test-support/liveTestHome.test.ts
  • apps/server/src/j5/test-support/liveTestHome.ts
  • scripts/j5/setup-agent-live-test.test.ts
  • scripts/j5/setup-agent-live-test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview — 67bb6057 Deployed Oct 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (test files excluded in mixed PRs). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant