diff --git a/ROADMAP.md b/ROADMAP.md index b1d1ca9..1d6a408 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -5,8 +5,9 @@ meaning should land in pacts, not in the envelope. ## Now -- First public release of the one package: `@deepfates/lync` (library, indexes, - client, relay, and the `lync` command). +- The public package is `@deepfates/lync` 0.3.0. Main is prepared as 0.4.0, + adding typed ephemeral presence and shipping the format and pacts in the npm + tarball; the remaining release step is publication. - Keep `FORMAT.md` and the test vectors aligned as the reference other languages can port. diff --git a/test/cli/loss-free-trial.integration.test.ts b/test/cli/loss-free-trial.integration.test.ts index 55c4f83..d73a064 100644 --- a/test/cli/loss-free-trial.integration.test.ts +++ b/test/cli/loss-free-trial.integration.test.ts @@ -1,5 +1,5 @@ import { afterEach, describe, expect, it } from "vitest"; -import { chmod, mkdir, mkdtemp, readFile, writeFile } from "node:fs/promises"; +import { chmod, mkdtemp, readFile, writeFile } from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { createMemoryEventStore } from "@deepfates/lync/memory-log"; @@ -228,11 +228,13 @@ describe("loss-free trial (dee-i1wc): the milestone-6 durability proof", () => { } } - // ---- Emit the inspectable trial artifact (parity with golarion dee-3fxq) + // ---- Emit an inspectable per-run trial artifact ---------------------- // 'done' is not quietly 'tests pass': write a person-readable record of // every appended id, where it landed (each client's store + the relay's - // on-disk .lync), and every surfaced failure — the same evidence the - // assertions above checked, made replayable by an outside reader. + // on-disk .lync), and every surfaced failure. Keep the live artifact in + // this trial's isolated temporary directory: recorded_at and relay + // generation ids are intentionally different on every run, so ordinary + // verification must never rewrite the checked-in historical witness. const promisedIds = [...promised()].sort(); const landing: Record; onDisk: boolean }> = {}; for (const id of promisedIds) { @@ -266,10 +268,9 @@ describe("loss-free trial (dee-i1wc): the milestone-6 durability proof", () => { { leg: "c", name: "server restart (new log generation)", event_ids: ["post"], surfaced: "generation changed on every client; backlog re-pushed, x1 finally reached disk" }, ], }; - const trialsDir = new URL("../../docs/trials/", import.meta.url); - await mkdir(trialsDir, { recursive: true }); - const artifactPath = new URL("loss-free-trial.json", trialsDir); + const artifactPath = path.join(dir, "loss-free-trial.json"); await writeFile(artifactPath, JSON.stringify(artifact, null, 2) + "\n"); + expect(JSON.parse(await readFile(artifactPath, "utf8"))).toEqual(artifact); // The artifact must describe an actually loss-free run: nothing missing. for (const id of promisedIds) {