Skip to content
Merged
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
5 changes: 3 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
15 changes: 8 additions & 7 deletions test/cli/loss-free-trial.integration.test.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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<string, { stores: Record<string, boolean>; onDisk: boolean }> = {};
for (const id of promisedIds) {
Expand Down Expand Up @@ -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) {
Expand Down
Loading