@rightkit/release 0.6.45 → 0.6.47
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/affected-units.mjs +190 -0
- package/bin/rightkit-gate.mjs +629 -132
- package/build-ownership.mjs +206 -41
- package/cargo-width.mjs +49 -0
- package/ci-compile-admission.mjs +57 -0
- package/committed-cargo-workspace.mjs +58 -0
- package/cross-targets.mjs +18 -2
- package/dependency-identity.mjs +98 -0
- package/deterministic-scans.mjs +256 -57
- package/gate-acceptance.mjs +1443 -0
- package/gate-coverage.mjs +17 -6
- package/gate-serve.mjs +239 -0
- package/handle-revocation.mjs +100 -0
- package/handle-revocation.rust-vector.json +1 -0
- package/handle-revocation.vectors.json +53 -0
- package/local-publish.mjs +109 -34
- package/managed-cargo.mjs +11 -0
- package/node-check-cache.mjs +95 -0
- package/owner-process-proof.mjs +14 -0
- package/ownership-mark.mjs +10 -1
- package/ownership-recover.mjs +78 -0
- package/package.json +2 -1
- package/performance-diagnostic.mjs +19 -0
- package/provenance-verify.mjs +35 -0
- package/publication-gate.mjs +62 -29
- package/publish-cargo.mjs +19 -4
- package/qualification-verify.mjs +12 -2
- package/rightkit-drift.mjs +4 -3
- package/rightkit-versions.json +1 -1
- package/snapshot-broker.mjs +1 -1
- package/snapshot-check.mjs +91 -12
- package/snapshot-dependency-reuse.mjs +230 -0
- package/snapshot-metadata.mjs +1 -1
- package/snapshot-request.mjs +12 -5
- package/snapshot.mjs +41 -6
- package/stage-sidecar.mjs +20 -4
- package/stamp-relay.mjs +37 -0
- package/unit-gate.mjs +25 -5
- package/unit-list-compile.mjs +277 -0
package/gate-coverage.mjs
CHANGED
|
@@ -6,24 +6,35 @@ import path from "node:path";
|
|
|
6
6
|
|
|
7
7
|
export const COVERAGE_SCHEMA = "rightkit.gate-coverage/1";
|
|
8
8
|
|
|
9
|
+
const duration = (value) => typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : null;
|
|
10
|
+
function timingOf(value) {
|
|
11
|
+
if (!value || typeof value !== "object" || typeof value.invocationId !== "string" || !value.invocationId) return null;
|
|
12
|
+
return { invocationId: value.invocationId, elapsedMs: duration(value.elapsedMs), cacheLookupMs: duration(value.cacheLookupMs), executionMs: duration(value.executionMs) };
|
|
13
|
+
}
|
|
14
|
+
function telemetryOf(row) {
|
|
15
|
+
const attempts = Array.isArray(row?.batchAttempts) ? row.batchAttempts.filter((entry) => entry && typeof entry.id === "string" && typeof entry.status === "string").map((entry) => ({ id: entry.id, status: entry.status, timing: timingOf(entry.timing) })) : [];
|
|
16
|
+
return { timing: timingOf(row?.timing), scanElapsedMs: duration(row?.scanElapsedMs), retryTiming: timingOf(row?.retried?.timing), batchAttempts: attempts };
|
|
17
|
+
}
|
|
18
|
+
|
|
9
19
|
/**
|
|
10
20
|
* The report for `plan` (the planned scans, `plan.scans`) and `scanResult` (runScans' rows). `keys` is a Map of scan id -> the input key the cache
|
|
11
21
|
* looked the scan up under (null or absent: the scan is never cached or no key could be formed). `classes` are the classes this pass runs.
|
|
12
22
|
*/
|
|
13
|
-
export function buildCoverageReport({ plan, scanResult, keys = new Map(), classes = ["A", "B"], commit = null, startedAt = null, endedAt = null }) {
|
|
23
|
+
export function buildCoverageReport({ plan, scanResult, keys = new Map(), keyErrors = new Map(), cacheDisabled = null, classes = ["A", "B"], commit = null, startedAt = null, endedAt = null }) {
|
|
14
24
|
const rows = new Map((scanResult?.scans ?? []).map((row) => [row.id, row]));
|
|
15
25
|
const scans = (plan?.scans ?? []).map((scan) => {
|
|
16
26
|
const row = rows.get(scan.id);
|
|
17
27
|
const key = keys.get(scan.id) ?? null;
|
|
28
|
+
const telemetry = telemetryOf(row);
|
|
18
29
|
if (row) {
|
|
19
|
-
if (row.cached === true) return { id: scan.id, class: scan.class, coverage: "hit", status: row.status, key, reason: row.detail ?? "answered from the result cache" };
|
|
20
|
-
if (row.status === "pass" || row.status === "fail") return { id: scan.id, class: scan.class, coverage: "ran", status: row.status, key, reason: key === null ? "no cache key (this scan is never cached, or no key could be formed)" : "no cached result for this key", ...(row.code ? { code: row.code } : {}) };
|
|
21
|
-
return { id: scan.id, class: scan.class, coverage: "skipped", status: row.status, key, reason: row.detail ?? row.status };
|
|
30
|
+
if (row.cached === true) return { id: scan.id, class: scan.class, ...telemetry, coverage: "hit", status: row.status, key, reason: row.detail ?? "answered from the result cache" };
|
|
31
|
+
if (row.status === "pass" || row.status === "fail") return { id: scan.id, class: scan.class, ...telemetry, coverage: "ran", status: row.status, key, reason: key === null ? ((keyErrors.get(scan.id) ?? row.cacheKeyError) ? `no cache key: ${keyErrors.get(scan.id) ?? row.cacheKeyError}` : cacheDisabled ?? "no cache key (this scan is never cached, or no key could be formed)") : "no cached result for this key", ...(row.code ? { code: row.code } : {}) };
|
|
32
|
+
return { id: scan.id, class: scan.class, ...telemetry, coverage: "skipped", status: row.status, key, reason: row.detail ?? row.status };
|
|
22
33
|
}
|
|
23
|
-
return { id: scan.id, class: scan.class, coverage: "skipped", status: "not-in-pass", key, reason: classes.includes(scan.class) ? "planned but no result was returned" : `class ${scan.class} is not part of this pass (classes ${classes.join("+")})` };
|
|
34
|
+
return { id: scan.id, class: scan.class, ...telemetry, coverage: "skipped", status: "not-in-pass", key, reason: classes.includes(scan.class) ? "planned but no result was returned" : `class ${scan.class} is not part of this pass (classes ${classes.join("+")})` };
|
|
24
35
|
});
|
|
25
36
|
const count = (what) => scans.filter((s) => s.coverage === what).length;
|
|
26
|
-
return { schema: COVERAGE_SCHEMA, commit, startedAt, endedAt, totals: { planned: scans.length, hit: count("hit"), ran: count("ran"), skipped: count("skipped") }, scans };
|
|
37
|
+
return { schema: COVERAGE_SCHEMA, commit, startedAt, endedAt, ...(cacheDisabled ? { cacheDisabled } : {}), totals: { planned: scans.length, hit: count("hit"), ran: count("ran"), skipped: count("skipped") }, scans };
|
|
27
38
|
}
|
|
28
39
|
|
|
29
40
|
/** Writes the report as `<dir>/<name>.json` (the directory is created); returns the path. */
|
package/gate-serve.mjs
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// The resident gate (GC-A24, rightkit#1506): a gate-owned, per-host process outside the broker that watches the snapshot root and
|
|
2
|
+
// remembers which snapshot directories were proven exactly a tree, so a repeat proof of an unchanged snapshot needs no walk.
|
|
3
|
+
//
|
|
4
|
+
// Measured before it was built (Mac, 2026-11-05): node with the gate's modules starts in 34-50 ms, so residency buys nothing at
|
|
5
|
+
// startup; what it buys is proof. A warm RK check spent ~3.3 s of 10.8 s in six snapshot verifies of an unchanged directory.
|
|
6
|
+
//
|
|
7
|
+
// Correctness:
|
|
8
|
+
// - A proof is recorded only with the change generation taken BEFORE the walk began: any event for that snapshot between "begin" and
|
|
9
|
+
// "record" leaves it unproven.
|
|
10
|
+
// - Every answer is preceded by a cookie sync (as watchman does): the server writes a cookie file in the watched root and waits for its
|
|
11
|
+
// own event, so every change made before the request has been delivered and counted before the server answers.
|
|
12
|
+
// - A watcher error, a dropped or unknown event, an unreachable server, a timeout, or a server running other gate code all mean "not
|
|
13
|
+
// proven", and the caller does the full verify. The server never says "clean" on a guess.
|
|
14
|
+
// - Only plain verifies (no stage-output ledger) use it.
|
|
15
|
+
//
|
|
16
|
+
// Lifecycle: started detached by the first client that finds no server (RK_GATE_SERVE=0 disables it); one server per host and data root;
|
|
17
|
+
// exits after RK_GATE_SERVE_IDLE_MS (default 30 min) without a request, or when a client runs different gate code. No system service is
|
|
18
|
+
// installed. Commands: `node gate-serve.mjs serve`, `node gate-serve.mjs status`, and the internal client ops below.
|
|
19
|
+
import crypto from "node:crypto";
|
|
20
|
+
import fs from "node:fs";
|
|
21
|
+
import net from "node:net";
|
|
22
|
+
import os from "node:os";
|
|
23
|
+
import path from "node:path";
|
|
24
|
+
import { spawn, spawnSync } from "node:child_process";
|
|
25
|
+
import { fileURLToPath } from "node:url";
|
|
26
|
+
import { resolveManagedRoots } from "./managed-roots.mjs";
|
|
27
|
+
|
|
28
|
+
const SELF = fileURLToPath(import.meta.url);
|
|
29
|
+
const SCHEMA = "rightkit.gate-serve/1";
|
|
30
|
+
const COOKIE_PREFIX = "0000000000000000.gate-serve-cookie-";
|
|
31
|
+
const IDENTITY = (() => { try { return crypto.createHash("sha256").update(fs.readFileSync(SELF)).digest("hex").slice(0, 16); } catch { return "unknown"; } })();
|
|
32
|
+
|
|
33
|
+
function dataRoot(env = process.env) { return resolveManagedRoots({ env, platform: process.platform }).dataRoot; }
|
|
34
|
+
export function socketPath(env = process.env) {
|
|
35
|
+
if (process.platform === "win32") return `\\\\.\\pipe\\rightkit-gate-serve-${(os.userInfo().username || "user").replace(/[^A-Za-z0-9_-]/g, "_")}`;
|
|
36
|
+
return path.join(dataRoot(env), "gate-serve", "serve.sock");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// ---- server ---------------------------------------------------------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
export async function serve({ root, idleMs = Number(process.env.RK_GATE_SERVE_IDLE_MS ?? 30 * 60 * 1000), log = () => {} } = {}) {
|
|
42
|
+
const watchedRoot = fs.realpathSync(root);
|
|
43
|
+
const generation = new Map(); // snapshot key -> change count
|
|
44
|
+
const proven = new Map(); // snapshot key -> { tree, generation }
|
|
45
|
+
// GC-A11 non-compiling cargo answers (cargo metadata), keyed on the request and the snapshot's change count: an unchanged snapshot is answered
|
|
46
|
+
// from memory, any change to it (or a restart) runs cargo again. Bounded: oldest dropped past 64 entries.
|
|
47
|
+
const cargoAnswers = new Map(); // request digest -> { key, generation, status, stdout, stderr }
|
|
48
|
+
let watcher = null; let healthy = false; let cookieSeq = 0;
|
|
49
|
+
const cookies = new Map(); // cookie name -> resolve
|
|
50
|
+
// Only entries inside a snapshot directory (`<16 hex>/...`) are snapshot content; `<key>.tree-index`, `<key>.state.json` and the like
|
|
51
|
+
// beside it are the gate's own metadata, and the cookie is `0000000000000000.gate-serve-cookie-*` (a name the snapshot root accepts).
|
|
52
|
+
const keyOf = (rel) => { const base = String(rel ?? "").split(/[\\/]/)[0]; return /^[0-9a-f]{16}$/.test(base) ? base : null; };
|
|
53
|
+
const bumpAll = () => { for (const k of new Set([...generation.keys(), ...proven.keys()])) generation.set(k, (generation.get(k) ?? 0) + 1); proven.clear(); };
|
|
54
|
+
const startWatch = () => {
|
|
55
|
+
try {
|
|
56
|
+
watcher = fs.watch(watchedRoot, { recursive: true, persistent: true }, (_event, filename) => {
|
|
57
|
+
if (filename == null) { bumpAll(); return; } // an event without a name: anything may have changed
|
|
58
|
+
const name = String(filename);
|
|
59
|
+
const base = name.split(/[\\/]/)[0];
|
|
60
|
+
if (base.startsWith(COOKIE_PREFIX)) { const r = cookies.get(base); if (r) { cookies.delete(base); r(); } return; }
|
|
61
|
+
const key = keyOf(name);
|
|
62
|
+
// The watched root's own entry (its listing changed) carries no content: the entry that changed reports under its own name.
|
|
63
|
+
if (key === null) { if (/^[0-9a-f]{16}\./.test(base) || name === path.basename(watchedRoot)) return; bumpAll(); return; } // gate metadata beside a snapshot; anything else: drop every proof
|
|
64
|
+
generation.set(key, (generation.get(key) ?? 0) + 1);
|
|
65
|
+
proven.delete(key);
|
|
66
|
+
});
|
|
67
|
+
watcher.on("error", (error) => { log(`watcher error: ${error?.message ?? error}; every proof dropped, restarting the watch`); healthy = false; bumpAll(); try { watcher.close(); } catch { /* closed */ } setTimeout(startWatch, 200); });
|
|
68
|
+
healthy = true;
|
|
69
|
+
} catch (error) { healthy = false; log(`cannot watch ${watchedRoot}: ${error?.message ?? error}`); setTimeout(startWatch, 1000); }
|
|
70
|
+
};
|
|
71
|
+
startWatch();
|
|
72
|
+
// Every change made before this call has been delivered once the cookie's own event arrives (events of one watch are ordered).
|
|
73
|
+
const cookieSync = (timeoutMs = 2000) => new Promise((resolve) => {
|
|
74
|
+
if (!healthy) { resolve(false); return; }
|
|
75
|
+
const name = `${COOKIE_PREFIX}${process.pid}-${++cookieSeq}`;
|
|
76
|
+
const file = path.join(watchedRoot, name);
|
|
77
|
+
const timer = setTimeout(() => { cookies.delete(name); try { fs.rmSync(file, { force: true }); } catch { /* gone */ } resolve(false); }, timeoutMs);
|
|
78
|
+
cookies.set(name, () => { clearTimeout(timer); try { fs.rmSync(file, { force: true }); } catch { /* gone */ } resolve(true); });
|
|
79
|
+
try { fs.writeFileSync(file, String(Date.now())); } catch { clearTimeout(timer); cookies.delete(name); resolve(false); }
|
|
80
|
+
});
|
|
81
|
+
let lastRequest = Date.now();
|
|
82
|
+
const handle = async (req) => {
|
|
83
|
+
lastRequest = Date.now();
|
|
84
|
+
if (req?.schema !== SCHEMA) return { ok: false, why: "schema" };
|
|
85
|
+
if (req.identity !== IDENTITY) { setTimeout(() => process.exit(0), 50); return { ok: false, why: "gate code changed; the server exits" }; }
|
|
86
|
+
if (req.op === "status") return { ok: true, healthy, root: watchedRoot, proven: [...proven].map(([k, v]) => ({ key: k, tree: v.tree })), pid: process.pid, identity: IDENTITY };
|
|
87
|
+
const dir = typeof req.dir === "string" ? req.dir : "";
|
|
88
|
+
let real; try { real = fs.realpathSync(dir); } catch { return { ok: false, why: "no such directory" }; }
|
|
89
|
+
if (path.dirname(real) !== watchedRoot) return { ok: false, why: "not a snapshot of the watched root" };
|
|
90
|
+
const key = keyOf(path.basename(real));
|
|
91
|
+
if (key === null) return { ok: false, why: "not a snapshot directory name" };
|
|
92
|
+
if (!(await cookieSync())) return { ok: false, why: "watcher not current" };
|
|
93
|
+
if (req.op === "begin") return { ok: true, generation: generation.get(key) ?? 0 };
|
|
94
|
+
if (req.op === "cargo-metadata") return cargoMetadataOp(req, key, real);
|
|
95
|
+
if (req.op === "record") {
|
|
96
|
+
if (typeof req.tree !== "string" || !Number.isInteger(req.generation)) return { ok: false, why: "bad record" };
|
|
97
|
+
if ((generation.get(key) ?? 0) !== req.generation) return { ok: false, why: "changed during the proof" };
|
|
98
|
+
proven.set(key, { tree: req.tree, generation: req.generation });
|
|
99
|
+
return { ok: true };
|
|
100
|
+
}
|
|
101
|
+
if (req.op === "check") {
|
|
102
|
+
const p = proven.get(key);
|
|
103
|
+
const now = generation.get(key) ?? 0;
|
|
104
|
+
const clean = Boolean(p && p.tree === req.tree && p.generation === now);
|
|
105
|
+
return { ok: true, clean, generation: now };
|
|
106
|
+
}
|
|
107
|
+
return { ok: false, why: "unknown op" };
|
|
108
|
+
};
|
|
109
|
+
async function cargoMetadataOp(req, key, snapshotDir) {
|
|
110
|
+
const args = Array.isArray(req.args) ? req.args.map(String) : null;
|
|
111
|
+
if (!args || args[0] !== "metadata") return { ok: false, why: "only cargo metadata is served" };
|
|
112
|
+
if (typeof req.cargo !== "string" || !path.isAbsolute(req.cargo) || typeof req.cwd !== "string") return { ok: false, why: "bad cargo request" };
|
|
113
|
+
let cwd; try { cwd = fs.realpathSync(req.cwd); } catch { return { ok: false, why: "no such cwd" }; }
|
|
114
|
+
if (cwd !== snapshotDir && !cwd.startsWith(`${snapshotDir}${path.sep}`)) return { ok: false, why: "cwd outside the snapshot" };
|
|
115
|
+
const env = req.env && typeof req.env === "object" ? Object.fromEntries(Object.entries(req.env).map(([k, v]) => [k, String(v)])) : {};
|
|
116
|
+
let cargoId; try { const st = fs.statSync(req.cargo); cargoId = `${st.size}:${st.mtimeMs}:${st.ino}`; } catch { return { ok: false, why: "no such cargo" }; }
|
|
117
|
+
const digest = crypto.createHash("sha256").update(JSON.stringify({ key, cwd, args, cargo: req.cargo, cargoId, env: Object.entries(env).sort() })).digest("hex");
|
|
118
|
+
const hit = cargoAnswers.get(digest);
|
|
119
|
+
const now = generation.get(key) ?? 0;
|
|
120
|
+
if (hit && hit.generation === now) return { ok: true, cached: true, status: hit.status, stdout: hit.stdout, stderr: hit.stderr };
|
|
121
|
+
const before = now;
|
|
122
|
+
const result = await new Promise((resolve) => {
|
|
123
|
+
let child; try { child = spawn(req.cargo, args, { cwd, env, stdio: ["ignore", "pipe", "pipe"], windowsHide: true }); } catch (error) { resolve({ status: -1, stdout: "", stderr: String(error?.message ?? error) }); return; }
|
|
124
|
+
const out = []; const err = [];
|
|
125
|
+
child.stdout.on("data", (d) => out.push(d)); child.stderr.on("data", (d) => err.push(d));
|
|
126
|
+
child.on("error", (error) => resolve({ status: -1, stdout: "", stderr: String(error?.message ?? error) }));
|
|
127
|
+
child.on("close", (status) => resolve({ status: status ?? -1, stdout: Buffer.concat(out).toString("utf8"), stderr: Buffer.concat(err).toString("utf8") }));
|
|
128
|
+
});
|
|
129
|
+
// Cached only when cargo succeeded and nothing in the snapshot changed while it ran (the cookie makes every earlier event visible first).
|
|
130
|
+
if (result.status === 0 && (await cookieSync()) && (generation.get(key) ?? 0) === before) {
|
|
131
|
+
cargoAnswers.set(digest, { key, generation: before, ...result });
|
|
132
|
+
while (cargoAnswers.size > 64) cargoAnswers.delete(cargoAnswers.keys().next().value);
|
|
133
|
+
}
|
|
134
|
+
return { ok: true, cached: false, ...result };
|
|
135
|
+
}
|
|
136
|
+
const sock = socketPath();
|
|
137
|
+
// One server per host: a second one started in the same instant must not steal the socket from a live first one (seen 2026-11-05).
|
|
138
|
+
const live = await new Promise((resolve) => { const c = net.connect(sock); c.on("connect", () => { c.destroy(); resolve(true); }); c.on("error", () => resolve(false)); });
|
|
139
|
+
if (live) { log("another server already answers on the socket; exiting"); process.exit(0); }
|
|
140
|
+
if (process.platform !== "win32") { fs.mkdirSync(path.dirname(sock), { recursive: true }); try { fs.unlinkSync(sock); } catch { /* none */ } }
|
|
141
|
+
const server = net.createServer((conn) => {
|
|
142
|
+
let buf = "";
|
|
143
|
+
conn.on("data", async (d) => {
|
|
144
|
+
buf += d;
|
|
145
|
+
const nl = buf.indexOf("\n");
|
|
146
|
+
if (nl < 0) return;
|
|
147
|
+
let req = null; try { req = JSON.parse(buf.slice(0, nl)); } catch { req = null; }
|
|
148
|
+
buf = "";
|
|
149
|
+
let res; try { res = await handle(req); } catch (error) { res = { ok: false, why: String(error?.message ?? error) }; }
|
|
150
|
+
conn.end(`${JSON.stringify(res)}\n`);
|
|
151
|
+
});
|
|
152
|
+
conn.on("error", () => {});
|
|
153
|
+
});
|
|
154
|
+
await new Promise((resolve, reject) => { server.once("error", reject); server.listen(sock, resolve); });
|
|
155
|
+
log(`serving ${watchedRoot} on ${sock} (pid ${process.pid}, identity ${IDENTITY})`);
|
|
156
|
+
// Exit when idle, or as soon as the socket is no longer this server's (another server replaced it): no orphan lingers.
|
|
157
|
+
let sockIno = null; try { sockIno = fs.statSync(sock).ino; } catch { sockIno = null; }
|
|
158
|
+
const idle = setInterval(() => {
|
|
159
|
+
if (Date.now() - lastRequest > idleMs) { log("idle; exiting"); process.exit(0); }
|
|
160
|
+
if (process.platform !== "win32") { let ino = null; try { ino = fs.statSync(sock).ino; } catch { ino = null; } if (ino !== sockIno) { log("socket replaced; exiting"); process.exit(0); } }
|
|
161
|
+
}, 10_000);
|
|
162
|
+
idle.unref?.();
|
|
163
|
+
return server;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ---- client (synchronous: verifySnapshotDir is synchronous) ------------------------------------------------------------------------------
|
|
167
|
+
|
|
168
|
+
async function ask(req, timeoutMs) {
|
|
169
|
+
return new Promise((resolve) => {
|
|
170
|
+
const conn = net.connect(socketPath());
|
|
171
|
+
let out = "";
|
|
172
|
+
const timer = setTimeout(() => { conn.destroy(); resolve({ ok: false, why: "timeout" }); }, timeoutMs);
|
|
173
|
+
conn.on("connect", () => conn.write(`${JSON.stringify({ schema: SCHEMA, identity: IDENTITY, ...req })}\n`));
|
|
174
|
+
conn.on("data", (d) => { out += d; });
|
|
175
|
+
conn.on("end", () => { clearTimeout(timer); try { resolve(JSON.parse(out)); } catch { resolve({ ok: false, why: "bad reply" }); } });
|
|
176
|
+
conn.on("error", (error) => { clearTimeout(timer); resolve({ ok: false, why: error?.code ?? "error", unreachable: true }); });
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** One synchronous request to the resident server; null when it is disabled, unreachable or did not answer. Starts it when absent. */
|
|
181
|
+
export function serveRequest(req, { env = process.env, root = null, timeoutMs = 3000 } = {}) {
|
|
182
|
+
if (env.RK_GATE_SERVE === "0") return null;
|
|
183
|
+
const r = spawnSync(process.execPath, [SELF, "ask", JSON.stringify(req), String(timeoutMs)], { encoding: "utf8", timeout: timeoutMs + 2000, maxBuffer: 1 << 28, env: { ...env } });
|
|
184
|
+
let res = null; try { res = JSON.parse(String(r.stdout ?? "").trim().split("\n").pop()); } catch { res = null; }
|
|
185
|
+
// Start a server only when none is listening; a bad reply or a timeout from a live one never starts a second.
|
|
186
|
+
if (res?.unreachable && root) startServer({ root, env });
|
|
187
|
+
return res && res.ok ? res : null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function startServer({ root, env }) {
|
|
191
|
+
try {
|
|
192
|
+
const logDir = path.join(dataRoot(env), "gate-serve");
|
|
193
|
+
fs.mkdirSync(logDir, { recursive: true });
|
|
194
|
+
const out = fs.openSync(path.join(logDir, "serve.log"), "a");
|
|
195
|
+
// A minimal environment: the server outlives the run that started it, so it must carry none of that run's tokens (the build
|
|
196
|
+
// ownership guard rightly refuses a run while any process still holds an earlier run's RIGHTKIT_BUILD_OWNERSHIP).
|
|
197
|
+
const keep = ["PATH", "HOME", "USERPROFILE", "SYSTEMROOT", "SystemRoot", "TEMP", "TMP", "TMPDIR", "LOCALAPPDATA", "APPDATA", "RIGHTKIT_MANAGED_ROOT", "RK_GATE_SERVE_IDLE_MS"];
|
|
198
|
+
const childEnv = Object.fromEntries(keep.filter((k) => env[k] !== undefined).map((k) => [k, env[k]]));
|
|
199
|
+
const child = spawn(process.execPath, [SELF, "serve", root], { detached: true, stdio: ["ignore", out, out], env: childEnv, cwd: path.dirname(SELF), windowsHide: true });
|
|
200
|
+
child.unref();
|
|
201
|
+
fs.closeSync(out);
|
|
202
|
+
} catch { /* the next run tries again; this one verifies in full */ }
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* GC-A11 `cargo metadata` for a directory inside a gate snapshot, answered by the resident gate (cached per snapshot while it is unchanged), else
|
|
207
|
+
* run directly with `cargo` (an absolute path) and `env`. Returns `{ status, stdout, stderr, served, cached }`. Never through the broker.
|
|
208
|
+
*/
|
|
209
|
+
export function snapshotCargoMetadata({ cwd, args, cargo, env, snapshotRootDir, run = spawnSync }) {
|
|
210
|
+
let snapshotDir = null;
|
|
211
|
+
try {
|
|
212
|
+
const realRoot = fs.realpathSync(snapshotRootDir); const realCwd = fs.realpathSync(cwd);
|
|
213
|
+
const rel = path.relative(realRoot, realCwd);
|
|
214
|
+
const first = rel.split(path.sep)[0];
|
|
215
|
+
if (rel && !rel.startsWith("..") && !path.isAbsolute(rel) && /^[0-9a-f]{16}$/.test(first)) snapshotDir = path.join(realRoot, first);
|
|
216
|
+
} catch { snapshotDir = null; }
|
|
217
|
+
if (snapshotDir && cargo) {
|
|
218
|
+
const keep = Object.fromEntries(Object.entries(env ?? {}).filter(([k]) => /^(PATH|Path|HOME|USERPROFILE|SYSTEMROOT|SystemRoot|TMPDIR|TEMP|TMP|CARGO.*|RUSTUP.*|RUSTC.*|RUSTFLAGS|RUSTDOCFLAGS)$/.test(k)));
|
|
219
|
+
const res = serveRequest({ op: "cargo-metadata", dir: snapshotDir, cwd, args, cargo, env: keep }, { env, root: snapshotRootDir, timeoutMs: 120_000 });
|
|
220
|
+
if (res && Number.isInteger(res.status)) return { status: res.status, stdout: res.stdout ?? "", stderr: res.stderr ?? "", served: true, cached: res.cached === true };
|
|
221
|
+
}
|
|
222
|
+
const r = run(cargo ?? "cargo", args, { cwd, env, encoding: "utf8", maxBuffer: 1 << 28 });
|
|
223
|
+
return { status: r.status, stdout: String(r.stdout ?? ""), stderr: String(r.stderr ?? ""), served: false, cached: false };
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// ---- entry --------------------------------------------------------------------------------------------------------------------------------
|
|
227
|
+
|
|
228
|
+
if (process.argv[1] && fs.realpathSync(process.argv[1]) === fs.realpathSync(SELF)) {
|
|
229
|
+
const [cmd, a, b] = process.argv.slice(2);
|
|
230
|
+
if (cmd === "serve") {
|
|
231
|
+
serve({ root: a, log: (m) => console.log(`${new Date().toISOString()} gate-serve: ${m}`) }).catch((error) => { console.log(`${new Date().toISOString()} gate-serve: cannot serve: ${error?.message ?? error}`); process.exit(1); });
|
|
232
|
+
} else if (cmd === "ask") {
|
|
233
|
+
let req = null; try { req = JSON.parse(a); } catch { req = null; }
|
|
234
|
+
// Exit only after the reply is flushed: process.exit right after a large write to a pipe truncates it (a cargo metadata answer is megabytes).
|
|
235
|
+
ask(req ?? {}, Number(b) || 3000).then((res) => { process.stdout.write(`${JSON.stringify(res)}\n`, () => process.exit(0)); });
|
|
236
|
+
} else if (cmd === "status") {
|
|
237
|
+
ask({ op: "status" }, 3000).then((res) => { console.log(JSON.stringify(res, null, 2)); process.exit(res.ok ? 0 : 1); });
|
|
238
|
+
} else { console.error("usage: gate-serve.mjs serve <snapshot-root> | status"); process.exit(2); }
|
|
239
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// GB-21/23/57 additive branch (rustright#228, rightkit#1511): a broker-signed revocation of ONE exact sub-handle whose lease the broker can no longer
|
|
2
|
+
// answer (UNKNOWN, no member row). It settles that sub-handle for a dead owner's reclaim only. It never stands in for REAPED or UNSENT, never
|
|
3
|
+
// overrides an ACTIVE lease or a listed member, and never releases a live owner: every other reclaim proof (owner pid, sibling sub-handles,
|
|
4
|
+
// detached groups, token holders, snapshot users) still runs unchanged.
|
|
5
|
+
//
|
|
6
|
+
// Trust: the host's ENROLLED broker pin only (broker-pins.mjs readEnrolledPins), never the revocation, the record, an environment variable or a
|
|
7
|
+
// checkout. The signature scheme is the broker's provenance scheme (ES256, P-256, canonical JSON) under its own domain string, so a receipt can
|
|
8
|
+
// never be replayed as a revocation, or the reverse.
|
|
9
|
+
//
|
|
10
|
+
// Location: exactly `<data root>/snapshot-leases/completed/<name>` (no suffix), where name is the lowercase SHA-256 of the canonical JSON array
|
|
11
|
+
// [snapshot, ownership]: the broker's own f227 completion key for that sub-handle, so the revocation also fences legacy exact-handle reuse (Terra,
|
|
12
|
+
// 2026-11-05). One file, read, authenticated and reread there; no sidecar. A file there with another schema (a legacy completion) is not a revocation
|
|
13
|
+
// and is ignored here; a link or a non-file refuses.
|
|
14
|
+
import { createHash, createPublicKey, verify } from "node:crypto";
|
|
15
|
+
import fs from "node:fs";
|
|
16
|
+
import path from "node:path";
|
|
17
|
+
import { canonicalJson } from "./provenance-verify.mjs";
|
|
18
|
+
|
|
19
|
+
export const REVOCATION_SCHEMA = "rustright.snapshot-revocation.v1";
|
|
20
|
+
export const REVOCATION_DOMAIN = "rustright-snapshot-revocation-v1";
|
|
21
|
+
export const REVOCATION_DIR = path.join("snapshot-leases", "completed");
|
|
22
|
+
/** The signed payload's fields, exactly (Terra's proposal, 2026-11-05; not frozen until the shared golden fixture agrees). */
|
|
23
|
+
export const REVOCATION_FIELDS = Object.freeze(["dataRoot", "host", "keyId", "ownerFile", "ownerSha256", "ownership", "proofSha256", "runtime", "schema", "snapshot"]);
|
|
24
|
+
const SHA = /^[0-9a-f]{64}$/;
|
|
25
|
+
|
|
26
|
+
export class RevocationError extends Error {
|
|
27
|
+
constructor(code, message) { super(message); this.name = "RevocationError"; this.code = code; }
|
|
28
|
+
}
|
|
29
|
+
const refuse = (code, message) => { throw new RevocationError(code, message); };
|
|
30
|
+
const sha256Hex = (data) => createHash("sha256").update(data).digest("hex");
|
|
31
|
+
const isRecord = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
|
|
32
|
+
const ID = /^[A-Za-z0-9._-]+$/;
|
|
33
|
+
|
|
34
|
+
/** The exact bytes the broker signs for a revocation payload. */
|
|
35
|
+
export const revocationSignedBytes = (payload) => Buffer.from(`${REVOCATION_DOMAIN}\n${canonicalJson(payload)}`, "utf8");
|
|
36
|
+
|
|
37
|
+
/** The f227 completion name of one sub-handle of one snapshot: lowercase SHA-256 of canonical JSON `[snapshot, ownership]`. */
|
|
38
|
+
export const revocationName = (snapshot, ownership) => sha256Hex(Buffer.from(canonicalJson([snapshot, ownership]), "utf8"));
|
|
39
|
+
|
|
40
|
+
/** The one path a revocation of `sub` (`<ownerHandle>#<id>`) of `snapshot` may live at under the managed data root `dataRoot`. */
|
|
41
|
+
export function revocationFile(dataRoot, ownerHandle, sub, snapshot) {
|
|
42
|
+
if (typeof ownerHandle !== "string" || !ID.test(ownerHandle)) refuse("handle", `${JSON.stringify(ownerHandle)} is not an owner handle`);
|
|
43
|
+
if (typeof sub !== "string" || !sub.startsWith(`${ownerHandle}#`) || !ID.test(sub.slice(ownerHandle.length + 1))) refuse("handle", `${JSON.stringify(sub)} is not a sub-handle of ${ownerHandle}`);
|
|
44
|
+
if (typeof snapshot !== "string" || !path.isAbsolute(snapshot)) refuse("root", "the owner record names no absolute snapshot");
|
|
45
|
+
if (typeof dataRoot !== "string" || !path.isAbsolute(dataRoot)) refuse("root", "the managed data root is not absolute");
|
|
46
|
+
return path.join(dataRoot, REVOCATION_DIR, revocationName(snapshot, sub));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The revocation's bytes, or null when none exists. A link, a directory or an unreadable entry is a refusal, never null. */
|
|
50
|
+
export function readRevocation(file) {
|
|
51
|
+
let meta;
|
|
52
|
+
try { meta = fs.lstatSync(file); } catch (e) { if (e.code === "ENOENT") return null; return refuse("read", `${file} cannot be read (${e.code ?? e.message})`); }
|
|
53
|
+
if (!meta.isFile()) refuse("read", `${file} is not a plain file`);
|
|
54
|
+
return fs.readFileSync(file);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Whether `bytes` claim to be a snapshot revocation at all (its envelope schema); anything else at the completion key is the broker's own record. */
|
|
58
|
+
export function isRevocationEnvelope(bytes) {
|
|
59
|
+
try { return JSON.parse(Buffer.isBuffer(bytes) ? bytes.toString("utf8") : String(bytes))?.schema === REVOCATION_SCHEMA; } catch { return false; }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const publicKeyOf = (hex) => {
|
|
63
|
+
const bytes = Buffer.from(hex, "hex");
|
|
64
|
+
if (bytes.length !== 65 || bytes[0] !== 0x04) refuse("pin", "the pinned public key is not an uncompressed SEC1 P-256 point");
|
|
65
|
+
return createPublicKey({ key: { kty: "EC", crv: "P-256", x: bytes.subarray(1, 33).toString("base64url"), y: bytes.subarray(33, 65).toString("base64url") }, format: "jwk" });
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Verifies `bytes` as the broker's revocation of exactly `sub` for exactly this owner record. Returns the signed payload; throws RevocationError
|
|
70
|
+
* (stable `code`) on any mismatch.
|
|
71
|
+
* pins: the host's enrolled `{ host, keyId, publicKey, brokerDigest }`
|
|
72
|
+
* expected: { ownerFile, dataRoot (both canonical, realpath), ownerBytes (the record bytes the reclaim judged), owner (parsed), sub }
|
|
73
|
+
*/
|
|
74
|
+
export function verifyRevocation(bytes, pins, { ownerFile, dataRoot, ownerBytes, owner, sub }) {
|
|
75
|
+
let envelope = null;
|
|
76
|
+
try { envelope = JSON.parse(Buffer.isBuffer(bytes) ? bytes.toString("utf8") : String(bytes)); } catch { envelope = null; }
|
|
77
|
+
if (!isRecord(envelope) || envelope.schema !== REVOCATION_SCHEMA) refuse("schema", "not a handle revocation");
|
|
78
|
+
const { payload, signature } = envelope;
|
|
79
|
+
if (!isRecord(payload) || !isRecord(signature)) refuse("malformed", "payload or signature is missing");
|
|
80
|
+
if (signature.alg !== "ES256") refuse("alg", "signature algorithm must be ES256");
|
|
81
|
+
if (!isRecord(pins) || typeof pins.publicKey !== "string" || sha256Hex(Buffer.from(pins.publicKey, "hex")) !== pins.keyId) refuse("pin", "the pinned key id does not match the pinned public key");
|
|
82
|
+
if (signature.keyId !== pins.keyId || payload.keyId !== pins.keyId) refuse("key", "not signed by the pinned broker key");
|
|
83
|
+
if (typeof signature.value !== "string" || !/^[0-9a-fA-F]{128}$/.test(signature.value)) refuse("signature", "signature is not 64 bytes r||s in hex");
|
|
84
|
+
let good = false;
|
|
85
|
+
try { good = verify("sha256", revocationSignedBytes(payload), { key: publicKeyOf(pins.publicKey), dsaEncoding: "ieee-p1363" }, Buffer.from(signature.value, "hex")); } catch (e) { if (e instanceof RevocationError) throw e; }
|
|
86
|
+
if (!good) refuse("signature", "signature does not verify");
|
|
87
|
+
// Everything below is signed: exactly these fields, bound to this host's broker runtime, this exact record's bytes, its snapshot and this exact sub-handle.
|
|
88
|
+
const fields = Object.keys(payload).sort();
|
|
89
|
+
if (JSON.stringify(fields) !== JSON.stringify(REVOCATION_FIELDS)) refuse("malformed", `the payload carries ${fields.join(", ")}, not exactly ${REVOCATION_FIELDS.join(", ")}`);
|
|
90
|
+
if (payload.schema !== REVOCATION_SCHEMA) refuse("schema", "the signed payload is not a snapshot revocation");
|
|
91
|
+
if (payload.host !== pins.host) refuse("host", "signed for another host");
|
|
92
|
+
if (!isRecord(payload.runtime) || JSON.stringify(Object.keys(payload.runtime)) !== '["brokerDigest"]' || payload.runtime.brokerDigest !== pins.brokerDigest) refuse("runtime", "signed by another broker runtime");
|
|
93
|
+
if (payload.dataRoot !== dataRoot) refuse("root", "revokes a sub-handle under another managed data root");
|
|
94
|
+
if (payload.ownerFile !== ownerFile) refuse("root", "revokes a sub-handle of another ownership record");
|
|
95
|
+
if (payload.snapshot !== owner.snapshot) refuse("root", "revokes a sub-handle of another snapshot");
|
|
96
|
+
if (payload.ownership !== sub) refuse("handle", `revokes ${payload.ownership}, not ${sub}`);
|
|
97
|
+
if (payload.ownerSha256 !== sha256Hex(ownerBytes)) refuse("owner", "signed over other owner record bytes (the record changed, or it is another record)");
|
|
98
|
+
if (typeof payload.proofSha256 !== "string" || !SHA.test(payload.proofSha256)) refuse("proof", "proofSha256 is not a lowercase SHA-256");
|
|
99
|
+
return payload;
|
|
100
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"envelope":{"payload":{"dataRoot":"/Volumes/D/.rightkit-managed","host":"fixture-host","keyId":"698bea63dc44a344663ff1429aea10842df27b6b991ef25866b2c6c02cdcc5be","ownerFile":"/Volumes/D/.rightkit-managed/build-ownership/770a65dcafd91981/owner.json","ownerSha256":"be6603d17ef691daaece03448790d3927c98d606a6576d105fbe6bfcc467a5a5","ownership":"26e12157-e275-4bfd-95a2-f1ff48f56e50#bf51a9c8-2f5d-4b80-9fa4-72a0be202da8","proofSha256":"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd","runtime":{"brokerDigest":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"},"schema":"rustright.snapshot-revocation.v1","snapshot":"/Volumes/D/.rightkit-managed/snapshots/770a65dcafd91981"},"schema":"rustright.snapshot-revocation.v1","signature":{"alg":"ES256","keyId":"698bea63dc44a344663ff1429aea10842df27b6b991ef25866b2c6c02cdcc5be","value":"3f5fcdd39de47815032dcb4ba074b50a8e91d58cec8e0b89a234fc5a4e9fddf8a6769c4be9099afe62b87cf9e73464a0f3c532fcfab6cb23714f05d800ac8a9a"}},"pins":{"brokerDigest":"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb","host":"fixture-host","keyId":"698bea63dc44a344663ff1429aea10842df27b6b991ef25866b2c6c02cdcc5be","publicKey":"046b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c2964fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"}}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema": "rightkit.revocation-vectors/1",
|
|
3
|
+
"note": "rightkit#1511 / rustright#228 shared golden fixture. TEST KEY ONLY: never enrolled, never a broker key. Status: proposal, not frozen.",
|
|
4
|
+
"domain": "rustright-snapshot-revocation-v1",
|
|
5
|
+
"pins": {
|
|
6
|
+
"host": "fixture-host",
|
|
7
|
+
"keyId": "588caca3ea3415184feb9075c98ec15d92b0ed9aae918b27eff229f77cada0cc",
|
|
8
|
+
"publicKey": "04c51817454bc646c6b036d7c1ff156f4e2e2938173bbf5b00da7387f44f95e3f7f21c0fff3995ccd03c3c1985dcc12b483e85b37e3793e6da4e3529245f02b86a",
|
|
9
|
+
"brokerDigest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
10
|
+
},
|
|
11
|
+
"ownerBytes": "{\"schema\":\"rightkit.build-ownership/1\",\"handle\":\"26e12157-e275-4bfd-95a2-f1ff48f56e50\",\"host\":\"fixture-host\",\"pid\":4242,\"snapshot\":\"/Volumes/D/.rightkit-managed/snapshots/770a65dcafd91981\"}",
|
|
12
|
+
"payload": {
|
|
13
|
+
"schema": "rustright.snapshot-revocation.v1",
|
|
14
|
+
"keyId": "588caca3ea3415184feb9075c98ec15d92b0ed9aae918b27eff229f77cada0cc",
|
|
15
|
+
"host": "fixture-host",
|
|
16
|
+
"runtime": {
|
|
17
|
+
"brokerDigest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
18
|
+
},
|
|
19
|
+
"snapshot": "/Volumes/D/.rightkit-managed/snapshots/770a65dcafd91981",
|
|
20
|
+
"ownership": "26e12157-e275-4bfd-95a2-f1ff48f56e50#bf51a9c8-2f5d-4b80-9fa4-72a0be202da8",
|
|
21
|
+
"dataRoot": "/Volumes/D/.rightkit-managed",
|
|
22
|
+
"ownerFile": "/Volumes/D/.rightkit-managed/build-ownership/770a65dcafd91981/owner.json",
|
|
23
|
+
"ownerSha256": "be6603d17ef691daaece03448790d3927c98d606a6576d105fbe6bfcc467a5a5",
|
|
24
|
+
"proofSha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
|
25
|
+
},
|
|
26
|
+
"signedBytesUtf8": "rustright-snapshot-revocation-v1\n{\"dataRoot\":\"/Volumes/D/.rightkit-managed\",\"host\":\"fixture-host\",\"keyId\":\"588caca3ea3415184feb9075c98ec15d92b0ed9aae918b27eff229f77cada0cc\",\"ownerFile\":\"/Volumes/D/.rightkit-managed/build-ownership/770a65dcafd91981/owner.json\",\"ownerSha256\":\"be6603d17ef691daaece03448790d3927c98d606a6576d105fbe6bfcc467a5a5\",\"ownership\":\"26e12157-e275-4bfd-95a2-f1ff48f56e50#bf51a9c8-2f5d-4b80-9fa4-72a0be202da8\",\"proofSha256\":\"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\",\"runtime\":{\"brokerDigest\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\"},\"schema\":\"rustright.snapshot-revocation.v1\",\"snapshot\":\"/Volumes/D/.rightkit-managed/snapshots/770a65dcafd91981\"}",
|
|
27
|
+
"signedBytesSha256": "61fd2ace1fa136a1e5dc77fb9c23fa0eca8d9079cc2288a21d7553c39d692623",
|
|
28
|
+
"fileNameInput": "[\"/Volumes/D/.rightkit-managed/snapshots/770a65dcafd91981\",\"26e12157-e275-4bfd-95a2-f1ff48f56e50#bf51a9c8-2f5d-4b80-9fa4-72a0be202da8\"]",
|
|
29
|
+
"fileName": "bf1857c7d0d283fdacc8d62dc941ef413ad234c1dbed42dcc55825e9e4d93cb4",
|
|
30
|
+
"expectedPath": "/Volumes/D/.rightkit-managed/snapshot-leases/completed/bf1857c7d0d283fdacc8d62dc941ef413ad234c1dbed42dcc55825e9e4d93cb4",
|
|
31
|
+
"envelope": {
|
|
32
|
+
"schema": "rustright.snapshot-revocation.v1",
|
|
33
|
+
"payload": {
|
|
34
|
+
"schema": "rustright.snapshot-revocation.v1",
|
|
35
|
+
"keyId": "588caca3ea3415184feb9075c98ec15d92b0ed9aae918b27eff229f77cada0cc",
|
|
36
|
+
"host": "fixture-host",
|
|
37
|
+
"runtime": {
|
|
38
|
+
"brokerDigest": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
|
|
39
|
+
},
|
|
40
|
+
"snapshot": "/Volumes/D/.rightkit-managed/snapshots/770a65dcafd91981",
|
|
41
|
+
"ownership": "26e12157-e275-4bfd-95a2-f1ff48f56e50#bf51a9c8-2f5d-4b80-9fa4-72a0be202da8",
|
|
42
|
+
"dataRoot": "/Volumes/D/.rightkit-managed",
|
|
43
|
+
"ownerFile": "/Volumes/D/.rightkit-managed/build-ownership/770a65dcafd91981/owner.json",
|
|
44
|
+
"ownerSha256": "be6603d17ef691daaece03448790d3927c98d606a6576d105fbe6bfcc467a5a5",
|
|
45
|
+
"proofSha256": "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
|
46
|
+
},
|
|
47
|
+
"signature": {
|
|
48
|
+
"alg": "ES256",
|
|
49
|
+
"keyId": "588caca3ea3415184feb9075c98ec15d92b0ed9aae918b27eff229f77cada0cc",
|
|
50
|
+
"value": "dbd7e96246ce60b3393cd544bb3d1368bbdfe0b99083cf6fd235458ff4df6de21cad283712ec51769c0486c8af164cca72d20eb61a8377c5b40db28475c1face"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|