diff --git a/test/artifacts/phase-0-candidate.test.ts b/test/artifacts/phase-0-candidate.test.ts index bb34f89..8b73516 100644 --- a/test/artifacts/phase-0-candidate.test.ts +++ b/test/artifacts/phase-0-candidate.test.ts @@ -77,25 +77,33 @@ test("isolatedEnv strips script-specific path overrides that could re-point at t } }); -test("packs all workspace packages into local tarballs without publishing", () => { - const packs = packWorkspacePackages(); - expect(packs.map((p) => p.packageName)).toEqual([CORE, OPENCODE, CURSOR, CLI]); - for (const pack of packs) { - expect(existsSync(pack.tarball), pack.packageName).toBe(true); - expect(pack.sha256).toMatch(/^[0-9a-f]{64}$/); - expect(listTarball(pack.tarball).length, pack.packageName).toBeGreaterThan(0); - } -}); +test( + "packs all workspace packages into local tarballs without publishing", + () => { + const packs = packWorkspacePackages(); + expect(packs.map((p) => p.packageName)).toEqual([CORE, OPENCODE, CURSOR, CLI]); + for (const pack of packs) { + expect(existsSync(pack.tarball), pack.packageName).toBe(true); + expect(pack.sha256).toMatch(/^[0-9a-f]{64}$/); + expect(listTarball(pack.tarball).length, pack.packageName).toBeGreaterThan(0); + } + }, + { timeout: 60_000 }, +); -test("the final release candidate is byte-stable with the phase-0 pack (CA-30)", () => { - // Force a fresh pack against the earlier (cached) phase-0 pack: comparing two - // calls that both hit the module cache would be comparing an array with - // itself (D12). Order matters — packWorkspacePackages() must run first so the - // force actually repacks. - const packs = packWorkspacePackages(); - const candidate = packReleaseCandidate({ force: true }); - expect(candidate.map((p) => p.sha256)).toEqual(packs.map((p) => p.sha256)); -}); +test( + "the final release candidate is byte-stable with the phase-0 pack (CA-30)", + () => { + // Force a fresh pack against the earlier (cached) phase-0 pack: comparing two + // calls that both hit the module cache would be comparing an array with + // itself (D12). Order matters — packWorkspacePackages() must run first so the + // force actually repacks. + const packs = packWorkspacePackages(); + const candidate = packReleaseCandidate({ force: true }); + expect(candidate.map((p) => p.sha256)).toEqual(packs.map((p) => p.sha256)); + }, + { timeout: 60_000 }, +); test("packed adapter core dependency equals the packed core version (RR-01)", () => { const packs = packWorkspacePackages(); diff --git a/test/workit-core/doctor.test.ts b/test/workit-core/doctor.test.ts index 918672b..90c2bcf 100644 --- a/test/workit-core/doctor.test.ts +++ b/test/workit-core/doctor.test.ts @@ -1233,10 +1233,18 @@ test( encoding: "utf8", timeout: 300_000, }); - expect(r.status, r.stderr.slice(0, 2000)).toBe(0); - const output = `${r.stdout ?? ""}\n${r.stderr ?? ""}`; - expect(output).not.toMatch(/usage: git diff/); - expect(output).not.toMatch(/fatal: /); + // Head + tail: bun prints failures at the END of stderr, and a head-only + // slice truncated the real failing test name out of CI logs (the flake + // seen on the v0.9.2 sync merge). + const evidence = `${r.stdout ?? ""}\n${r.stderr ?? ""}`; + expect( + r.status, + `${r.stderr?.slice(0, 1200) ?? ""}\n---stderr tail---\n${ + r.stderr?.slice(-1500) ?? "" + }\n---stdout tail---\n${r.stdout?.slice(-800) ?? ""}`, + ).toBe(0); + expect(evidence).not.toMatch(/usage: git diff/); + expect(evidence).not.toMatch(/fatal: /); }, { timeout: 300_000 }, );