Skip to content

fix(j5): preserve personas and workers across upgrades - #920

Merged
bryantderosier merged 2 commits into
j5/776-personas-no-handofffrom
j5/777-personas-upgrade-compatibility
Nov 6, 2026
Merged

bryantderosier merged 2 commits into
j5/776-personas-no-handofffrom
j5/777-personas-upgrade-compatibility

Conversation

@bryantderosier

@bryantderosier bryantderosier commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Changing persona definitions to an ordered model list and one access level would otherwise invalidate saved snapshots, interrupt existing workers, and leave older clients unable to read the library. I added compatibility for both definition shapes, preserved snapshot identity and saved worker behavior, and blocked edits that would discard fields an older editor cannot represent. Closes #777.

  • Verify stored snapshot content before decoding; preserve legacy policy names and map access at runtime without rewriting definitions, assignments, or snapshots.
  • Accept old and new imports, ignore retired artifact fields, report unsupported default policies with repair guidance, and preserve replacement confirmation for hidden invalid imports.
  • Send additive model/access fields alongside legacy summaries. Mobile Details shows the full model list; incompatible edits and duplicates fail before writing. The shared team folder stays unchanged.

Stack order: this is layer 2 of stack pingdotgg#921 (#914 → #920 → #922 → #923), which merges as one. It targets j5/776-personas-no-handoff.

Evidence

  • node scripts/check-changed.ts j5/776-personas-no-handoff — 339 tests passed across 14 files; format, lint, GraphQL generation, and typechecks for 32 affected packages passed. The command exits unsuccessfully because both Knip checks fail as described below.
  • The provider turn-start test resumes a pre-upgrade persona turn with its saved instructions and mapped access exercises the actual service with a fake provider, a frozen legacy snapshot, the retained native thread, saved instructions/model/options, and mapped access after source removal.
  • Library tests cover policy mappings and repair messages, old and tampered snapshots, unchanged stored bytes, old/new imports, lossy-edit rejection, and confirmation before replacing a hidden invalid import. Shared-client and mobile tests cover legacy fallback and complete ordered-model details.
  • git diff --check j5/776-personas-no-handoff HEAD — passed. The committed diff matches the tested diff byte for byte.

Not verified: no browser, native mobile, live server, real provider turns, paid evals, or old installed mobile binary. Remote/relay/tunnel behavior was not exercised live. No before/after UI captures. Knip cannot load Metro configuration because its SPDX download returns HTTP 403 and reports the existing unused PASTED_TEXT_ATTACHMENT_THRESHOLD_BYTES export in packages/client-runtime/src/textPaste.ts; both failures were reproduced on the clean parent branch.

Merge Danger

Door: one-way after someone imports a new-format definition or launches a worker from it. Reverting does not convert those stored definitions or snapshots back to the old shape. The upgrade itself performs no migration or rewrite.

Blast Radius: persona library reads/imports/edits, saved persona workers, Crew/persona launch policy resolution, and persona presentation on web, desktop, and mobile.

Older mobile builds keep reads and existing workers; edits that cannot preserve the complete definition require an updated editor. Unsupported diagnostic and publish-only defaults remain invalid for new launches. Existing assignments retain their saved policy and approved overrides.

After merge: ship with #778 and #779 before changing the shared team definitions in #780. No migration command is required.

UI changes

Mobile persona Details now displays every canonical model and option, with the legacy two-model fallback for older servers. Before/after captures and the mobile pass are still outstanding; they're covered by the live re-test of the whole stack.

Live testing

Nothing ran against a live server or device. The turn-continuation proof uses a fake provider through the real turn-start service. To verify manually in isolated test state: open Settings → Agent Setup on web/desktop and mobile; view a legacy two-route persona and a new persona with three model entries/options; confirm the complete details; attempt an incompatible edit and confirm no stored bytes change; resume a worker created before the upgrade and verify its saved instructions, model, and mapped access.

Upstream impact

apps/server/src/orchestration-v2/ProviderTurnStartService.test.ts extends the existing native-resume harness with the persona compatibility test. Its case text and file-table entry are recorded in FORK.md. No upstream product behavior changes.

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
  • Live testing: the section above says what ran live and what did not
  • Upstream-owned files: each one is recorded in FORK.md (case text and file-table row) in this PR
  • 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 (no upstream product change)
  • Surfaces: entry points, clients, providers, contracts, reverse states, connection modes (see AGENTS.md)
  • Docs: definitions under docs/j5/product/ and user docs rewritten where this changes them

GPT-6.1-Sol (high) via Codex in J5 Code.

@vercel

vercel Bot commented Nov 3, 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 Nov 3, 2026 2:52pm UTC

Request Review

@bryantderosier
bryantderosier added this pull request to stack #921 November 3, 2026 14:52
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 effective changed lines (test files excluded in mixed PRs). labels Nov 3, 2026
@bryantderosier bryantderosier self-assigned this Nov 3, 2026
@bryantderosier
bryantderosier marked this pull request as ready for review November 3, 2026 14:56
@coderabbitai

coderabbitai Bot commented Nov 3, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@BastiHu BastiHu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as layer 2 of stack pingdotgg#921, which merges as one. Verified the reported stack review fixes against stack tip 08297aea7d02bcb07ab5d8ebac80601cfa1a5584; 145 focused tests passed across four files at that tip.

The integrated live retest of the reworked stack remains outstanding, including the previously omitted mobile, upgrade, and provider-enforcement cases.

@Jacksondr5 Jacksondr5 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved as part of the persona stack (#914 → #920 → #922 → #923), which merges as one, at this layer's head 420e781b58 (stack tip d11efb049e).

  • Panel review: Claude Opus 5.5 and GPT-6.1-Sol. All findings are fixed and cross-checked.
  • Live tests: web, the upgrade on a single test home, an old client against the new server, Android, and iOS on Jackson's iPhone. The results and screenshots are on #923.
  • Jackson: approved the docs and the UI.
  • Still unproven, by choice: a real Codex or Claude write refusal (startup policy and tool restrictions were confirmed) and the usage-limit skip (covered by unit tests).
  • Not this stack: follow-ups found on the base commit are #929 and #930.

Approved by Claude Opus 5.5 for Jackson.

@bryantderosier
bryantderosier merged commit a36793a into j5/main Nov 6, 2026
42 of 48 checks passed
@bryantderosier
bryantderosier deleted the j5/777-personas-upgrade-compatibility branch November 6, 2026 12:25

This branch was successfully deployed

1 active deployment
Preview — 420e781b Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 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.

Personas: old personas and running workers survive the upgrade

3 participants