@rulvar/store-conformance 1.25.0 → 1.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -468,12 +468,21 @@ function journalStoreConformance(mk) {
|
|
|
468
468
|
budgetUsd: 12.5,
|
|
469
469
|
segments: 3,
|
|
470
470
|
argsProvided: true,
|
|
471
|
-
argsHash: "a".repeat(64)
|
|
471
|
+
argsHash: "a".repeat(64),
|
|
472
|
+
genesis: "g".repeat(26)
|
|
472
473
|
}));
|
|
473
474
|
const roundTripped = (await store.listRuns()).find((candidate) => candidate.runId === RUN$1);
|
|
474
475
|
ensure(roundTripped?.budgetUsd === 12.5, "meta-separation", "putMeta/listRuns must round-trip optional RunMeta fields (budgetUsd)");
|
|
475
476
|
ensure(roundTripped?.segments === 3, "meta-separation", "putMeta/listRuns must round-trip optional RunMeta fields (segments)");
|
|
476
477
|
ensure(roundTripped?.argsProvided === true && roundTripped.argsHash === "a".repeat(64), "meta-separation", "putMeta/listRuns must round-trip optional RunMeta fields (argsProvided, argsHash)");
|
|
478
|
+
ensure(roundTripped?.genesis === "g".repeat(26), "meta-separation", "putMeta/listRuns must round-trip optional RunMeta fields (genesis)");
|
|
479
|
+
ensure((await store.listRuns({ statuses: ["suspended", "running"] })).some((candidate) => candidate.runId === RUN$1), "meta-separation", "listRuns({ statuses }) must include every meta whose status matches (supersets are allowed, drops are not)");
|
|
480
|
+
const lookup = store.getMeta;
|
|
481
|
+
if (typeof lookup === "function") {
|
|
482
|
+
const fetched = await lookup.call(store, RUN$1);
|
|
483
|
+
ensure(fetched?.runId === RUN$1 && fetched.genesis === "g".repeat(26), "meta-separation", "getMeta must return the stored meta for an existing run");
|
|
484
|
+
ensure(await lookup.call(store, "conformance-missing-run") === void 0, "meta-separation", "getMeta must resolve undefined for a missing run, never reject");
|
|
485
|
+
}
|
|
477
486
|
await store.delete(RUN$1);
|
|
478
487
|
ensure((await store.load(RUN$1)).length === 0 && !(await store.listRuns()).some((candidate) => candidate.runId === RUN$1), "meta-separation", "delete must remove the journal and the meta record");
|
|
479
488
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/store-conformance",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "Rulvar executable store conformance kit (DEF-4).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@rulvar/core": "1.
|
|
25
|
+
"@rulvar/core": "1.26.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.20.0",
|