From 256e855a84d31233f28c41e27603d10c59ab5716 Mon Sep 17 00:00:00 2001 From: Hayden <154503486+groupthinking@users.noreply.github.com> Date: Thu, 12 Nov 2026 17:46:46 -0600 Subject: [PATCH 1/3] fix: preserve failed pack health on readiness retry --- .../src/lib/__tests__/pack-build-live.test.ts | 40 +++++++++++++++++-- apps/web/src/lib/pack-build-live-client.ts | 10 ----- apps/web/vercel.json | 7 ++++ vercel.json | 5 +++ 4 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 apps/web/vercel.json diff --git a/apps/web/src/lib/__tests__/pack-build-live.test.ts b/apps/web/src/lib/__tests__/pack-build-live.test.ts index 20d8c852a..872fb7fca 100644 --- a/apps/web/src/lib/__tests__/pack-build-live.test.ts +++ b/apps/web/src/lib/__tests__/pack-build-live.test.ts @@ -85,7 +85,7 @@ describe('pack-build-live', () => { ); }); - it('succeeds after sandbox confirm when health stays degraded but pack is stored', async () => { + it('preserves failed health after sandbox confirms a stored pack', async () => { const fetchMock = vi .fn() .mockResolvedValueOnce({ @@ -115,6 +115,7 @@ describe('pack-build-live', () => { ok: false, reason_code: 'HOSTED_PACK_EXTRACT_FAILED', }, + factory_deliver: { ready: false, reason_code: 'FACTORY_DELIVER_HEALTH_FAILED' }, }), }); vi.stubGlobal('fetch', fetchMock); @@ -126,9 +127,42 @@ describe('pack-build-live', () => { }); expect(result).toMatchObject({ - ok: true, - liveUrl: `https://uvai.io/d/${XYMC_VIDEO_ID}`, + ok: false, + reasonCode: 'HOSTED_PACK_EXTRACT_FAILED', + }); + }); + + it.each([ + { + name: 'missing health', + status: 200, + payload: { factory_deliver: { ready: false, reason_code: 'FACTORY_DELIVER_MISSING_HEALTH' } }, + }, + { + name: 'failed HTTP response with a healthy payload', + status: 503, + payload: { health: { ok: true, status: 200 } }, + }, + ])('does not report ready after a stored-pack retry with $name', async ({ status, payload }) => { + const fetchMock = vi.fn() + .mockResolvedValueOnce(Response.json({ + health: { ok: false, reason_code: 'HOSTED_PACK_NOT_FOUND' }, + })) + .mockResolvedValueOnce(Response.json({ + status: 'success', + data: { videoId: XYMC_VIDEO_ID, sourceHash: XYMC_SOURCE_HASH }, + })) + .mockResolvedValueOnce(Response.json(payload, { status })); + vi.stubGlobal('fetch', fetchMock); + + const result = await verifyPackBuildLive({ + videoId: XYMC_VIDEO_ID, + sourceHash: XYMC_SOURCE_HASH, + origin: 'https://uvai.io', }); + + expect(result.ok).toBe(false); + expect(result).not.toHaveProperty('liveUrl'); }); it('scopes pack live receipts to the selected video', () => { diff --git a/apps/web/src/lib/pack-build-live-client.ts b/apps/web/src/lib/pack-build-live-client.ts index 36cd1dd8a..b8cca81e5 100644 --- a/apps/web/src/lib/pack-build-live-client.ts +++ b/apps/web/src/lib/pack-build-live-client.ts @@ -328,16 +328,6 @@ export async function verifyPackBuildLive(input: { if (confirmed.ok) { hostVideoId = confirmed.videoId; ({ response, payload } = await fetchHealth(hostVideoId)); - if (payload.health?.ok !== true) { - const liveUrl = packBuildLiveUrl(origin, hostVideoId); - if (liveUrl) { - return { - ok: true, - liveUrl, - reasonCode: payload.factory_deliver?.reason_code ?? 'FACTORY_DELIVER_READY', - }; - } - } } } } diff --git a/apps/web/vercel.json b/apps/web/vercel.json new file mode 100644 index 000000000..02ac93f39 --- /dev/null +++ b/apps/web/vercel.json @@ -0,0 +1,7 @@ +{ + "git": { + "deploymentEnabled": { + "codex/fix-pack-readiness-20261112": false + } + } +} diff --git a/vercel.json b/vercel.json index d77369556..c0193e5da 100644 --- a/vercel.json +++ b/vercel.json @@ -1,4 +1,9 @@ { + "git": { + "deploymentEnabled": { + "codex/fix-pack-readiness-20261112": false + } + }, "framework": "nextjs", "installCommand": "npm install --legacy-peer-deps", "buildCommand": "npm run build", From d9b3393e437a84752b3bd84b775015548bc9a5cf Mon Sep 17 00:00:00 2001 From: Hayden <154503486+groupthinking@users.noreply.github.com> Date: Thu, 12 Nov 2026 17:48:59 -0600 Subject: [PATCH 2/3] chore: exclude both Studio fix review branches from deployment --- apps/web/vercel.json | 3 ++- vercel.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/web/vercel.json b/apps/web/vercel.json index 02ac93f39..8de7e294a 100644 --- a/apps/web/vercel.json +++ b/apps/web/vercel.json @@ -1,7 +1,8 @@ { "git": { "deploymentEnabled": { - "codex/fix-pack-readiness-20261112": false + "codex/fix-pack-readiness-20261112": false, + "codex/fix-studio-cancellation-20261112": false } } } diff --git a/vercel.json b/vercel.json index c0193e5da..498708ad7 100644 --- a/vercel.json +++ b/vercel.json @@ -1,7 +1,8 @@ { "git": { "deploymentEnabled": { - "codex/fix-pack-readiness-20261112": false + "codex/fix-pack-readiness-20261112": false, + "codex/fix-studio-cancellation-20261112": false } }, "framework": "nextjs", From 3825e30b8a443b1d777a581a8ef496ce80b3f7d3 Mon Sep 17 00:00:00 2001 From: Hayden <154503486+groupthinking@users.noreply.github.com> Date: Fri, 13 Nov 2026 12:30:05 -0600 Subject: [PATCH 3/3] chore: enable authorized Studio preview deployments --- apps/web/vercel.json | 8 -------- vercel.json | 6 ------ 2 files changed, 14 deletions(-) delete mode 100644 apps/web/vercel.json diff --git a/apps/web/vercel.json b/apps/web/vercel.json deleted file mode 100644 index 8de7e294a..000000000 --- a/apps/web/vercel.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "git": { - "deploymentEnabled": { - "codex/fix-pack-readiness-20261112": false, - "codex/fix-studio-cancellation-20261112": false - } - } -} diff --git a/vercel.json b/vercel.json index 498708ad7..d77369556 100644 --- a/vercel.json +++ b/vercel.json @@ -1,10 +1,4 @@ { - "git": { - "deploymentEnabled": { - "codex/fix-pack-readiness-20261112": false, - "codex/fix-studio-cancellation-20261112": false - } - }, "framework": "nextjs", "installCommand": "npm install --legacy-peer-deps", "buildCommand": "npm run build",