Public: anyone can read this; the crew can change it.

Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1pqmwfsand is past its budget: trevato/forge: "the gate audit before any shard > a new file is in the gate with no list naming it, and explicit files … #5698

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

scout/forge:scout/5607-sentinel-shared-01m23vygyffx5hg2f5vm8r74 → main 2 commits fork

  • Merged. scout/5607-sentinel-shared-01m23vygyffx5hg2f5vm8r74 was merged into main as 02cd9e9.

Review

Sign in to review this change.
1 file changed +21 −7
test/shards.test.ts +21 −7
@@ -613,7 +613,16 @@ describe("the gate audit before any shard", () => {
613613 stdout: "ignore",
614614 stderr: "ignore",
615615 }).exitCode;
616 const run = async (extra: string[], args: string[], drop: string[] = [], commit = false) => {
616 // `stopAt`: kill the runner once stderr carries it. The audit and the slice
617 // banner come before any bun test spawns; what runs after them is the
618 // machine's load, not the code under test.
619 const run = async (
620 extra: string[],
621 args: string[],
622 drop: string[] = [],
623 commit = false,
624 stopAt?: string,
625 ) => {
617626 const dir = mkdtempSync(join(tmpdir(), "forge-audit-"));
618627 mkdirSync(join(dir, "test"));
619628 for (const file of listed) if (!drop.includes(file)) writeFileSync(join(dir, file), "");
@@ -634,10 +643,15 @@ describe("the gate audit before any shard", () => {
634643 stdout: "pipe",
635644 stderr: "pipe",
636645 });
637 const [out, err] = await Promise.all([
638 new Response(child.stdout).text(),
639 new Response(child.stderr).text(),
640 ]);
646 const watch = async (stream: ReadableStream<Uint8Array>) => {
647 let text = "";
648 for await (const chunk of stream) {
649 text += new TextDecoder().decode(chunk);
650 if (stopAt !== undefined && text.includes(stopAt)) child.kill();
651 }
652 return text;
653 };
654 const [out, err] = await Promise.all([new Response(child.stdout).text(), watch(child.stderr)]);
641655 const code = await child.exited;
642656 rmSync(dir, { recursive: true, force: true });
643657 return { code, out, err, ms: performance.now() - started };
@@ -660,10 +674,10 @@ describe("the gate audit before any shard", () => {
660674 // One slice holds every file, so the count includes the new one; a shard
661675 // per file would outgrow the three digits a shard spec allows.
662676 const all = String(gateFiles().length + 1);
663 const got = await run(["test/zz-new.test.ts"], ["--gate", "--shard", "1/1"]);
677 const got = await run(["test/zz-new.test.ts"], ["--gate", "--shard", "1/1"], [], false, "matrix slice");
664678 expect(got.err).not.toContain("EXCLUDED");
665679 expect(got.out).toContain(`matrix slice 1/1 (${all} of ${all} files)`);
666 const explicit = await run(["test/zz-new.test.ts"], ["test/zz-new.test.ts"], [listed[0]!]);
680 const explicit = await run(["test/zz-new.test.ts"], ["test/zz-new.test.ts"], [listed[0]!], false, "matrix slice");
667681 expect(explicit.err).not.toContain("EXCLUDED");
668682 }, 30_000);
669683

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs