@rightkit/release 0.6.43 → 0.6.44
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/advisory-exceptions.mjs +10 -0
- package/deterministic-scans.mjs +23 -3
- package/managed-cargo.mjs +6 -0
- package/package.json +1 -1
- package/rightkit-versions.json +5 -5
package/advisory-exceptions.mjs
CHANGED
|
@@ -392,6 +392,16 @@ export function checkCrateAdvisoryExceptions({ root = process.cwd(), now = new D
|
|
|
392
392
|
}
|
|
393
393
|
for (const p of checkAdvisoryExceptions({ root: here, now, allowPending, exceptionsFile: CRATE_EXCEPTIONS_FILE, readFile: f => readFile(path.join(here, f)) })) problems.push(`${dir}: ${p}`);
|
|
394
394
|
}
|
|
395
|
+
// RightKit is one Cargo workspace with one Cargo.lock (GATE-CONTRACT GC-T24): the repository root holds the ledger, deny.toml and
|
|
396
|
+
// .cargo/audit.toml for every crate that is a member of it.
|
|
397
|
+
if (exists(path.join(root, 'Cargo.toml')) && exists(path.join(root, LOCK_FILE))) {
|
|
398
|
+
const ignores = [DENY_FILE, AUDIT_FILE].some(f => { try { return IGNORE_LIST_RE.test(readFile(path.join(root, f))); } catch { return false; } });
|
|
399
|
+
if (!exists(path.join(root, CRATE_EXCEPTIONS_FILE))) {
|
|
400
|
+
if (ignores) problems.push(`.: ${DENY_FILE} or ${AUDIT_FILE} ignores an advisory but ${CRATE_EXCEPTIONS_FILE} does not exist`);
|
|
401
|
+
} else {
|
|
402
|
+
for (const p of checkAdvisoryExceptions({ root, now, allowPending, exceptionsFile: CRATE_EXCEPTIONS_FILE, readFile: f => readFile(path.join(root, f)) })) problems.push(`.: ${p}`);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
395
405
|
return problems;
|
|
396
406
|
}
|
|
397
407
|
|
package/deterministic-scans.mjs
CHANGED
|
@@ -2416,16 +2416,36 @@ const INTERNAL = {
|
|
|
2416
2416
|
"dependency-freshness": async (s, ctx) => {
|
|
2417
2417
|
let bin;
|
|
2418
2418
|
try { bin = resolveOutdatedBin(); } catch (e) { return { advice: `dependency freshness not measured: ${e instanceof OutdatedUnavailableError ? e.message : `right-update could not be located (${e.message})`}` }; }
|
|
2419
|
+
// The answer is a property of the repository's lock files and of the registry at this hour, not of the unit being gated: a run per unit of one
|
|
2420
|
+
// commit asks the registry again for the same locks (88 s per crate on 2026-11-04, 6795 s over 77 crate runs). One answer per lock set and UTC hour.
|
|
2421
|
+
let cachePath = null;
|
|
2422
|
+
try {
|
|
2423
|
+
const names = [".rightkit/update.json", "Cargo.lock", "pnpm-lock.yaml", "package.json"];
|
|
2424
|
+
const h = crypto.createHash("sha256");
|
|
2425
|
+
for (const n of names) { h.update(`${n}\0`); try { h.update(fs.readFileSync(path.join(ctx.contentRoot, n))); } catch { h.update("absent"); } }
|
|
2426
|
+
const dir = path.join(ctx.tmpRoot ?? os.tmpdir(), "rightkit-freshness-cache");
|
|
2427
|
+
cachePath = path.join(dir, `${h.digest("hex").slice(0, 32)}-${new Date().toISOString().slice(0, 13)}.json`);
|
|
2428
|
+
const hit = JSON.parse(fs.readFileSync(cachePath, "utf8"));
|
|
2429
|
+
if (typeof hit?.advice === "string") return { advice: hit.advice };
|
|
2430
|
+
} catch { /* no cached answer: measure */ }
|
|
2431
|
+
const remember = (result) => {
|
|
2432
|
+
// A measurement that timed out is cached too: it is the 120 s case (41 of 81 crate runs on 2026-11-04), and asking again for every unit of the same
|
|
2433
|
+
// lock set within the hour is the cost this cache removes. The advice text says "not measured", so nobody reads it as a pass.
|
|
2434
|
+
if (cachePath && typeof result?.advice === "string") {
|
|
2435
|
+
try { fs.mkdirSync(path.dirname(cachePath), { recursive: true }); fs.writeFileSync(cachePath, JSON.stringify({ advice: result.advice })); } catch { /* the cache is an optimisation only */ }
|
|
2436
|
+
}
|
|
2437
|
+
return result;
|
|
2438
|
+
};
|
|
2419
2439
|
let r;
|
|
2420
2440
|
try { r = await ctx.deps.spawn(process.execPath, [bin, "check", "--json", "--repo", ctx.contentRoot], { cwd: ctx.contentRoot, encoding: "utf8", env: { ...ctx.deps.env, ...PNPM_NO_HOOKS_ENV }, timeout: 120_000, maxBuffer: 1 << 26 }); }
|
|
2421
|
-
catch (e) { return { advice: `dependency freshness not measured: right-update check did not run (${e.message})` }; }
|
|
2441
|
+
catch (e) { return remember({ advice: `dependency freshness not measured: right-update check did not run (${e.message})` }); }
|
|
2422
2442
|
let report = null;
|
|
2423
2443
|
try { report = JSON.parse(String(r?.stdout ?? "")); } catch { report = null; }
|
|
2424
|
-
if (!report || !Array.isArray(report.entries)) return { advice: `dependency freshness not measured: right-update check printed no report${r?.status ? ` (exit ${r.status})` : ""}` };
|
|
2444
|
+
if (!report || !Array.isArray(report.entries)) return remember({ advice: `dependency freshness not measured: right-update check printed no report${r?.status ? ` (exit ${r.status})` : ""}` });
|
|
2425
2445
|
const behind = report.entries.filter((e) => e.status === "outdated");
|
|
2426
2446
|
const unjudged = report.entries.filter((e) => e.status === "unknown" || e.error).length;
|
|
2427
2447
|
const named = behind.slice(0, 5).map((e) => `${e.name} ${e.pinned ?? "?"} -> ${e.latest ?? "?"}`).join(", ");
|
|
2428
|
-
return { advice: `${behind.length} behind latest${named ? ` (${named}${behind.length > 5 ? ", ..." : ""})` : ""}${unjudged ? `; ${unjudged} not judged` : ""}` };
|
|
2448
|
+
return remember({ advice: `${behind.length} behind latest${named ? ` (${named}${behind.length > 5 ? ", ..." : ""})` : ""}${unjudged ? `; ${unjudged} not judged` : ""}` });
|
|
2429
2449
|
},
|
|
2430
2450
|
// The Swift type-check (rightkit#1289): Mac host only, Class A, before any compile stage. SwiftPM compiles each target with `-Xswiftc -typecheck`: swiftc type-checks every
|
|
2431
2451
|
// source against the real SDK and the target's dependencies and writes no object file, so a labelled-argument order error fails here in seconds instead of at the
|
package/managed-cargo.mjs
CHANGED
|
@@ -272,8 +272,14 @@ export function brokerClientRoute({ env = process.env, platform = process.platfo
|
|
|
272
272
|
return { client, env: socket ? { ...env, RUSTRIGHT_BUILD_BROKER_SOCKET: socket } : env, mapUnavailable: platform === 'darwin' };
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
/** Cargo commands that compile nothing: Class A, run direct with the pinned toolchain and never carried by the broker (GC-A11, BROKER-CONTRACT interface item 14). */
|
|
276
|
+
const NON_COMPILING_CARGO = new Set(['metadata', 'fetch', 'tree', 'locate-project', 'pkgid', 'verify-project', 'read-manifest']);
|
|
277
|
+
|
|
275
278
|
export function runCargoSync(args, options = {}, { platform = process.platform, exists = existsSync, spawn = spawnSync, fsOps } = {}) {
|
|
276
279
|
const env = options.env ?? process.env;
|
|
280
|
+
// The broker refuses every carried request that compiles nothing (RK_CHECK_ERROR), so right-release's `cargo metadata` of the compile and
|
|
281
|
+
// package stages runs here, directly, exactly as the gate runs its Class A cargo calls.
|
|
282
|
+
if (NON_COMPILING_CARGO.has(args[0])) return spawn("cargo", args, { ...options, env: directCargoEnv(env, platform, exists) });
|
|
277
283
|
const seam = carriedSeam(args, options, { platform, spawn });
|
|
278
284
|
if (seam) return seam;
|
|
279
285
|
// A gate run outside the broker by Adrian's recorded exception: the real toolchain, shims off PATH, on every platform (NO_BROKER_ENV).
|
package/package.json
CHANGED
package/rightkit-versions.json
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@rightkit/qa": "0.7.0",
|
|
51
51
|
"@rightkit/qa-chrome": "0.1.12",
|
|
52
52
|
"@rightkit/react-shell": "0.7.3",
|
|
53
|
-
"@rightkit/release": "0.6.
|
|
53
|
+
"@rightkit/release": "0.6.44",
|
|
54
54
|
"@rightkit/settings-ui": "0.7.1",
|
|
55
55
|
"@rightkit/social-ui": "0.1.0",
|
|
56
56
|
"@rightkit/system-ui": "0.1.0",
|
|
@@ -529,7 +529,7 @@
|
|
|
529
529
|
"rightkit-app-host": "0.1.0",
|
|
530
530
|
"rightkit-app-lock": "0.1.0",
|
|
531
531
|
"rightkit-app-manager": "0.1.2",
|
|
532
|
-
"rightkit-app-settings": "0.3.
|
|
532
|
+
"rightkit-app-settings": "0.3.4",
|
|
533
533
|
"rightkit-app-update": "0.1.0",
|
|
534
534
|
"rightkit-apple-ops": "0.1.2",
|
|
535
535
|
"rightkit-approvals": "0.1.0",
|
|
@@ -569,7 +569,7 @@
|
|
|
569
569
|
"rightkit-contracts": "0.1.10",
|
|
570
570
|
"rightkit-contrast": "0.1.0",
|
|
571
571
|
"rightkit-crash": "0.3.8",
|
|
572
|
-
"rightkit-credentials": "0.
|
|
572
|
+
"rightkit-credentials": "0.5.0",
|
|
573
573
|
"rightkit-crypto": "0.1.2",
|
|
574
574
|
"rightkit-daemon": "0.5.3",
|
|
575
575
|
"rightkit-db": "0.5.5",
|
|
@@ -605,7 +605,7 @@
|
|
|
605
605
|
"rightkit-evidence-governance": "0.1.1",
|
|
606
606
|
"rightkit-evidence-report": "0.1.1",
|
|
607
607
|
"rightkit-feed": "0.1.0",
|
|
608
|
-
"rightkit-ffmpeg": "0.
|
|
608
|
+
"rightkit-ffmpeg": "0.3.0",
|
|
609
609
|
"rightkit-file-watch": "0.4.4",
|
|
610
610
|
"rightkit-fs": "0.4.12",
|
|
611
611
|
"rightkit-fsindex": "0.6.2",
|
|
@@ -659,7 +659,7 @@
|
|
|
659
659
|
"rightkit-privileged-helper": "0.1.1",
|
|
660
660
|
"rightkit-prompt-recipes": "0.1.0",
|
|
661
661
|
"rightkit-pty": "0.1.0",
|
|
662
|
-
"rightkit-qa": "0.10.
|
|
662
|
+
"rightkit-qa": "0.10.4",
|
|
663
663
|
"rightkit-qa-driver": "0.7.1",
|
|
664
664
|
"rightkit-record": "0.4.0",
|
|
665
665
|
"rightkit-reframe": "0.1.1",
|