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

Full suite red: test/snapshot-incremental.test.ts #12766

Merged opened this in answer to

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

Merged

mason/forge:mason/12742-full-suite-red-test-snapshot-incremental → main 1 commit fork 1 thread · 1 unresolved

  • Merged. mason/12742-full-suite-red-test-snapshot-incremental was merged into main as d422d61.

Review

Sign in to review this change.
2 files changed +15 −12
scripts/gate.ts +1
@@ -155,6 +155,7 @@ export const SLOW: readonly Exclusion[] = [
155155 { file: "test/shards-run.test.ts", reason: "runs scripts/test-shards.ts as a child process on fixture trees, per case; 4.4 s a test on the gate box", issue: 1242 },
156156 { file: "test/signup-fresh.test.ts", reason: "boots main.ts on an empty data directory as a real process; 3.1 s a test on the gate box", issue: 1242 },
157157 { file: "test/signup-gate-parent.test.ts", reason: "walks every caller of createUser in the source tree; 2.3 s a test on the gate box", issue: 1242 },
158 { file: "test/snapshot-incremental.test.ts", reason: "takes real snapshots of a forge: git bundles, sqlite copies and sealed scrypt lanes, four times over; 22 s a file under load", issue: 12742 },

Fine as a stopgap. Ownership is on #12742: the exit is a cheaper setup, not a longer budget.

158159 { file: "test/snapshot-uplink.test.ts", reason: "uploads a 400 MB snapshot in parts through a throttled uplink; 4.5 s a test on the gate box", issue: 1242 },
159160 { file: "test/spawn-cell-e2e.test.ts", reason: "spawns a real child forge into a bwrap cell and waits for its app to answer; 25.9 s the file on the gate box", issue: 12647 },
160161 { file: "test/spawn-move-cell-e2e.test.ts", reason: "moves a running child forge into a real cell with its data, repository and app; 13.1 s a test on the gate box", issue: 1242 },
test/snapshot-incremental.test.ts +14 −12
@@ -314,7 +314,7 @@ describe("a forge snapshotted again and again", () => {
314314 writeFileSync(dataFile("ssh", "host_ed25519"), "not a real host key\n");
315315 // A file that is neither a database nor a bundle, big enough for many content cuts: it stands
316316 // for a pack.
317 writeFileSync(dataFile("ssh", "pack.bin"), noise(2 * MIB, 31));
317 writeFileSync(dataFile("ssh", "pack.bin"), noise(MIB, 31));
318318 log("a.log", "alpha\n".repeat(2000), "2026-10-10");
319319 log("b.log", new Uint8Array([0xff, 0xfe, 0x00, 0x01, 0x80]), "2026-10-10");
320320 log(
@@ -569,20 +569,22 @@ describe("a forge snapshotted again and again", () => {
569569 const wrong = sealedStore(s3Store(target, 3), "another passphrase", {
570570 create: false,
571571 });
572 await expect(listSnapshots(wrong)).rejects.toThrow(
573 /does not open the lane/,
574 );
575 await expect(verifySnapshot(wrong, m3.name)).rejects.toThrow(
576 /does not open the lane/,
577 );
578 await expect(
579 restoreSnapshot(wrong, m3.name, fresh("wrong"), { passphrase: PASS }),
580 ).rejects.toThrow(/does not open the lane/);
572 // The wrong keys are derived beside the refusals: scrypt runs off the main thread.
573 const refused = Promise.all([
574 expect(listSnapshots(wrong)).rejects.toThrow(/does not open the lane/),
575 expect(verifySnapshot(wrong, m3.name)).rejects.toThrow(/does not open the lane/),
576 expect(
577 restoreSnapshot(wrong, m3.name, fresh("wrong"), { passphrase: PASS }),
578 ).rejects.toThrow(/does not open the lane/),
579 ]);
581580 // And with the keys that passphrase gives under the lane's own salt, no object opens.
582581 const header = parseHeader(objects.get(LANE_HEADER)!);
583582 if (typeof header === "string") throw new Error(header);
584 const wrongKeys = await sealKeys("another passphrase", header.salt);
585 const rightKeys = await sealKeys(PASS, header.salt);
583 const [wrongKeys, rightKeys] = await Promise.all([
584 sealKeys("another passphrase", header.salt),
585 sealKeys(PASS, header.salt),
586 ]);
587 await refused;
586588 for (const [key, body] of objects) {
587589 if (key === LANE_HEADER) continue;
588590 expect(() => openBody(wrongKeys, body, key)).toThrow(

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs