@rulvar/store-conformance 1.70.0 → 1.71.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.d.ts +10 -9
- package/dist/index.js +2 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -403,14 +403,15 @@ interface KillPointScenarioOptions {
|
|
|
403
403
|
/** Store location handed to the worker config; default `join(dir, 'kp.db')`. */
|
|
404
404
|
storePath?: string;
|
|
405
405
|
/**
|
|
406
|
-
* The WORKER'S lease ttl; default
|
|
407
|
-
* after the kill
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
406
|
+
* The WORKER'S lease ttl; default 2000 ms. The referee waits it out
|
|
407
|
+
* after the kill (retrying the resume on the typed rejection), so it
|
|
408
|
+
* stays short, but NOT so short that a scheduler stall on a loaded
|
|
409
|
+
* test runner can expire the WORKER'S own lease between its renewals
|
|
410
|
+
* before the kill point is even reached: a lost lease cancels the run
|
|
411
|
+
* by contract, the worker then exits zero as ran-to-completion, and
|
|
412
|
+
* the scenario reads a self-inflicted takeover as a violation. The
|
|
413
|
+
* same reasoning keeps the referee's own store (the `openStore`
|
|
414
|
+
* fixture) on its GENEROUS default ttl.
|
|
414
415
|
*/
|
|
415
416
|
ttlMs?: number;
|
|
416
417
|
/**
|
|
@@ -452,7 +453,7 @@ interface KillPointConformanceOptions {
|
|
|
452
453
|
dir: string;
|
|
453
454
|
/** Fresh isolation per scenario: store location and referee opener. */
|
|
454
455
|
prepare: (scenario: KillPointScenario) => Promise<KillPointTarget> | KillPointTarget;
|
|
455
|
-
/** The worker's lease ttl (see {@link KillPointScenarioOptions.ttlMs}); default
|
|
456
|
+
/** The worker's lease ttl (see {@link KillPointScenarioOptions.ttlMs}); default 2000 ms. */
|
|
456
457
|
ttlMs?: number;
|
|
457
458
|
/** Extra `node` arguments placed before the writer script. */
|
|
458
459
|
execArgv?: string[];
|
package/dist/index.js
CHANGED
|
@@ -2141,7 +2141,7 @@ async function runKillPointScenario(options) {
|
|
|
2141
2141
|
const named = typeof options.scenario === "string" ? options.scenario : options.scenario.id;
|
|
2142
2142
|
throw new Error(`store-conformance kill-points: unknown scenario '${named}'`);
|
|
2143
2143
|
}
|
|
2144
|
-
const ttlMs = options.ttlMs ??
|
|
2144
|
+
const ttlMs = options.ttlMs ?? 2e3;
|
|
2145
2145
|
const storePath = options.storePath ?? join(options.dir, "kp.db");
|
|
2146
2146
|
const reportPath = join(options.dir, `kill-report-${scenario.id}.jsonl`);
|
|
2147
2147
|
const runId = `kp-${scenario.id}`;
|
|
@@ -2186,7 +2186,7 @@ async function runKillPointScenario(options) {
|
|
|
2186
2186
|
const kills = events.filter((e) => e.t === "kill");
|
|
2187
2187
|
const completed = events.find((e) => e.t === "ran-to-completion");
|
|
2188
2188
|
const fatal = events.find((e) => e.t === "fatal");
|
|
2189
|
-
if (exit.signal !== "SIGKILL") violations.push(`the worker must die by SIGKILL at the configured write; exit code ${String(exit.code)}, signal ${String(exit.signal)}` + (completed === void 0 ? "" :
|
|
2189
|
+
if (exit.signal !== "SIGKILL") violations.push(`the worker must die by SIGKILL at the configured write; exit code ${String(exit.code)}, signal ${String(exit.signal)}` + (completed === void 0 ? "" : ` (it ran to completion with status '${completed.status}': the kill point was never reached)`) + (fatal === void 0 ? "" : ` (fatal: ${fatal.message})`) + (stderr === "" ? "" : `; stderr: ${stderr.slice(0, 2e3)}`));
|
|
2190
2190
|
if (kills.length !== 1) violations.push(`expected exactly one kill event, saw ${String(kills.length)}`);
|
|
2191
2191
|
else {
|
|
2192
2192
|
const kill = kills[0];
|
|
@@ -2194,7 +2194,6 @@ async function runKillPointScenario(options) {
|
|
|
2194
2194
|
}
|
|
2195
2195
|
if (childCalls !== scenario.expected.childCalls) violations.push(`the child paid ${String(childCalls)} provider calls before dying, expected ` + String(scenario.expected.childCalls));
|
|
2196
2196
|
if (childTools !== scenario.expected.childToolExecutions) violations.push(`the child executed ${String(childTools)} tools before dying, expected ` + String(scenario.expected.childToolExecutions));
|
|
2197
|
-
await sleep(ttlMs * 2);
|
|
2198
2197
|
let resumeCalls = 0;
|
|
2199
2198
|
let resumeTools = 0;
|
|
2200
2199
|
const fixture = await options.openStore();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/store-conformance",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.71.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.71.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.20.0",
|