@githolon/testing 0.48.0 → 0.49.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/package.json +1 -1
- package/vendor/engine/engine.mjs +7 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@githolon/testing",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "@githolon/testing — law TDD for Nomos domains: boot the REAL engine plane in-process (the exact machinery every cloud DO, heavy container and web client runs), dispatch directives, assert rows, assert TYPED REFUSALS, fork for what-ifs — fully offline inside vitest.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
package/vendor/engine/engine.mjs
CHANGED
|
@@ -1992,16 +1992,21 @@ export function packDelta(eng, ws, base, head) {
|
|
|
1992
1992
|
// pack of all reachable from main (fresh clone); `base` = the client's known head ⇒ the incremental delta.
|
|
1993
1993
|
// The kernel resolves main itself. Returns `{ packB64, bytes }` (base64 so it rides the container JSON op).
|
|
1994
1994
|
export function servePack(eng, ws, base = "") {
|
|
1995
|
+
// `head`: the tip this pack reaches (resolved BEFORE packing, so it can only under-state, never
|
|
1996
|
+
// over-state, what the pack contains) — the cache-coherence anchor for the worker's short-TTL pack
|
|
1997
|
+
// cache: a cached pack is reusable ONLY while main still points at the head it was built from.
|
|
1998
|
+
let head = null;
|
|
1999
|
+
try { head = kgit.resolveRef(eng, gitdirOf(ws), BRANCH); } catch { /* diagnostics only */ }
|
|
1995
2000
|
let r;
|
|
1996
2001
|
try {
|
|
1997
2002
|
r = JSON.parse(call(eng.ex, "pack_delta", { repoArg: repoArgOf(ws), workspace: ws, base, branch: BRANCH }, eng.STDERR));
|
|
1998
2003
|
} catch (e) {
|
|
1999
2004
|
// UP TO DATE: the client's `have` already IS main → nothing to send. A clean empty response, not an error.
|
|
2000
|
-
if (/nothing to pack|head == base/.test(String(e))) return { packB64: "", bytes: 0, upToDate: true };
|
|
2005
|
+
if (/nothing to pack|head == base/.test(String(e))) return { packB64: "", bytes: 0, upToDate: true, ...(head ? { head } : {}) };
|
|
2001
2006
|
throw e;
|
|
2002
2007
|
}
|
|
2003
2008
|
if (!r || r.ok !== true || typeof r.packB64 !== "string") throw new Error("servePack: kernel produced no pack");
|
|
2004
|
-
return { packB64: r.packB64, bytes: r.bytes };
|
|
2009
|
+
return { packB64: r.packB64, bytes: r.bytes, ...(head ? { head } : {}) };
|
|
2005
2010
|
}
|
|
2006
2011
|
|
|
2007
2012
|
// ── G3 COLD-STORAGE: SURFACE THE BORN CHILD'S CUSTODY BYTES (the host-bailiff persist lane) ──────────────
|