@remnic/core 10.0.162 → 10.0.163
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/access-admin-ops-surface.js +37 -37
- package/dist/access-cli.js +37 -37
- package/dist/access-extraction-force-flush-preempt.js +37 -37
- package/dist/access-extraction-force-flush.js +37 -37
- package/dist/access-http-briefing.js +37 -37
- package/dist/access-http-query.js +37 -37
- package/dist/access-http.js +37 -37
- package/dist/access-identity-continuity-surface.js +37 -37
- package/dist/access-lcm-surface.js +37 -37
- package/dist/access-mcp.js +37 -37
- package/dist/access-observe-write-surface.js +37 -37
- package/dist/access-operations-batch.js +37 -37
- package/dist/access-operations.js +37 -37
- package/dist/access-recall-concurrency.js +37 -37
- package/dist/access-recall-diagnostics.js +2 -2
- package/dist/access-recall-response.js +37 -37
- package/dist/access-recall-surface.js +37 -37
- package/dist/access-service.js +37 -37
- package/dist/active-recall.js +3 -3
- package/dist/briefing.js +3 -3
- package/dist/causal-consolidation.js +4 -4
- package/dist/{chunk-D2EJNBZS.js → chunk-22VXXA67.js} +2 -2
- package/dist/{chunk-23ODHEVS.js → chunk-3QLAOYBL.js} +2 -2
- package/dist/{chunk-HG4OCRKD.js → chunk-4HKK5HUI.js} +2 -2
- package/dist/{chunk-6POF4N2J.js → chunk-4LPTSB5V.js} +2 -2
- package/dist/{chunk-6HGN4OEA.js → chunk-5D4NBANY.js} +2 -2
- package/dist/{chunk-6HGN4OEA.js.map → chunk-5D4NBANY.js.map} +1 -1
- package/dist/{chunk-FDR5YW6B.js → chunk-5LTXYM7D.js} +2 -2
- package/dist/{chunk-SC7GUUGO.js → chunk-5MXKS25U.js} +3 -3
- package/dist/{chunk-ZZZT6OR2.js → chunk-6ARSFTLD.js} +2 -2
- package/dist/{chunk-ZVK6TWGF.js → chunk-ARJ3KCX4.js} +2 -2
- package/dist/{chunk-LW5MFJBC.js → chunk-AU6AEUFD.js} +2 -2
- package/dist/{chunk-A6E54ILI.js → chunk-DBVSU3HE.js} +8 -8
- package/dist/{chunk-PZSVAVQW.js → chunk-E5RJPLNL.js} +2 -2
- package/dist/{chunk-S3QTZMSD.js → chunk-EI2M2CFJ.js} +2 -2
- package/dist/{chunk-6RW6I6X4.js → chunk-FSI45NUK.js} +2 -2
- package/dist/{chunk-IF5YAXBY.js → chunk-GDAFI6HH.js} +33 -33
- package/dist/{chunk-IF5YAXBY.js.map → chunk-GDAFI6HH.js.map} +1 -1
- package/dist/{chunk-MATBXHXU.js → chunk-JJEQRSYU.js} +2 -2
- package/dist/{chunk-SHFN2RW5.js → chunk-JVIWVJ2A.js} +2 -2
- package/dist/{chunk-Q2WMKMMX.js → chunk-KR6PEAM4.js} +7 -7
- package/dist/{chunk-R4HZOXUY.js → chunk-L6BLTV4D.js} +2 -2
- package/dist/{chunk-T4V3GVX3.js → chunk-OAGTKS73.js} +2 -2
- package/dist/{chunk-FEHCP2ZN.js → chunk-PCUDFWX5.js} +2 -2
- package/dist/{chunk-DQATNC34.js → chunk-QBREZ4QL.js} +2 -2
- package/dist/{chunk-WE7WPSUA.js → chunk-RDO6AMDL.js} +2 -2
- package/dist/{chunk-UGTLRFN4.js → chunk-RH6XWXMA.js} +3 -3
- package/dist/{chunk-QRGJLMH7.js → chunk-SBU5GDOT.js} +3 -3
- package/dist/{chunk-YCOHRQWO.js → chunk-SOGOHLWN.js} +1 -1
- package/dist/chunk-SOGOHLWN.js.map +1 -0
- package/dist/{chunk-SHLEP3HN.js → chunk-SRN5M4LQ.js} +3 -3
- package/dist/{chunk-JAPUF4X7.js → chunk-TFNZXOXK.js} +2 -2
- package/dist/{chunk-6CXSNIEP.js → chunk-UGQEJWR3.js} +2 -2
- package/dist/{chunk-VEPXXXTO.js → chunk-V6M6N3EE.js} +2 -2
- package/dist/{chunk-QQPXWVRX.js → chunk-VXMWTRQX.js} +2 -2
- package/dist/{chunk-SMAXKFKS.js → chunk-WAJL65KW.js} +3 -3
- package/dist/{chunk-SOO75MET.js → chunk-WRAK5LLB.js} +2 -2
- package/dist/{chunk-IVZNNRBF.js → chunk-XE4UYWW3.js} +2 -2
- package/dist/{chunk-JGIRGWS6.js → chunk-YMC4AYJK.js} +2 -2
- package/dist/{chunk-D67DA4DI.js → chunk-YWPCDR3I.js} +2 -2
- package/dist/{chunk-UVEHXFSC.js → chunk-Z3SXC3MP.js} +2 -2
- package/dist/{chunk-NFL4LC22.js → chunk-ZRLTQ2Y7.js} +2 -2
- package/dist/cli.js +37 -37
- package/dist/coding/export-okf-codegraph.js +2 -2
- package/dist/compounding/engine.js +4 -4
- package/dist/config.js +3 -3
- package/dist/connectors/codex-materialize-runner.js +3 -3
- package/dist/connectors/index.js +3 -3
- package/dist/convergence-refresh.js +5 -5
- package/dist/corpus-watermark.js +5 -5
- package/dist/entity-retrieval.js +3 -3
- package/dist/explicit-capture.js +37 -37
- package/dist/extraction.js +3 -3
- package/dist/harmonic-retrieval.js +3 -3
- package/dist/index.js +37 -37
- package/dist/location/index.js +4 -4
- package/dist/maintenance/memory-governance.js +3 -3
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
- package/dist/maintenance/rebuild-memory-projection-runner.js +5 -5
- package/dist/maintenance/rebuild-memory-projection.js +4 -4
- package/dist/namespaces/migrate.js +4 -4
- package/dist/namespaces/storage.js +3 -3
- package/dist/operator-doctor-corpus.js +6 -6
- package/dist/operator-toolkit.js +10 -10
- package/dist/orchestration/backlog-scheduler.js +38 -38
- package/dist/orchestration/buffer-drain-runner.js +38 -38
- package/dist/orchestration/maintenance.js +11 -11
- package/dist/orchestrator.js +37 -37
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.js +2 -2
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-navigation.js +37 -37
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.js +2 -2
- package/dist/resume-bundles.js +4 -4
- package/dist/semantic-consolidation.js +4 -4
- package/dist/semantic-rule-promotion.js +3 -3
- package/dist/semantic-rule-verifier.js +3 -3
- package/dist/source-agent-qualifier.js +3 -3
- package/dist/standup/build.js +3 -3
- package/dist/storage.js +2 -2
- package/dist/transfer/export-okf.js +3 -3
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/verified-recall.js +3 -3
- package/dist/who-knows-cli.js +4 -4
- package/dist/who-knows.js +3 -3
- package/package.json +2 -2
- package/src/access-observe-replay-durability.test.ts +23 -3
- package/src/buffer-admission-idempotency.test.ts +1 -1
- package/src/buffer-ingress-invariant.test.ts +1 -1
- package/src/config.test.ts +3 -2
- package/src/config.ts +1 -1
- package/src/extraction-queue-concurrency-default.test.ts +107 -0
- package/src/orchestration/extraction-queue-coordinator.ts +1 -1
- package/src/orchestrator-extraction-queue.test.ts +3 -3
- package/src/orchestrator-flush.test.ts +12 -12
- package/src/types.ts +1 -1
- package/dist/chunk-YCOHRQWO.js.map +0 -1
- /package/dist/{chunk-D2EJNBZS.js.map → chunk-22VXXA67.js.map} +0 -0
- /package/dist/{chunk-23ODHEVS.js.map → chunk-3QLAOYBL.js.map} +0 -0
- /package/dist/{chunk-HG4OCRKD.js.map → chunk-4HKK5HUI.js.map} +0 -0
- /package/dist/{chunk-6POF4N2J.js.map → chunk-4LPTSB5V.js.map} +0 -0
- /package/dist/{chunk-FDR5YW6B.js.map → chunk-5LTXYM7D.js.map} +0 -0
- /package/dist/{chunk-SC7GUUGO.js.map → chunk-5MXKS25U.js.map} +0 -0
- /package/dist/{chunk-ZZZT6OR2.js.map → chunk-6ARSFTLD.js.map} +0 -0
- /package/dist/{chunk-ZVK6TWGF.js.map → chunk-ARJ3KCX4.js.map} +0 -0
- /package/dist/{chunk-LW5MFJBC.js.map → chunk-AU6AEUFD.js.map} +0 -0
- /package/dist/{chunk-A6E54ILI.js.map → chunk-DBVSU3HE.js.map} +0 -0
- /package/dist/{chunk-PZSVAVQW.js.map → chunk-E5RJPLNL.js.map} +0 -0
- /package/dist/{chunk-S3QTZMSD.js.map → chunk-EI2M2CFJ.js.map} +0 -0
- /package/dist/{chunk-6RW6I6X4.js.map → chunk-FSI45NUK.js.map} +0 -0
- /package/dist/{chunk-MATBXHXU.js.map → chunk-JJEQRSYU.js.map} +0 -0
- /package/dist/{chunk-SHFN2RW5.js.map → chunk-JVIWVJ2A.js.map} +0 -0
- /package/dist/{chunk-Q2WMKMMX.js.map → chunk-KR6PEAM4.js.map} +0 -0
- /package/dist/{chunk-R4HZOXUY.js.map → chunk-L6BLTV4D.js.map} +0 -0
- /package/dist/{chunk-T4V3GVX3.js.map → chunk-OAGTKS73.js.map} +0 -0
- /package/dist/{chunk-FEHCP2ZN.js.map → chunk-PCUDFWX5.js.map} +0 -0
- /package/dist/{chunk-DQATNC34.js.map → chunk-QBREZ4QL.js.map} +0 -0
- /package/dist/{chunk-WE7WPSUA.js.map → chunk-RDO6AMDL.js.map} +0 -0
- /package/dist/{chunk-UGTLRFN4.js.map → chunk-RH6XWXMA.js.map} +0 -0
- /package/dist/{chunk-QRGJLMH7.js.map → chunk-SBU5GDOT.js.map} +0 -0
- /package/dist/{chunk-SHLEP3HN.js.map → chunk-SRN5M4LQ.js.map} +0 -0
- /package/dist/{chunk-JAPUF4X7.js.map → chunk-TFNZXOXK.js.map} +0 -0
- /package/dist/{chunk-6CXSNIEP.js.map → chunk-UGQEJWR3.js.map} +0 -0
- /package/dist/{chunk-VEPXXXTO.js.map → chunk-V6M6N3EE.js.map} +0 -0
- /package/dist/{chunk-QQPXWVRX.js.map → chunk-VXMWTRQX.js.map} +0 -0
- /package/dist/{chunk-SMAXKFKS.js.map → chunk-WAJL65KW.js.map} +0 -0
- /package/dist/{chunk-SOO75MET.js.map → chunk-WRAK5LLB.js.map} +0 -0
- /package/dist/{chunk-IVZNNRBF.js.map → chunk-XE4UYWW3.js.map} +0 -0
- /package/dist/{chunk-JGIRGWS6.js.map → chunk-YMC4AYJK.js.map} +0 -0
- /package/dist/{chunk-D67DA4DI.js.map → chunk-YWPCDR3I.js.map} +0 -0
- /package/dist/{chunk-UVEHXFSC.js.map → chunk-Z3SXC3MP.js.map} +0 -0
- /package/dist/{chunk-NFL4LC22.js.map → chunk-ZRLTQ2Y7.js.map} +0 -0
package/src/config.test.ts
CHANGED
|
@@ -3149,8 +3149,9 @@ test("parseConfig rejects plaintext non-loopback backgroundGeneration endpoints"
|
|
|
3149
3149
|
});
|
|
3150
3150
|
});
|
|
3151
3151
|
|
|
3152
|
-
test("parseConfig: extractionQueueConcurrency defaults to
|
|
3153
|
-
assert.equal(parseConfig({}).extractionQueueConcurrency,
|
|
3152
|
+
test("parseConfig: extractionQueueConcurrency defaults to bounded-parallel 2 and validates as a positive integer", () => {
|
|
3153
|
+
assert.equal(parseConfig({}).extractionQueueConcurrency, 2);
|
|
3154
|
+
assert.equal(parseConfig({ extractionQueueConcurrency: 1 }).extractionQueueConcurrency, 1);
|
|
3154
3155
|
assert.equal(parseConfig({ extractionQueueConcurrency: 2 }).extractionQueueConcurrency, 2);
|
|
3155
3156
|
for (const invalid of [0, -1, 1.5, "two"]) {
|
|
3156
3157
|
assert.throws(
|
package/src/config.ts
CHANGED
|
@@ -1597,7 +1597,7 @@ export function parseConfig(
|
|
|
1597
1597
|
// capture (retryable) instead of growing without bound during an outage.
|
|
1598
1598
|
bufferMaxTurnsPerSession: parsePositiveInteger(cfg.bufferMaxTurnsPerSession, "bufferMaxTurnsPerSession") ?? 200,
|
|
1599
1599
|
extractionQueueConcurrency:
|
|
1600
|
-
parsePositiveInteger(cfg.extractionQueueConcurrency, "extractionQueueConcurrency") ??
|
|
1600
|
+
parsePositiveInteger(cfg.extractionQueueConcurrency, "extractionQueueConcurrency") ?? 2,
|
|
1601
1601
|
bufferMaxMinutes:
|
|
1602
1602
|
typeof cfg.bufferMaxMinutes === "number" ? cfg.bufferMaxMinutes : 15,
|
|
1603
1603
|
// Surprise-gated buffer flush (issue #563, D-MEM). See types.ts for
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import test from "node:test";
|
|
3
|
+
|
|
4
|
+
import { parseConfig } from "./config.js";
|
|
5
|
+
import {
|
|
6
|
+
ExtractionQueueCoordinator,
|
|
7
|
+
type ExtractionQueueTask,
|
|
8
|
+
} from "./orchestration/extraction-queue-coordinator.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Bounded-concurrency default regressions: the extraction queue ships
|
|
12
|
+
* bounded-parallel instead of serial, an explicit operator value — including
|
|
13
|
+
* a deployed serial `1` — always wins over the default, and the default
|
|
14
|
+
* limit still serializes work sharing a session key.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/** Parked queue task with deterministic start/release handles. */
|
|
18
|
+
function makeParkedTask() {
|
|
19
|
+
const started = Promise.withResolvers<void>();
|
|
20
|
+
const release = Promise.withResolvers<void>();
|
|
21
|
+
let didStart = false;
|
|
22
|
+
const task: ExtractionQueueTask = async () => {
|
|
23
|
+
didStart = true;
|
|
24
|
+
started.resolve();
|
|
25
|
+
await release.promise;
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
task,
|
|
29
|
+
startedPromise: started.promise,
|
|
30
|
+
release: () => release.resolve(),
|
|
31
|
+
get started() {
|
|
32
|
+
return didStart;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
async function startedWithin(promise: Promise<void>, timeoutMs = 1_000): Promise<boolean> {
|
|
38
|
+
const result = Promise.withResolvers<boolean>();
|
|
39
|
+
const timeout = setTimeout(() => result.resolve(false), timeoutMs);
|
|
40
|
+
void promise.then(() => result.resolve(true));
|
|
41
|
+
try {
|
|
42
|
+
return await result.promise;
|
|
43
|
+
} finally {
|
|
44
|
+
clearTimeout(timeout);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
test("parseConfig: extractionQueueConcurrency defaults to bounded-parallel 2", () => {
|
|
49
|
+
assert.equal(parseConfig({}).extractionQueueConcurrency, 2);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
test("parseConfig: an explicit operator value wins over the default (serial 1 stays serial)", () => {
|
|
53
|
+
assert.equal(parseConfig({ extractionQueueConcurrency: 1 }).extractionQueueConcurrency, 1);
|
|
54
|
+
assert.equal(parseConfig({ extractionQueueConcurrency: 4 }).extractionQueueConcurrency, 4);
|
|
55
|
+
for (const invalid of [0, -1, 1.5, "two"]) {
|
|
56
|
+
assert.throws(
|
|
57
|
+
() => parseConfig({ extractionQueueConcurrency: invalid }),
|
|
58
|
+
/extractionQueueConcurrency must be a positive integer/,
|
|
59
|
+
`expected rejection for ${JSON.stringify(invalid)}`,
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
test("default coordinator limit is 2", () => {
|
|
65
|
+
assert.equal(new ExtractionQueueCoordinator().maxConcurrency, 2);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test("default coordinator runs two distinct sessions concurrently, not three", async () => {
|
|
69
|
+
const coordinator = new ExtractionQueueCoordinator();
|
|
70
|
+
const first = makeParkedTask();
|
|
71
|
+
const second = makeParkedTask();
|
|
72
|
+
const third = makeParkedTask();
|
|
73
|
+
coordinator.enqueue(first.task, { key: "session-a" });
|
|
74
|
+
coordinator.enqueue(second.task, { key: "session-b" });
|
|
75
|
+
coordinator.enqueue(third.task, { key: "session-c" });
|
|
76
|
+
try {
|
|
77
|
+
assert.equal(await startedWithin(first.startedPromise), true, "first session should start");
|
|
78
|
+
assert.equal(await startedWithin(second.startedPromise), true, "second session should start in parallel");
|
|
79
|
+
assert.equal(third.started, false, "the third task must stay queued: the default limit is 2, not unbounded");
|
|
80
|
+
first.release();
|
|
81
|
+
assert.equal(await startedWithin(third.startedPromise), true, "a freed slot should start the third task");
|
|
82
|
+
} finally {
|
|
83
|
+
first.release();
|
|
84
|
+
second.release();
|
|
85
|
+
third.release();
|
|
86
|
+
assert.equal(await coordinator.waitForIdle(5_000), true);
|
|
87
|
+
}
|
|
88
|
+
assert.equal(coordinator.isProcessing, false);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
test("default coordinator still serializes tasks sharing a session key", async () => {
|
|
92
|
+
const coordinator = new ExtractionQueueCoordinator();
|
|
93
|
+
const busy = makeParkedTask();
|
|
94
|
+
const sameKey = makeParkedTask();
|
|
95
|
+
coordinator.enqueue(busy.task, { key: "s1" });
|
|
96
|
+
await busy.startedPromise;
|
|
97
|
+
coordinator.enqueue(sameKey.task, { key: "s1" });
|
|
98
|
+
assert.equal(
|
|
99
|
+
sameKey.started,
|
|
100
|
+
false,
|
|
101
|
+
"same-session work must never run concurrently, even under the default limit",
|
|
102
|
+
);
|
|
103
|
+
busy.release();
|
|
104
|
+
await sameKey.startedPromise;
|
|
105
|
+
sameKey.release();
|
|
106
|
+
assert.equal(await coordinator.waitForIdle(5_000), true);
|
|
107
|
+
});
|
|
@@ -92,7 +92,7 @@ export class ExtractionQueueCoordinator {
|
|
|
92
92
|
/** Resolves the processor's park while a new task arrives mid-drain. */
|
|
93
93
|
private wake?: () => void;
|
|
94
94
|
|
|
95
|
-
constructor(concurrency =
|
|
95
|
+
constructor(concurrency = 2) {
|
|
96
96
|
this.concurrency = Number.isInteger(concurrency) && concurrency >= 1 ? concurrency : 1;
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -35,7 +35,7 @@ function installCapturingLogger(): { entries: LogEntry[] } {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
function createCoordinator(): ExtractionQueueCoordinator {
|
|
38
|
-
return new ExtractionQueueCoordinator();
|
|
38
|
+
return new ExtractionQueueCoordinator(1);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
// ── Per-key FIFO: queued tasks retain their own captured scope and settlement ─
|
|
@@ -495,8 +495,8 @@ test("tasks sharing a buffer key never run concurrently even with free capacity"
|
|
|
495
495
|
assert.equal(otherKey.outcome, "finished");
|
|
496
496
|
});
|
|
497
497
|
|
|
498
|
-
test("
|
|
499
|
-
const coordinator =
|
|
498
|
+
test("an explicit limit of 1 keeps the queue serial", async () => {
|
|
499
|
+
const coordinator = createParallelCoordinator(1);
|
|
500
500
|
assert.equal(coordinator.maxConcurrency, 1);
|
|
501
501
|
const first = makeParkedTask(false);
|
|
502
502
|
const second = makeParkedTask(false);
|
|
@@ -379,7 +379,7 @@ test("flushSession waits for queued extraction task completion", async () => {
|
|
|
379
379
|
return [makeTurn("thread-a", "remember alpha")];
|
|
380
380
|
},
|
|
381
381
|
};
|
|
382
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
382
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
383
383
|
orchestrator.runExtraction = async () => {
|
|
384
384
|
extractionStarted = true;
|
|
385
385
|
await new Promise<void>((resolve) => {
|
|
@@ -475,7 +475,7 @@ test("flushSession flushes the pending debounced buffer save before extraction,
|
|
|
475
475
|
assert.equal(entryTurns[0]?.content, "remember alpha");
|
|
476
476
|
});
|
|
477
477
|
test("queued extraction settles immediately when its caller aborts while waiting", async () => {
|
|
478
|
-
const queue = new ExtractionQueueCoordinator();
|
|
478
|
+
const queue = new ExtractionQueueCoordinator(1);
|
|
479
479
|
let extractionStarted = false;
|
|
480
480
|
let releaseExtraction!: () => void;
|
|
481
481
|
// SAFETY: fixture deps stub — only the queued-extraction path fields are exercised.
|
|
@@ -658,7 +658,7 @@ test("flushSession rejects and skips extraction when the durable buffer save fai
|
|
|
658
658
|
test("ingestBulkImportBatch rejects when the extraction deadline expires in the queue", async () => {
|
|
659
659
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
660
660
|
orchestrator.config = parseConfig({});
|
|
661
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
661
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
662
662
|
orchestrator.extractionQueueCoordinator.setProcessingForTest(true);
|
|
663
663
|
let runExtractionCalls = 0;
|
|
664
664
|
orchestrator.runExtraction = async () => {
|
|
@@ -709,7 +709,7 @@ test("ingestBulkImportBatch rejects when the extraction deadline expires in the
|
|
|
709
709
|
test("queued extraction clamps long deadline timers to the Node setTimeout limit", async () => {
|
|
710
710
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
711
711
|
orchestrator.config = parseConfig({});
|
|
712
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
712
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
713
713
|
orchestrator.extractionQueueCoordinator.setProcessingForTest(true);
|
|
714
714
|
orchestrator.runExtraction = async () => ({
|
|
715
715
|
status: "completed",
|
|
@@ -742,7 +742,7 @@ test("queued extraction clamps long deadline timers to the Node setTimeout limit
|
|
|
742
742
|
test("ingestBulkImportBatch does not report queue wait timeout after extraction starts", async () => {
|
|
743
743
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
744
744
|
orchestrator.config = parseConfig({});
|
|
745
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
745
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
746
746
|
let runExtractionCalls = 0;
|
|
747
747
|
orchestrator.runExtraction = async () => {
|
|
748
748
|
runExtractionCalls += 1;
|
|
@@ -777,7 +777,7 @@ test("ingestBulkImportBatch does not report queue wait timeout after extraction
|
|
|
777
777
|
test("ingestBulkImportBatch reports post-persist metadata failures separately", async () => {
|
|
778
778
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
779
779
|
orchestrator.config = parseConfig({});
|
|
780
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
780
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
781
781
|
orchestrator.runExtraction = async () => ({
|
|
782
782
|
status: "completed",
|
|
783
783
|
persistedCount: 1,
|
|
@@ -809,7 +809,7 @@ test("ingestBulkImportBatch reports post-persist metadata failures separately",
|
|
|
809
809
|
test("ingestBulkImportBatch can disable source-valid-at replay context", async () => {
|
|
810
810
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
811
811
|
orchestrator.config = parseConfig({});
|
|
812
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
812
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
813
813
|
const capturedSlices: BufferTurn[][] = [];
|
|
814
814
|
orchestrator.runExtraction = async (turns: BufferTurn[]) => {
|
|
815
815
|
capturedSlices.push(turns);
|
|
@@ -862,7 +862,7 @@ test("ingestBulkImportBatch can disable source-valid-at replay context", async (
|
|
|
862
862
|
test("ingestBulkImportBatch skips LCM observation for flush-plan recovery batches (issue #2457)", async () => {
|
|
863
863
|
const orchestrator = Object.create(Orchestrator.prototype) as unknown as BulkImportTestDouble;
|
|
864
864
|
orchestrator.config = parseConfig({});
|
|
865
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
865
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
866
866
|
const observedSessionKeys: string[] = [];
|
|
867
867
|
orchestrator.lcmEngine = {
|
|
868
868
|
enabled: true,
|
|
@@ -907,7 +907,7 @@ test("ingestBulkImportBatch skips LCM observation for flush-plan recovery batche
|
|
|
907
907
|
test("ingestBulkImportBatch still observes ordinary bulk imports through LCM (issue #2457)", async () => {
|
|
908
908
|
const orchestrator = Object.create(Orchestrator.prototype) as unknown as BulkImportTestDouble;
|
|
909
909
|
orchestrator.config = parseConfig({});
|
|
910
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
910
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
911
911
|
const observed: { sessionKey: string; turnCount: number }[] = [];
|
|
912
912
|
orchestrator.lcmEngine = {
|
|
913
913
|
enabled: true,
|
|
@@ -946,7 +946,7 @@ test("ingestBulkImportBatch still observes ordinary bulk imports through LCM (is
|
|
|
946
946
|
test("ingestBulkImportBatch observes mixed batches that contain flush-plan turns (issue #2457)", async () => {
|
|
947
947
|
const orchestrator = Object.create(Orchestrator.prototype) as unknown as BulkImportTestDouble;
|
|
948
948
|
orchestrator.config = parseConfig({});
|
|
949
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
949
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
950
950
|
const observed: number[] = [];
|
|
951
951
|
orchestrator.lcmEngine = {
|
|
952
952
|
enabled: true,
|
|
@@ -985,7 +985,7 @@ test("ingestBulkImportBatch observes mixed batches that contain flush-plan turns
|
|
|
985
985
|
test("ingestBulkImportBatch preserves partial metadata failure before a later slice rejects", async () => {
|
|
986
986
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
987
987
|
orchestrator.config = parseConfig({});
|
|
988
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
988
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
989
989
|
let runExtractionCalls = 0;
|
|
990
990
|
orchestrator.runExtraction = async () => {
|
|
991
991
|
runExtractionCalls += 1;
|
|
@@ -1047,7 +1047,7 @@ test("ingestBulkImportBatch preserves partial metadata failure before a later sl
|
|
|
1047
1047
|
test("ingestBulkImportBatch stops after the first failed source-valid-at slice", async () => {
|
|
1048
1048
|
const orchestrator = Object.create(Orchestrator.prototype) as any;
|
|
1049
1049
|
orchestrator.config = parseConfig({});
|
|
1050
|
-
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator();
|
|
1050
|
+
orchestrator.extractionQueueCoordinator = new ExtractionQueueCoordinator(1);
|
|
1051
1051
|
let runExtractionCalls = 0;
|
|
1052
1052
|
orchestrator.runExtraction = async () => {
|
|
1053
1053
|
runExtractionCalls += 1;
|
package/src/types.ts
CHANGED
|
@@ -725,7 +725,7 @@ export interface PluginConfig
|
|
|
725
725
|
/** Retained turns admitted per session before live backpressure (#3415 bound). */
|
|
726
726
|
bufferMaxTurnsPerSession: number;
|
|
727
727
|
bufferMaxMinutes: number;
|
|
728
|
-
/**
|
|
728
|
+
/** Background extraction concurrency; defaults to 2. Same-buffer tasks never overlap. Applies at daemon start. */
|
|
729
729
|
extractionQueueConcurrency: number;
|
|
730
730
|
/**
|
|
731
731
|
* Debounce window (ms) for persisting the smart buffer to `state/buffer.json`
|