From 2d4dbc6901deb35cf5587e4f900e0ac15d32b0ec Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 18 Sep 2026 00:36:47 -0700 Subject: [PATCH] test(ci): run the worktree-identity downgrade lane instead of describing it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The cross-version job names its files explicitly, so a new one is inert until it is listed; the sharded unit job excludes the whole directory and the E2E router only takes `*.spec.ts`. Also pairs the forward-compat case against the current build — the stack's own field-list walk is the guarantee that matters, and only the frozen build was exercised. --- .github/workflows/pr.yml | 1 + ...ss-version-worktree-identity-downgrade.unit.test.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e2112de521b..64ef4dbfede 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -695,6 +695,7 @@ jobs: tests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.ts tests/e2e/cross-version-wire/reported-lossy-initial-snapshot.unit.test.ts tests/e2e/cross-version-wire/cross-version-agent-session-wire.unit.test.ts + tests/e2e/cross-version-wire/cross-version-worktree-identity-downgrade.unit.test.ts managed_hook_node18: name: managed hooks on Node 18 diff --git a/tests/e2e/cross-version-wire/cross-version-worktree-identity-downgrade.unit.test.ts b/tests/e2e/cross-version-wire/cross-version-worktree-identity-downgrade.unit.test.ts index 6bd21f1ee8c..cf8071171d5 100644 --- a/tests/e2e/cross-version-wire/cross-version-worktree-identity-downgrade.unit.test.ts +++ b/tests/e2e/cross-version-wire/cross-version-worktree-identity-downgrade.unit.test.ts @@ -142,11 +142,17 @@ describe('cross-version worktree identity downgrade', () => { }) }) - it('neither build drops a row shape it does not recognise', () => { + // Both builds, because the load-bearing forward-compat guarantee is the CURRENT build's: the + // stack repoints rows by walking a fixed field list, and a field a later build adds must pass + // through untouched rather than be swept in by anything name-shaped. + it.each([ + ['the pre-stack build', (): Migrate => preStackMigrate], + ['the stack', (): Migrate => stackMigrate] + ])('%s drops no row shape it does not recognise', (_label, migrateOf) => { const state = persistedStateAfterRename() const session = state.workspaceSession as Record session.someFutureFieldByKey = { k: { worktreeId: OLD_ID, fromANewerBuild: true } } - preStackMigrate(state, OLD_ID, NEW_ID) + expect(() => migrateOf()(state, OLD_ID, NEW_ID)).not.toThrow() expect((state.workspaceSession as Record).someFutureFieldByKey).toEqual({ k: { worktreeId: OLD_ID, fromANewerBuild: true } })