Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 26 additions & 18 deletions test/artifacts/phase-0-candidate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
16 changes: 12 additions & 4 deletions test/workit-core/doctor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
);
Loading