@remnic/core 10.0.152 → 10.0.153

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "10.0.152",
3
+ "version": "10.0.153",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -3396,7 +3396,7 @@
3396
3396
  "core"
3397
3397
  ],
3398
3398
  "peerDependencies": {
3399
- "@remnic/coding-graph": "^10.0.152"
3399
+ "@remnic/coding-graph": "^10.0.153"
3400
3400
  },
3401
3401
  "peerDependenciesMeta": {
3402
3402
  "@remnic/coding-graph": {
@@ -38,7 +38,6 @@ function makeOrchestrator(
38
38
  overrides: Partial<ConsoleStateOrchestratorLike> = {},
39
39
  ): ConsoleStateOrchestratorLike {
40
40
  return {
41
- config: { memoryDir: "/nonexistent" },
42
41
  buffer: { getTurns: () => [] },
43
42
  qmd: {
44
43
  isAvailable: () => true,
@@ -136,7 +135,6 @@ test("runConsoleTui repaints once on start and survives a snapshot failure", asy
136
135
  // defensive readers), second call throws when the buffer accessor
137
136
  // is invoked. The loop must NOT crash.
138
137
  const orchestrator: ConsoleStateOrchestratorLike = {
139
- config: { memoryDir: "/nonexistent" },
140
138
  qmd: {
141
139
  isAvailable: () => true,
142
140
  isDaemonMode: () => false,
@@ -307,7 +305,7 @@ test("slow trace writes do not block render ticks (Codex P2 #732)", async () =>
307
305
  );
308
306
  });
309
307
 
310
- test("trace backpressure drops frames while a previous append is pending (Codex P2 #732)", async () => {
308
+ test("trace backpressure drops frames while a previous append is pending (Codex P2 #732)", async (t) => {
311
309
  // Regression: a wedged filesystem must not let the recorder's
312
310
  // writeChain grow unboundedly. While one append is pending, the
313
311
  // next tick's append is dropped instead of enqueued.
@@ -331,6 +329,11 @@ test("trace backpressure drops frames while a previous append is pending (Codex
331
329
  },
332
330
  },
333
331
  });
332
+ t.after(() => {
333
+ resolveFirst();
334
+ handle.stop();
335
+ return handle.done;
336
+ });
334
337
  // Let the loop tick several times while the first append blocks.
335
338
  await new Promise((resolve) => setTimeout(resolve, 150));
336
339
  // Backpressure should have prevented additional appends from
@@ -348,11 +351,9 @@ test("trace backpressure drops frames while a previous append is pending (Codex
348
351
  appendCalls >= 2,
349
352
  `expected appends to resume after pending one drained, saw ${appendCalls}`,
350
353
  );
351
- handle.stop();
352
- await handle.done;
353
354
  });
354
355
 
355
- test("getDroppedTraceFrames starts at zero and increases under backpressure (Codex P2 #732 round 5)", async () => {
356
+ test("getDroppedTraceFrames starts at zero and increases under backpressure (Codex P2 #732 round 5)", async (t) => {
356
357
  // Codex P2 round 5: `traceFramesDropped` was incremented on every
357
358
  // backpressure drop but never exposed, making the counter a dead
358
359
  // store. Now it is surfaced via `handle.getDroppedTraceFrames()` so
@@ -380,6 +381,11 @@ test("getDroppedTraceFrames starts at zero and increases under backpressure (Cod
380
381
  },
381
382
  },
382
383
  });
384
+ t.after(() => {
385
+ resolveFirst();
386
+ handle.stop();
387
+ return handle.done;
388
+ });
383
389
 
384
390
  // Initially zero — nothing has been dropped yet.
385
391
  assert.equal(
@@ -397,11 +403,6 @@ test("getDroppedTraceFrames starts at zero and increases under backpressure (Cod
397
403
  droppedWhileBlocked > 0,
398
404
  `expected > 0 dropped frames while append was blocked, got ${droppedWhileBlocked}`,
399
405
  );
400
-
401
- // Release and stop cleanly.
402
- resolveFirst();
403
- handle.stop();
404
- await handle.done;
405
406
  });
406
407
 
407
408
  test("stop() clears the interval and resolves done", async () => {
@@ -435,7 +436,7 @@ test("stop() clears the interval and resolves done", async () => {
435
436
 
436
437
  test(
437
438
  "stop() awaits in-flight tick body before resolving done (Codex P2 #732 round 4)",
438
- async () => {
439
+ async (t) => {
439
440
  // Regression: prior to this fix, `stop()` resolved `done`
440
441
  // synchronously after clearing the interval, even if a tick was
441
442
  // mid-flight. If the tick had already passed its `if (stopped)
@@ -487,6 +488,10 @@ test(
487
488
  },
488
489
  },
489
490
  });
491
+ t.after(() => {
492
+ handle.stop();
493
+ return handle.done;
494
+ });
490
495
 
491
496
  // Let the loop tick at least once so `append` has been called.
492
497
  await new Promise((resolve) => setTimeout(resolve, 80));
@@ -529,7 +534,6 @@ test(
529
534
  let entered = 0;
530
535
  let exited = 0;
531
536
  const orchestrator: ConsoleStateOrchestratorLike = {
532
- config: { memoryDir: "/nonexistent" },
533
537
  qmd: {
534
538
  isAvailable: () => true,
535
539
  isDaemonMode: () => false,