@rightkit/release 0.6.88 → 0.6.89
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/app-check.mjs +26 -0
- package/bin/rightkit-gate.mjs +64 -3
- package/build-release.mjs +71 -1
- package/install-assembled-app.mjs +13 -0
- package/local-publish.mjs +6 -2
- package/mac-signing-matrix.mjs +13 -0
- package/package.json +1 -1
- package/publish-local-cargo.mjs +3 -0
- package/release-pin-floor.mjs +15 -0
- package/release-qa-hardening.mjs +25 -0
- package/release-switch-scan.mjs +27 -0
- package/release.mjs +7 -0
- package/rightkit-versions.json +14 -10
- package/snapshot-check.mjs +8 -1
- package/unit-gate.mjs +3 -2
package/app-check.mjs
CHANGED
|
@@ -110,6 +110,7 @@ import { CONSUMER_CONTRACT_RULES } from "./consumer-contracts.mjs";
|
|
|
110
110
|
import { OWNERSHIP_CLASS_RULES } from "./ownership-class-rules.mjs";
|
|
111
111
|
import { SOURCE_CLOSURE_RULES } from "./source-closure-rules.mjs";
|
|
112
112
|
import { SHELL_CONTRACT_RULES } from "./shell-contract.mjs";
|
|
113
|
+
import { neutralIgnored } from "./stage-ledger.mjs";
|
|
113
114
|
import { CONSUMER_SOURCE_RULES } from "./consumer-source-contracts.mjs";
|
|
114
115
|
import { CONSUMER_POLICY_RULES } from "./consumer-policy.mjs";
|
|
115
116
|
import { engineRecordStore, suiteKeyLiteral, suiteUpdaterKey } from "./suite-trust-roots.mjs";
|
|
@@ -1307,8 +1308,33 @@ function trustPolicyExclude({ root, files }) {
|
|
|
1307
1308
|
return out;
|
|
1308
1309
|
}
|
|
1309
1310
|
|
|
1311
|
+
// G29: the QA runner keeps a stash of the app binary and a pointer file under the app root (rightkit-qa binary.rs STASH_DIR, POINTER_FILE;
|
|
1312
|
+
// `[ui] pointer_file` renames the pointer). Its first run of an installed-QA stage writes them into the snapshot. A commit that does not
|
|
1313
|
+
// ignore them then has a snapshot that is no longer its tree: the broker fails the journeys build on its post-check (the client exits 125),
|
|
1314
|
+
// and the stage ledger refuses the file at the end of qualify, after package, signing and notarization (Pulse 1386c633 and CodeRight
|
|
1315
|
+
// 7622df951, 2026-11-26). The app root is the directory that holds both a release config and the runner's rightkit-qa.toml.
|
|
1316
|
+
function qaStashIgnored({ root, files }) {
|
|
1317
|
+
const out = [];
|
|
1318
|
+
const configDirs = new Set(configFiles(files).map(dirOf));
|
|
1319
|
+
for (const file of files.filter((f) => /(^|\/)rightkit-qa\.toml$/.test(f) && scanned(f) && configDirs.has(dirOf(f)))) {
|
|
1320
|
+
const dir = dirOf(file);
|
|
1321
|
+
const text = readText(root, file) ?? "";
|
|
1322
|
+
const pointer = /^\s*pointer_file\s*=\s*"([^"]+)"/m.exec(text)?.[1] ?? ".rightkit-qa-app-binary";
|
|
1323
|
+
const under = (name) => (dir === "." ? name : `${dir}/${name}`);
|
|
1324
|
+
const wanted = [[under(".rightkit-qa-bin/host/app"), under(".rightkit-qa-bin/")], [under(pointer), under(pointer)]];
|
|
1325
|
+
let ignored;
|
|
1326
|
+
try { ignored = neutralIgnored({ dir: root, paths: wanted.map(([probe]) => probe) }); } catch { continue; } // git cannot answer here: the stage ledger still guards at the end
|
|
1327
|
+
for (const [probe, line] of wanted) {
|
|
1328
|
+
if (ignored.has(probe)) continue;
|
|
1329
|
+
out.push({ file, subject: line, problem: `${line} is not ignored by the commit's own ignore rules; the QA runner writes it under the app root during installed QA, so the snapshot stops being the commit's tree and qualification fails after the package stage`, fix: `add "${line}" to the commit's .gitignore` });
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
return out;
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1310
1335
|
export const RULES = Object.freeze([
|
|
1311
1336
|
{ id: "eol-policy", gap: "G04", run: eolPolicy },
|
|
1337
|
+
{ id: "qa-stash-ignored", gap: "G29", run: qaStashIgnored },
|
|
1312
1338
|
{ id: "file-url", gap: "G12", run: fileUrls },
|
|
1313
1339
|
{ id: "retired-alias", gap: "P11", run: retiredAlias },
|
|
1314
1340
|
{ id: "qa-platform", gap: "G13", run: qaPlatform },
|
package/bin/rightkit-gate.mjs
CHANGED
|
@@ -2286,6 +2286,9 @@ async function runStages(o, args, root, git, io) {
|
|
|
2286
2286
|
return releasePinFloorProblem({ packageJsonText, installedVersion, where: appDir === "." ? "package.json" : `${appDir}/package.json` });
|
|
2287
2287
|
};
|
|
2288
2288
|
const phaseTimings = [];
|
|
2289
|
+
// The registry verdict this door run took before its compile, as a file only this process knows: a later invocation on the same commit
|
|
2290
|
+
// has no such file and asks the registries itself (rightkit#1754; the binding is to the run, never to the commit).
|
|
2291
|
+
let doorRegistryAdmissionFile = null;
|
|
2289
2292
|
for (const stage of stages) {
|
|
2290
2293
|
if (stage === "check" && publisherUploadOnly && receipt.stages.check?.ok && tierAtLeast(receipt.stages.check.ruleTier ?? "compile", earlyTier)) { o.out(`${tag} [check] already passed (${receipt.stages.check.ruleTier ?? "compile"} tier) for this exact input (commit, tree, lockfiles, gate, toolchain)`); continue; }
|
|
2291
2294
|
if (stage === "compile" && receipt.stages.compile?.ok) {
|
|
@@ -2319,7 +2322,23 @@ async function runStages(o, args, root, git, io) {
|
|
|
2319
2322
|
let ok = false; const at = new Date().toISOString(); const stageStartedMs = Date.now(); let extra = {}; let directReceipt = null; let packageSigned = new Map();
|
|
2320
2323
|
if (stage === "check") {
|
|
2321
2324
|
{ const problem = await pinFloor(false); if (problem) { o.err(`${tag} BLOCKED: ${problem.message}; no class A row ran and nothing compiled`); return 1; } }
|
|
2325
|
+
// An app pinned to an older @rightkit/release than this host gate: said once, never refused (release-pin-floor.mjs releasePinBehindHostNote).
|
|
2326
|
+
try {
|
|
2327
|
+
const packageJsonText = appPackageJson();
|
|
2328
|
+
if (packageJsonText !== null) {
|
|
2329
|
+
const { releasePinBehindHostNote } = await import("../release-pin-floor.mjs");
|
|
2330
|
+
const hostVersion = JSON.parse(fs.readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
|
|
2331
|
+
const note = releasePinBehindHostNote({ packageJsonText, hostVersion, where: appDir === "." ? "package.json" : `${appDir}/package.json` });
|
|
2332
|
+
if (note) o.out(`${tag} [check] note: ${note}`);
|
|
2333
|
+
}
|
|
2334
|
+
} catch { /* informational only */ }
|
|
2322
2335
|
ok = (await (o.runCheck ?? (() => main(["check", "--commit", ds ? commit : "HEAD", "--full-a", ...(ds ? ["--snapshot", ds.path] : []), ...appScope, "--rule-tier", earlyTier], { ...io, cwd: root, ...(ds ? { snapshotLock: ds.lock } : {}) })))(earlyTier)) === 0;
|
|
2336
|
+
// A run that goes on to qualify: a journeys manifest whose release-critical journeys cannot pass one installed-QA run is refused here,
|
|
2337
|
+
// before anything compiles (release-qa-hardening.mjs criticalJourneySelectionProblems; CodeRight 2026-11-26: four adapters, found after notarization).
|
|
2338
|
+
if (ok && stages.includes("qualify") && !mobile && PLATFORMS.includes(platform)) {
|
|
2339
|
+
const shape = await journeysShapeProblems({ o, git, commit, appDir, base: ds ? ds.path : root, platform });
|
|
2340
|
+
if (shape.length) { for (const line of shape) o.err(`${tag} BLOCKED: [check] ${line}`); ok = false; }
|
|
2341
|
+
}
|
|
2323
2342
|
extra = { ruleTier: earlyTier };
|
|
2324
2343
|
}
|
|
2325
2344
|
else if (stage === "compile") {
|
|
@@ -2344,6 +2363,14 @@ async function runStages(o, args, root, git, io) {
|
|
|
2344
2363
|
};
|
|
2345
2364
|
const admissionAfterStaging = wantsAdmission && executor.kind === "broker" && Boolean(ds);
|
|
2346
2365
|
if (wantsAdmission && !admissionAfterStaging) ok = await admissionDryRun("before any compile");
|
|
2366
|
+
// On a broker host the full dry-run waits for a Cargo target; the registry rows (pin freshness) need none, so they run first.
|
|
2367
|
+
// A stale pin is then refused in seconds, before the sidecars and the app compile, and the verdict is kept for this run's package stage.
|
|
2368
|
+
if (ok && wantsAdmission && admissionAfterStaging) {
|
|
2369
|
+
const file = path.join(fs.mkdtempSync(path.join(os.tmpdir(), "rk-door-registry-")), "admission.json");
|
|
2370
|
+
o.out(`${tag} [compile] registry admission for ${platform} before any compile (right-release build --platform ${platform} --registry-admission-out)`);
|
|
2371
|
+
if (await rightRelease(stage, ["build", "--platform", platform, "--registry-admission-out", file])) doorRegistryAdmissionFile = file;
|
|
2372
|
+
else { o.err(`${tag} BLOCKED: [compile] the registry admission (pin freshness against the registries) refused ${platform}; nothing compiled`); ok = false; }
|
|
2373
|
+
}
|
|
2347
2374
|
// On the snapshot route the sidecars are staged from the snapshot's own config and sources through right-release's source split
|
|
2348
2375
|
// (the staged files and receipt land beside the sources the compile reads; the caches and build trees stay the checkout's), before
|
|
2349
2376
|
// `main --all` compiles. A broker host's stage-sidecar child reaches Cargo through the stage's carrier (stage-seam.mjs).
|
|
@@ -2432,7 +2459,7 @@ async function runStages(o, args, root, git, io) {
|
|
|
2432
2459
|
else if (packageMulti.note) o.out(`${tag} [package] ${packageMulti.note}`);
|
|
2433
2460
|
}
|
|
2434
2461
|
const packageEnv = packagePin.dir ? { CARGO_TARGET_DIR: packagePin.dir } : (packageMulti?.env ?? {});
|
|
2435
|
-
ok = ok && await rightRelease(stage, ["build", "--platform", platform], packageEnv);
|
|
2462
|
+
ok = ok && await rightRelease(stage, ["build", "--platform", platform], { ...packageEnv, ...(doorRegistryAdmissionFile ? { RK_DOOR_REGISTRY_ADMISSION: doorRegistryAdmissionFile } : {}) });
|
|
2436
2463
|
const sealed = ok ? (o.sealedFor ?? sealedFor)({ root: releaseRoot, commit, platform }) : null;
|
|
2437
2464
|
if (ok && !sealed) { o.err(`${tag} [package] the build reported success but sealed nothing for ${commit.slice(0, 8)} on ${platform}`); ok = false; }
|
|
2438
2465
|
if (sealed) extra = { platform, sealed: sealed.id, manifestSha256: sealed.digest };
|
|
@@ -2987,6 +3014,33 @@ export function qualifyOwedProblem({ o, git, commit, appDir = ".", base, owed })
|
|
|
2987
3014
|
return owed.map((x) => `${x.id} (${x.kind}${x.dir ? ` ${x.dir}` : ""}) is owed to qualification (${x.reason}) but no release config under ${appDir} declares qa.journeys, so nothing would run it; declare qa.journeys with a journeys.toml that covers it`);
|
|
2988
3015
|
}
|
|
2989
3016
|
|
|
3017
|
+
/**
|
|
3018
|
+
* Why the journeys manifests of the app's release configs cannot pass one installed-QA run on `platform`; empty when they can or when no
|
|
3019
|
+
* config declares `qa.journeys` with a manifest. Read from `base` (the commit's bytes): the manifest path is the config's
|
|
3020
|
+
* `qa.journeys.manifest`, relative to the config's directory. A manifest that cannot be read or parsed is left to the installed stage,
|
|
3021
|
+
* which names that failure itself.
|
|
3022
|
+
*/
|
|
3023
|
+
export async function journeysShapeProblems({ o, git, commit, appDir = ".", base, platform }) {
|
|
3024
|
+
const listed = git("ls-tree", "-r", "--name-only", "-z", commit);
|
|
3025
|
+
const configs = (failed(listed) ? [] : text(listed).split("\0").filter((f) => /(^|\/)right-release\.config\.(json|mjs)$/.test(f)).filter((f) => appDir === "." || f.startsWith(`${appDir}/`)));
|
|
3026
|
+
const problems = [];
|
|
3027
|
+
let judge = null;
|
|
3028
|
+
for (const config of configs) {
|
|
3029
|
+
let body;
|
|
3030
|
+
try { body = String(o.readFile(path.join(base, config))); } catch { continue; }
|
|
3031
|
+
const m = /\bjourneys["']?\s*:\s*\{[^{}]*?\bmanifest["']?\s*:\s*["']([^"']+)["']/.exec(body);
|
|
3032
|
+
if (!m) continue;
|
|
3033
|
+
const manifestRel = path.posix.join(path.posix.dirname(config), m[1]);
|
|
3034
|
+
let manifestText;
|
|
3035
|
+
try { manifestText = String(o.readFile(path.join(base, manifestRel))); } catch { continue; }
|
|
3036
|
+
judge ??= (await import("../release-qa-hardening.mjs")).criticalJourneySelectionProblems;
|
|
3037
|
+
let found;
|
|
3038
|
+
try { found = judge(manifestText, platform); } catch { continue; }
|
|
3039
|
+
for (const line of found) problems.push(`${manifestRel}: ${line}`);
|
|
3040
|
+
}
|
|
3041
|
+
return problems;
|
|
3042
|
+
}
|
|
3043
|
+
|
|
2990
3044
|
/** The release configs of `commit` (under `appDir`) that declare a `web` block (`web.build` steps), read from `base`: the commit's config decides, never the checkout's. */
|
|
2991
3045
|
export function committedWebBuildConfigs({ o, git, commit, appDir = ".", base }) {
|
|
2992
3046
|
const listedConfigs = git("ls-tree", "-r", "--name-only", "-z", commit);
|
|
@@ -4566,13 +4620,20 @@ export async function main(argv, io = {}) {
|
|
|
4566
4620
|
// GC-A24: RightKit's own preflight and exports probe execute the commit's code with its installed dependencies; a pass is reused
|
|
4567
4621
|
// for the same commit tree, installed-dependency bytes, node and platform (and scope), and only a pass.
|
|
4568
4622
|
const effects = path.join(snapshotDir, "scripts", "ci", "exports-import-effects.mjs");
|
|
4623
|
+
// rightkit#1808: the exports probe imports every exported module from the snapshot, so it needs the snapshot's dependencies. Only a
|
|
4624
|
+
// full admission (--full-a) installs them; a content check installs nothing. The probe therefore runs only on a full admission, and
|
|
4625
|
+
// whether it ran is part of the cache key, so a content check's pass is never reused as a probed one.
|
|
4626
|
+
const probes = o.exists(effects) && scopeForward.length === 0 && fullAdmission;
|
|
4569
4627
|
let selfKey = null;
|
|
4570
|
-
if (ruleCache) { try { selfKey = ruleCache.key({ rule: "rightkit-self-rules", tree: snapshotCommit.tree, scope: scopeForward, installed: installedDependencyDigest({ root: snapshotDir, files: sc.commitFiles(snapshotCheckout, snapshotCommit.commit, o.spawn).files, includeCaches: false }), effects:
|
|
4628
|
+
if (ruleCache) { try { selfKey = ruleCache.key({ rule: "rightkit-self-rules", tree: snapshotCommit.tree, scope: scopeForward, installed: installedDependencyDigest({ root: snapshotDir, files: sc.commitFiles(snapshotCheckout, snapshotCommit.commit, o.spawn).files, includeCaches: false }), effects: probes }); } catch { selfKey = null; } }
|
|
4571
4629
|
const selfCached = Boolean(selfKey && ruleCache.passed(selfKey));
|
|
4572
4630
|
if (selfCached) o.out(`preflight: ${snapshotCommit.commit.slice(0, 12)} cached pass (tree ${snapshotCommit.tree.slice(0, 12)}, same installed dependencies)`);
|
|
4573
4631
|
const r = selfCached ? { status: 0 } : launch(process.execPath, [path.join(snapshotDir, "scripts", "preflight.mjs"), "--repo", root, "--commit", snapshotCommit.commit], { cwd: root, env: o.env });
|
|
4574
4632
|
selfRules = r.status === 0 ? 0 : 1;
|
|
4575
|
-
if (!selfCached && selfRules === 0 && o.exists(effects) && scopeForward.length === 0) {
|
|
4633
|
+
if (!selfCached && selfRules === 0 && o.exists(effects) && scopeForward.length === 0 && !fullAdmission) {
|
|
4634
|
+
o.out("exports-import-effects: not run by this content check (it installs no dependencies into the snapshot); run the check with --full-a, or any --to stage, to probe the exports");
|
|
4635
|
+
}
|
|
4636
|
+
if (!selfCached && selfRules === 0 && probes) {
|
|
4576
4637
|
const common = o.spawn("git", ["rev-parse", "--path-format=absolute", "--git-common-dir"], { cwd: root });
|
|
4577
4638
|
const report = path.join(failed(common) ? path.join(root, ".git") : text(common).trim(), "rightkit-gate", "import-effects", `snapshot-${snapshotCommit.commit}.json`);
|
|
4578
4639
|
const e = launch(process.execPath, [effects, "--root", snapshotDir, "--no-export", "--report", report], { cwd: snapshotDir, env: o.env });
|
package/build-release.mjs
CHANGED
|
@@ -122,6 +122,7 @@ let platform = process.platform === "win32" ? "win" : process.platform === "darw
|
|
|
122
122
|
let dryRun = false;
|
|
123
123
|
let skipChecks = false;
|
|
124
124
|
let resumeFrom = null;
|
|
125
|
+
let registryAdmissionOut = null;
|
|
125
126
|
|
|
126
127
|
for (let i = 0; i < args.length; i += 1) {
|
|
127
128
|
const arg = args[i];
|
|
@@ -130,6 +131,7 @@ for (let i = 0; i < args.length; i += 1) {
|
|
|
130
131
|
else if (arg === "--dry-run") dryRun = true;
|
|
131
132
|
else if (arg === "--skip-checks") skipChecks = true;
|
|
132
133
|
else if (arg === "--resume-from") resumeFrom = args[++i];
|
|
134
|
+
else if (arg === "--registry-admission-out") registryAdmissionOut = args[++i];
|
|
133
135
|
else if (arg === "--tier" || arg.startsWith("--tier=")) fail("build is tier-neutral; select patch or update only during upload");
|
|
134
136
|
else if (arg === "-h" || arg === "--help") usage(0);
|
|
135
137
|
else fail(`unknown argument: ${arg}`);
|
|
@@ -178,6 +180,13 @@ let requestActiveRunStop = null;
|
|
|
178
180
|
// Admission (admission.mjs): every refusal the committed files, this host or the registries can decide is raised here, before the
|
|
179
181
|
// dry-run exit, the clean-source gate, the release lock, any state file, the install, a slot or the worker. `right-release doctor`
|
|
180
182
|
// runs the same rows with the same text, so the two cannot disagree (rightkit#946); a refused build leaves nothing behind.
|
|
183
|
+
// Declared before its first use below: both functions that read it are called from this top-level code (a const is not hoisted).
|
|
184
|
+
/** The schema of the registry admission a door run takes before any compile and hands to its own package stage. */
|
|
185
|
+
const DOOR_REGISTRY_ADMISSION_SCHEMA = "rightkit.door-registry-admission/1";
|
|
186
|
+
|
|
187
|
+
// The door asks for the registry rows alone, before any compile (rightkit#1754): pin freshness needs no Cargo target, while the full
|
|
188
|
+
// admission's recipe rows do. The verdict and its snapshot are written for the door run that asked; nothing else is read or started.
|
|
189
|
+
if (registryAdmissionOut) await registryAdmissionOnly();
|
|
181
190
|
const admitted = await admit();
|
|
182
191
|
|
|
183
192
|
// A dry-run is an inspection contract, not a partial build. It prints the admission rows and exits with their verdict, so it can
|
|
@@ -623,6 +632,50 @@ try {
|
|
|
623
632
|
lock?.release();
|
|
624
633
|
}
|
|
625
634
|
|
|
635
|
+
// `right-release build --registry-admission-out <file>`: resolve this app's RightKit pins against the registries, refuse a pin behind the
|
|
636
|
+
// settled latest exactly as the build admission does, and write the snapshot for the door run. No lock, state, cache or install.
|
|
637
|
+
// The lock inventory is the build's when it can be read without a Cargo target, else the app's own; the package stage checks the
|
|
638
|
+
// snapshot against its full inventory before it trusts it (prepareRightKitResolution with boundSnapshot), so a pin cannot be missed.
|
|
639
|
+
async function registryAdmissionOnly() {
|
|
640
|
+
const commit = releaseSource.commit;
|
|
641
|
+
let config;
|
|
642
|
+
try { config = await importReleaseConfig(configPath, { query: `commit=${commit}` }); }
|
|
643
|
+
catch (error) { console.error(`right-release build: release config could not be loaded (${configPath}): ${error instanceof Error ? error.message : String(error)}`); process.exit(1); }
|
|
644
|
+
let extraLocks;
|
|
645
|
+
try {
|
|
646
|
+
const inputs = resolveReleaseBuildInputs({ repoRoot: sourceRoot, appRoot, configPath, config, target: config.targets?.[platform] });
|
|
647
|
+
extraLocks = rightKitLockInventory({ requiredInputs: inputs.requiredInputs, cargoLockPaths: inputs.cargoLockPaths, nativeLayout: inputs.nativeLayout, config, root: appRoot });
|
|
648
|
+
} catch { extraLocks = rightKitLockInventory({ config, root: appRoot }); }
|
|
649
|
+
let resolution;
|
|
650
|
+
try {
|
|
651
|
+
resolution = await prepareRightKitResolution({
|
|
652
|
+
root: appRoot, extraLocks,
|
|
653
|
+
versions: JSON.parse(readFileSync(path.join(TOOL_ROOT, "rightkit-versions.json"), "utf8")),
|
|
654
|
+
ownership: JSON.parse(readFileSync(path.join(TOOL_ROOT, "rightkit-ownership.json"), "utf8")),
|
|
655
|
+
releaseVersion: RELEASE_TOOL_VERSION, admission: true, cacheDir: "",
|
|
656
|
+
});
|
|
657
|
+
} catch (error) {
|
|
658
|
+
if (!(error instanceof RightKitRegistryError)) throw error;
|
|
659
|
+
console.error(`right-release build: rightkit-registry: ${error.message}`);
|
|
660
|
+
console.error("right-release build: registry admission found a blocking problem; nothing was started");
|
|
661
|
+
process.exit(1);
|
|
662
|
+
}
|
|
663
|
+
for (const line of resolution.freshness.warnings) console.error(`[right-release] WARNING ${line}`);
|
|
664
|
+
writeFileSync(path.resolve(registryAdmissionOut), `${JSON.stringify({ schema: DOOR_REGISTRY_ADMISSION_SCHEMA, commit, platform, observedAt: new Date().toISOString(), snapshot: resolution.snapshot })}\n`);
|
|
665
|
+
console.log(`right-release build: rightkit-registry: ${resolution.summary}; admitted before any compile for this door run`);
|
|
666
|
+
process.exit(0);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
/** The registry admission this door run took before its compile (RK_DOOR_REGISTRY_ADMISSION), when it is for this commit and platform; else null. */
|
|
670
|
+
function doorRegistryAdmission(commit) {
|
|
671
|
+
const file = process.env.RK_DOOR_REGISTRY_ADMISSION;
|
|
672
|
+
if (!file) return null;
|
|
673
|
+
try {
|
|
674
|
+
const record = JSON.parse(readFileSync(file, "utf8"));
|
|
675
|
+
return record?.schema === DOOR_REGISTRY_ADMISSION_SCHEMA && record.commit === commit && record.platform === platform && record.snapshot ? record : null;
|
|
676
|
+
} catch { return null; }
|
|
677
|
+
}
|
|
678
|
+
|
|
626
679
|
// Read the config and run the admission rows (files, this host and, for a fresh build, the registries) with no side effect: no lock,
|
|
627
680
|
// state directory, cache directory, install or snapshot file. A finding is printed with its row and the process exits 1, no stack.
|
|
628
681
|
async function admit() {
|
|
@@ -648,12 +701,29 @@ async function admit() {
|
|
|
648
701
|
registry: async (ctx) => {
|
|
649
702
|
const inputs = ctx.buildInputs();
|
|
650
703
|
if (!inputs.ok) return undefined; // the build-inputs row reports it
|
|
651
|
-
|
|
704
|
+
const common = {
|
|
652
705
|
root: appRoot,
|
|
653
706
|
extraLocks: rightKitLockInventory({ requiredInputs: inputs.value.requiredInputs, cargoLockPaths: inputs.value.cargoLockPaths, nativeLayout: inputs.value.nativeLayout, config, root: appRoot }),
|
|
654
707
|
versions: JSON.parse(readFileSync(path.join(TOOL_ROOT, "rightkit-versions.json"), "utf8")),
|
|
655
708
|
ownership: JSON.parse(readFileSync(path.join(TOOL_ROOT, "rightkit-ownership.json"), "utf8")),
|
|
656
709
|
releaseVersion: RELEASE_TOOL_VERSION,
|
|
710
|
+
};
|
|
711
|
+
// The door run already took the registry verdict before its compile (--registry-admission-out). It is reused only when it covers
|
|
712
|
+
// this build's full lock inventory; otherwise it is dropped and the registries are asked now, as before. So the clock cannot turn
|
|
713
|
+
// a pin stale between an app's compile and its package (the 24-hour settle rule; Pulse 2026-11-26, admitted 15:31Z, refused 15:56Z).
|
|
714
|
+
const doorBound = doorRegistryAdmission(commit);
|
|
715
|
+
if (doorBound) {
|
|
716
|
+
try {
|
|
717
|
+
const bound = await prepareRightKitResolution({ ...common, boundSnapshot: doorBound.snapshot, reuse: true });
|
|
718
|
+
console.error(`right-release build: rightkit-registry: the verdict this door run took before its compile (${doorBound.observedAt}) covers this build; the registries are not asked again`);
|
|
719
|
+
return bound;
|
|
720
|
+
} catch (error) {
|
|
721
|
+
if (!(error instanceof RightKitRegistryError)) throw error;
|
|
722
|
+
console.error(`right-release build: rightkit-registry: the verdict taken before the compile does not cover this build's locks (${String(error.message).split("\n")[0]}); asking the registries now`);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
return prepareRightKitResolution({
|
|
726
|
+
...common,
|
|
657
727
|
// Build admission: refuse every pin behind the registry's latest. A dry run asks, but keeps no cache on disk.
|
|
658
728
|
admission: true,
|
|
659
729
|
...(dryRun ? { cacheDir: "" } : {}),
|
|
@@ -359,6 +359,19 @@ export function installAssembledWindows({ root, config, descriptor: rawDescripto
|
|
|
359
359
|
if (listFiles(fs, incoming).join("\n") !== before.join("\n")) abandon("the incoming payload changed its file list while signing");
|
|
360
360
|
for (const [file, want] of unsigned) if (digest(fs, platformPath(incoming, file)) !== want) abandon(`${file} changed while signing`);
|
|
361
361
|
try { verifyWindowsPayload({ spec, payload: incoming, profile: "dev", fs }); } catch (error) { removeOrAside(incoming); throw error; }
|
|
362
|
+
// The dev marker's `files` map is written at assembly, before signing, so for every signed executable it names bytes that are no longer on
|
|
363
|
+
// disk (Pulse 4e2f01b1, 2026-11-26: 8 of 14 hashes differed from the installed files). `files` keeps its meaning (the payload as
|
|
364
|
+
// assembled); `installed` is added here, after signing and verification, with the hash of each of those files as it will be installed.
|
|
365
|
+
// The marker is not part of a signature on Windows. A marker that cannot be rewritten is reported and the install goes on: it is no
|
|
366
|
+
// worse than before.
|
|
367
|
+
if (spec.devMarker) {
|
|
368
|
+
const markerFile = platformPath(incoming, spec.devMarker);
|
|
369
|
+
try {
|
|
370
|
+
const marker = JSON.parse(fs.readFileSync(markerFile, "utf8"));
|
|
371
|
+
marker.installed = Object.fromEntries(Object.keys(marker.files ?? {}).map((file) => [file, digest(fs, platformPath(incoming, file))]));
|
|
372
|
+
fs.writeFileSync(markerFile, `${JSON.stringify(marker, null, 2)}\n`);
|
|
373
|
+
} catch (error) { d.log(`right-release dev: ${spec.devMarker} could not record the installed hashes (${error.message}); its files map still lists the pre-signing hashes`); }
|
|
374
|
+
}
|
|
362
375
|
|
|
363
376
|
// 2. Stop: the background task and everything that runs from the install folder.
|
|
364
377
|
const exe = descriptor.stop.process ? path.join(dir, descriptor.stop.process) : null;
|
package/local-publish.mjs
CHANGED
|
@@ -777,7 +777,7 @@ export async function compileLocalUnit(kind, argv, { env = process.env, source =
|
|
|
777
777
|
if (step.done || step.value?.stage !== "compile") refuse("unit compile did not complete");
|
|
778
778
|
assertUnitDoor(parsed.workspaceRoot, "compile", env, identity, source);
|
|
779
779
|
const state = Object.freeze({});
|
|
780
|
-
unitStages.set(state, { runner, parsed, identity, source, stage: "compile", compileRequests: [...(step.value.brokerRequests ?? [])] });
|
|
780
|
+
unitStages.set(state, { runner, parsed, identity, source, stage: "compile", compileRequests: [...(step.value.brokerRequests ?? [])], tests: step.value.tests ?? null });
|
|
781
781
|
return state;
|
|
782
782
|
} catch (error) { await runner.return(); throw error; }
|
|
783
783
|
}
|
|
@@ -801,6 +801,8 @@ export const packageLocalUnit = (state, { env = process.env } = {}) => advanceLo
|
|
|
801
801
|
export const qualifyLocalUnit = (state, { env = process.env } = {}) => advanceLocalUnit(state, "package", "qualify", env);
|
|
802
802
|
/** The broker request ids of this process's completed compile stage (the package stage's ride on its result). */
|
|
803
803
|
export const localUnitCompileRequests = (state) => [...(unitStages.get(state)?.compileRequests ?? [])];
|
|
804
|
+
/** The compile stage's test counts ({ executed, skipped, ignored, assetGated }), or null when the unit ran no test step that reported any. */
|
|
805
|
+
export const localUnitCompileTests = (state) => unitStages.get(state)?.tests ?? null;
|
|
804
806
|
export async function closeLocalUnit(state) {
|
|
805
807
|
const entry = unitStages.get(state);
|
|
806
808
|
if (entry) { unitStages.delete(state); await entry.runner.return(); }
|
|
@@ -962,7 +964,9 @@ async function* publishUnitStages(parsed, deps, batch) {
|
|
|
962
964
|
const verdict = judgeUnit({ name: unit, steps: steps.map((s) => ({ ...s, unit: plan.id })), allowNoTests: true, allowIgnored: ignoredAllowed ? [unit] : [], allowMissingAssets: isAssetGated ? [unit] : [] });
|
|
963
965
|
if (verdict.status === "fail" || steps.some((s) => s.failed > 0)) refuse(`${plan.id} not qualified: ${verdict.problems.join("; ") || "failed tests reported"}`);
|
|
964
966
|
log(`[right-release] ${plan.id}: ${verdict.executed} passed, 0 failed, ${verdict.skipped} skipped, ${verdict.ignored} ignored${isAssetGated ? " (asset-gated: RIGHTKIT_REQUIRE_ASSETS=0, skips recorded)" : ""}`);
|
|
965
|
-
|
|
967
|
+
// The test counts travel with the compile result (rightkit#1754): `skipped` counts SKIP marker lines, so a unit whose asset-gated tests
|
|
968
|
+
// returned early is told from one whose tests ran.
|
|
969
|
+
const packageEnv = yield { stage: "compile", kind, name: unit, version, commit: head, brokerRequests: brokerRequests.splice(0), tests: { executed: verdict.executed, skipped: verdict.skipped, ignored: verdict.ignored, assetGated: Boolean(isAssetGated) } };
|
|
966
970
|
if (packageEnv) Object.assign(env, testEnv({ env: packageEnv }, isAssetGated));
|
|
967
971
|
|
|
968
972
|
// Availability is a publication/qualification precondition, not a compile precondition.
|
package/mac-signing-matrix.mjs
CHANGED
|
@@ -228,6 +228,19 @@ export function planMacSigning({ entries, nestedCode = [], nestedSigning, root,
|
|
|
228
228
|
const apps = entries.map((entry) => entry.file).filter((file) => /\.app\/?$/.test(file)).map((file) => file.replace(/\/+$/, ""));
|
|
229
229
|
for (const app of apps) {
|
|
230
230
|
const own = [...byPath.values()].filter((item) => item.file.startsWith(app + path.sep) || item.file.startsWith(`${app}/`));
|
|
231
|
+
// A per-path sign.entitlements entry reaches nested code only: the bundle and its main executable are signed by the bundle's own
|
|
232
|
+
// sign.prePackageFiles entry. A key naming either, or an exact key naming no nested code at all, used to be dropped in silence and the
|
|
233
|
+
// binary shipped hardened with no entitlements (HeardRight's macOS config, found by reading 2026-11-26). It is refused here, where the
|
|
234
|
+
// main executable's name is known, with the message sign.nestedCode already gives for the same mistake.
|
|
235
|
+
if (nestedSigning.entitlements && typeof nestedSigning.entitlements === "object" && !Array.isArray(nestedSigning.entitlements)) {
|
|
236
|
+
const mainRelative = `Contents/MacOS/${mainName(app)}`;
|
|
237
|
+
const nestedRelative = new Set(own.map((item) => path.relative(app, item.file).split(path.sep).join("/")));
|
|
238
|
+
for (const key of Object.keys(nestedSigning.entitlements)) {
|
|
239
|
+
const normalized = key.replace(/^\.\/+/, "").replace(/\/+$/, "");
|
|
240
|
+
if (normalized === "." || normalized === "" || normalized === mainRelative) throw invalid(`sign.entitlements[${JSON.stringify(key)}]: the bundle and its main executable are signed with the bundle; set entitlements on its sign.prePackageFiles entry ({ file, entitlements }). A per-path entry applies to nested code only`);
|
|
241
|
+
if (!/[*?]/.test(normalized) && !nestedRelative.has(normalized)) throw invalid(`sign.entitlements[${JSON.stringify(key)}]: names no nested code inside ${path.basename(app)}; the entry would be ignored and the file signed without entitlements`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
231
244
|
let settings;
|
|
232
245
|
try { settings = resolveSettings(own.map((item) => item.file), { app, sign: nestedSigning, root: root ?? process.cwd() }); }
|
|
233
246
|
catch (error) { throw invalid(error.message); }
|
package/package.json
CHANGED
package/publish-local-cargo.mjs
CHANGED
|
@@ -178,6 +178,9 @@ export async function publishLocalCargo(argv, { run = spawnSync, log = console.l
|
|
|
178
178
|
const problems = compileReportProblems(report, { name, version, commit, tree });
|
|
179
179
|
if (problems.length) fail(`the compile report does not prove cargo:${name} ${version} at ${commit}: ${problems.join("; ")}`);
|
|
180
180
|
log(`publish-local: compile report ok for cargo:${name} ${version} at ${commit.slice(0, 12)} (executor ${report.executor ?? (report.schema === UNIT_LIST_COMPILE_SCHEMA ? `broker seam, unit-list run ${report.runId}` : report.schema === UNIT_RESULT_SCHEMA ? "broker seam, together compile" : "unknown")})`);
|
|
181
|
+
// What the unit's tests did, when the report carries it: a skipped asset-gated test (a SKIP marker line) is said, never counted as run.
|
|
182
|
+
const unitTests = report?.stages?.compile?.tests;
|
|
183
|
+
if (unitTests && Number.isInteger(unitTests.executed)) log(`publish-local: tests of cargo:${name}: ${unitTests.executed} passed, ${unitTests.skipped ?? 0} skipped${(unitTests.skipped ?? 0) > 0 ? " (a skipped test returned early and did not exercise what it needs)" : ""}, ${unitTests.ignored ?? 0} ignored`);
|
|
181
184
|
// The broker's cargo, run directly: package and publish --no-verify compile nothing (GC-A11).
|
|
182
185
|
const pathKey = platform === "win32" ? (Object.keys(env).find((k) => k.toUpperCase() === "PATH") ?? "Path") : "PATH";
|
|
183
186
|
const direct = directCargoPath({ env: { ...env, PATH: env[pathKey] }, platform, gateWrappers: true });
|
package/release-pin-floor.mjs
CHANGED
|
@@ -42,3 +42,18 @@ export function releasePinFloorProblem({ packageJsonText, installedVersion = nul
|
|
|
42
42
|
if (installedVersion !== null && compareVersions(installedVersion, floor) === -1) return { code: RELEASE_PIN_BELOW_FLOOR, message: `${RELEASE_PIN_BELOW_FLOOR}: the installed ${PACKAGE} is ${installedVersion} (${where} asks ${specs.join(", ")}), below the host gate's floor ${floor} for compile stages: its own right-release child would carry non-compiling cargo calls to the broker, which refuses them (GC-A11); ${fix}` };
|
|
43
43
|
return null;
|
|
44
44
|
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* One informational line, or null: the app pins an exact @rightkit/release older than the host gate that is running. Inside a gate stage
|
|
48
|
+
* the host gate's own copy runs whatever the app pins (build-launch.mjs runs this package's own right-release for `pnpm exec right-release`),
|
|
49
|
+
* so this is never a refusal. A command typed by hand in the app runs the pinned copy, which can judge a config by older rules
|
|
50
|
+
* (Pulse, 2026-11-26: its 0.6.82 copy refused a switch class the host gate 0.6.88 accepts). A range pin or no pin says nothing.
|
|
51
|
+
*/
|
|
52
|
+
export function releasePinBehindHostNote({ packageJsonText, hostVersion, where = "package.json" }) {
|
|
53
|
+
let manifest;
|
|
54
|
+
try { manifest = JSON.parse(packageJsonText); } catch { return null; }
|
|
55
|
+
const pins = DEPENDENCY_TABLES.map((t) => manifest?.[t]?.[PACKAGE]).filter((v) => typeof v === "string").map(exactPinOf).filter((pin) => pin !== null);
|
|
56
|
+
const older = pins.filter((pin) => compareVersions(pin, hostVersion) === -1).sort((a, b) => compareVersions(a, b));
|
|
57
|
+
if (!older.length) return null;
|
|
58
|
+
return `${where} pins ${PACKAGE}@${older[0]}; the host gate is ${hostVersion}. The gate's stages run the host gate's copy; a command typed by hand in the app runs the pinned ${older[0]}, whose rules can differ`;
|
|
59
|
+
}
|
package/release-qa-hardening.mjs
CHANGED
|
@@ -46,6 +46,31 @@ export function criticalJourneyIds(manifestText, platform) {
|
|
|
46
46
|
.map((journey) => String(journey.id)).sort();
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Why the release-critical journeys of `platform` cannot pass one installed-QA run, from the manifest alone; empty when they can.
|
|
51
|
+
* The runner builds once per run (rightkit-qa journeys/run.rs plan_build): the selection is scenario journeys only, or adapter journeys
|
|
52
|
+
* that all name one adapter; and the installed stage needs every release-critical journey of the platform in the one receipt and
|
|
53
|
+
* refuses zero. Asked at the check stage so a manifest that cannot pass is refused before anything compiles.
|
|
54
|
+
*/
|
|
55
|
+
export function criticalJourneySelectionProblems(manifestText, platform) {
|
|
56
|
+
const os = PLATFORM_OS[platform];
|
|
57
|
+
if (!os) throw new Error(`unknown platform ${platform}`);
|
|
58
|
+
const journeys = parseToml(manifestText).journey;
|
|
59
|
+
const critical = (Array.isArray(journeys) ? journeys : []).filter((journey) => journey?.release_critical === true && Array.isArray(journey.platforms) && journey.platforms.includes(os));
|
|
60
|
+
if (!critical.length) return [`the journeys manifest declares no release-critical journey for ${os}; zero is never a pass`];
|
|
61
|
+
const problems = [];
|
|
62
|
+
const adapterJourneys = critical.filter((journey) => journey.runner === "adapter");
|
|
63
|
+
const scenarioJourneys = critical.filter((journey) => journey.runner !== "adapter");
|
|
64
|
+
if (adapterJourneys.length && scenarioJourneys.length) {
|
|
65
|
+
problems.push(`the release-critical journeys for ${os} mix adapter journeys (${adapterJourneys.map((j) => j.id).join(", ")}) and scenario journeys (${scenarioJourneys.map((j) => j.id).join(", ")}); one run builds once, so they cannot share the installed-QA run`);
|
|
66
|
+
}
|
|
67
|
+
const adapters = [...new Set(adapterJourneys.map((journey) => String(journey.adapter ?? "")))].sort();
|
|
68
|
+
if (adapters.length > 1) {
|
|
69
|
+
problems.push(`the release-critical journeys for ${os} name ${adapters.length} adapters (${adapters.join(", ")}); one run builds for exactly one adapter, and every release-critical journey must be in the one receipt: put them behind one adapter, or leave one journey release-critical`);
|
|
70
|
+
}
|
|
71
|
+
return problems;
|
|
72
|
+
}
|
|
73
|
+
|
|
49
74
|
/**
|
|
50
75
|
* Validate a journeys receipt through the runner and against the manifest. Never throws for a refusal.
|
|
51
76
|
* Returns { ok, problems, block }; `block` is the `journeys` section for the QA receipt (null when nothing readable).
|
package/release-switch-scan.mjs
CHANGED
|
@@ -439,7 +439,32 @@ const DYNAMIC_READS = [
|
|
|
439
439
|
// Builtins every JS runtime sets; they select nothing and are not part of the inventory.
|
|
440
440
|
const JS_BUILTINS = new Set(["MODE", "DEV", "PROD", "BASE_URL", "SSR", "NODE_ENV"]);
|
|
441
441
|
|
|
442
|
+
// In a git checkout the walk reads what git knows: tracked files, and untracked files the checkout's ignore rules do not ignore (a new source
|
|
443
|
+
// file not yet committed is still judged). It does not descend into nested repositories, so the agent worktrees under `.claude/worktrees`
|
|
444
|
+
// (each a whole copy of the repository) and ignored backup folders are not read. A gate stage's snapshot has no git directory and is walked
|
|
445
|
+
// on disk as before; it holds only the commit's files. Before this, a doctor run in a primary checkout reported 228 findings where the
|
|
446
|
+
// snapshot had 2 (Pulse 0d781b61, 2026-11-26). Returns paths relative to `root` with `/`, or null when `root` is not in a git work tree.
|
|
447
|
+
function gitListedFiles(root) {
|
|
448
|
+
let r;
|
|
449
|
+
try { r = spawnSync("git", ["-C", root, "ls-files", "-z", "--cached", "--others", "--exclude-standard"], { encoding: "utf8", maxBuffer: 1 << 28, windowsHide: true }); } catch { return null; }
|
|
450
|
+
if (!r || r.error || r.status !== 0) return null;
|
|
451
|
+
return String(r.stdout ?? "").split("\0").filter(Boolean);
|
|
452
|
+
}
|
|
453
|
+
function* listedSource(root, skipAbs, listed, wanted) {
|
|
454
|
+
const skipped = [...skipAbs];
|
|
455
|
+
for (const rel of listed) {
|
|
456
|
+
const parts = rel.split("/");
|
|
457
|
+
const name = parts.pop();
|
|
458
|
+
if (parts.some(skipDir)) continue;
|
|
459
|
+
const full = path.join(root, ...parts, name);
|
|
460
|
+
if (skipped.some((dir) => full === dir || full.startsWith(dir + path.sep))) continue;
|
|
461
|
+
if (!wanted(name)) continue;
|
|
462
|
+
try { if (lstatSync(full).isFile()) yield full; } catch { /* listed by git and gone from disk: nothing to read */ }
|
|
463
|
+
}
|
|
464
|
+
}
|
|
442
465
|
function* walkSource(root, skipAbs = new Set()) {
|
|
466
|
+
const listed = gitListedFiles(root);
|
|
467
|
+
if (listed) { yield* listedSource(root, skipAbs, listed, (name) => SOURCE_EXT.has(path.extname(name)) && !TEST_FILE.test(name)); return; }
|
|
443
468
|
const stack = [root];
|
|
444
469
|
while (stack.length) {
|
|
445
470
|
const dir = stack.pop();
|
|
@@ -471,6 +496,8 @@ export function envHelperPatterns(envHelpers, problems = []) {
|
|
|
471
496
|
|
|
472
497
|
// Xcode and SwiftPM project files, for the Swift Release-configuration check.
|
|
473
498
|
function* walkProjectFiles(root, skipAbs = new Set()) {
|
|
499
|
+
const listed = gitListedFiles(root);
|
|
500
|
+
if (listed) { yield* listedSource(root, skipAbs, listed, (name) => name === "project.pbxproj" || name === "Package.swift" || /\.xcconfig$/.test(name)); return; }
|
|
474
501
|
const stack = [root];
|
|
475
502
|
while (stack.length) {
|
|
476
503
|
const dir = stack.pop();
|
package/release.mjs
CHANGED
|
@@ -454,6 +454,13 @@ if (!rejectBlocked("target-checks", ["target"], "the target checks (signed, medi
|
|
|
454
454
|
if (opts.platform === "mac") {
|
|
455
455
|
if (target.signingContract !== MACOS_PORTABLE_SIGNING_CONTRACT) reject("mac-signing-contract", `${app} mac must declare signingContract: ${MACOS_PORTABLE_SIGNING_CONTRACT}`);
|
|
456
456
|
if (!target.prePackage?.cmd) reject("mac-prepackage", `${app} mac must declare prePackage to materialize Developer ID signing files`);
|
|
457
|
+
// A string sign.entitlements is the development-signing form (development-signing.mjs reads it for the dev install). Release signing never
|
|
458
|
+
// reads it. With no sign.prePackageFiles entry carrying entitlements the app would be signed hardened with none and nothing would say so
|
|
459
|
+
// (CodeRight until 5603d8560). That combination is refused here, before anything builds; the string beside an entry that does carry
|
|
460
|
+
// entitlements is the dev route's setting and stays allowed.
|
|
461
|
+
if (typeof target.sign?.entitlements === "string" && !(target.sign.prePackageFiles ?? []).some((entry) => entry && typeof entry === "object" && typeof entry.entitlements === "string" && entry.entitlements.trim())) {
|
|
462
|
+
reject("mac-sign-entitlements-string", `${app} mac sign.entitlements is a string, which only development signing reads: release signing would sign the app with no entitlements. Set them on the bundle's sign.prePackageFiles entry ({ file, entitlements })`);
|
|
463
|
+
}
|
|
457
464
|
if (!target.sign?.prePackageFiles?.length) reject("mac-sign-prepackage-files", `${app} mac must declare at least one sign.prePackageFiles`);
|
|
458
465
|
else if (!rejectBlocked("mac-signing", ["media-sidecar", "external-bin"], `${app} mac signing config validation (it reads the sidecar and externalBin configs)`)) {
|
|
459
466
|
await check("mac-signing", [], () => {
|
package/rightkit-versions.json
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@rightkit/app-update": "0.4.7",
|
|
24
24
|
"@rightkit/ax": "0.3.2",
|
|
25
25
|
"@rightkit/blender-worker": "0.1.1",
|
|
26
|
-
"@rightkit/ci": "0.3.
|
|
26
|
+
"@rightkit/ci": "0.3.3",
|
|
27
27
|
"@rightkit/config": "0.1.1",
|
|
28
28
|
"@rightkit/doc-render": "0.2.2",
|
|
29
29
|
"@rightkit/document-core": "0.2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@rightkit/qa": "0.7.0",
|
|
50
50
|
"@rightkit/qa-chrome": "0.1.12",
|
|
51
51
|
"@rightkit/react-shell": "0.7.9",
|
|
52
|
-
"@rightkit/release": "0.6.
|
|
52
|
+
"@rightkit/release": "0.6.89",
|
|
53
53
|
"@rightkit/send-ui": "0.1.0",
|
|
54
54
|
"@rightkit/settings-ui": "0.7.7",
|
|
55
55
|
"@rightkit/social-ui": "0.2.1",
|
|
@@ -97,7 +97,8 @@
|
|
|
97
97
|
"0.2.45",
|
|
98
98
|
"0.2.49",
|
|
99
99
|
"0.3.0",
|
|
100
|
-
"0.3.1"
|
|
100
|
+
"0.3.1",
|
|
101
|
+
"0.3.2"
|
|
101
102
|
],
|
|
102
103
|
"@rightkit/doc-render": [
|
|
103
104
|
"0.1.0",
|
|
@@ -453,7 +454,8 @@
|
|
|
453
454
|
"0.6.84",
|
|
454
455
|
"0.6.85",
|
|
455
456
|
"0.6.86",
|
|
456
|
-
"0.6.87"
|
|
457
|
+
"0.6.87",
|
|
458
|
+
"0.6.88"
|
|
457
459
|
],
|
|
458
460
|
"@rightkit/settings-ui": [
|
|
459
461
|
"0.1.0",
|
|
@@ -600,7 +602,7 @@
|
|
|
600
602
|
"rightkit-autostart": "0.1.1",
|
|
601
603
|
"rightkit-bench": "0.2.1",
|
|
602
604
|
"rightkit-bot-messaging": "0.3.2",
|
|
603
|
-
"rightkit-browser": "0.3.
|
|
605
|
+
"rightkit-browser": "0.3.14",
|
|
604
606
|
"rightkit-cache": "0.2.5",
|
|
605
607
|
"rightkit-captions": "0.1.1",
|
|
606
608
|
"rightkit-catalog": "0.1.0",
|
|
@@ -730,7 +732,7 @@
|
|
|
730
732
|
"rightkit-profile": "0.1.0",
|
|
731
733
|
"rightkit-prompt-recipes": "0.2.1",
|
|
732
734
|
"rightkit-pty": "0.1.3",
|
|
733
|
-
"rightkit-qa": "0.10.
|
|
735
|
+
"rightkit-qa": "0.10.15",
|
|
734
736
|
"rightkit-record": "0.4.1",
|
|
735
737
|
"rightkit-reframe": "0.2.1",
|
|
736
738
|
"rightkit-remote-compute": "0.2.2",
|
|
@@ -902,7 +904,7 @@
|
|
|
902
904
|
"@rightkit/app-shell": "0.6.2",
|
|
903
905
|
"@rightkit/app-update": "0.4.4",
|
|
904
906
|
"@rightkit/ax": "0.3.2",
|
|
905
|
-
"@rightkit/ci": "0.3.
|
|
907
|
+
"@rightkit/ci": "0.3.2",
|
|
906
908
|
"@rightkit/doc-render": "0.2.1",
|
|
907
909
|
"@rightkit/git": "0.2.42",
|
|
908
910
|
"@rightkit/hooks": "0.1.2",
|
|
@@ -921,7 +923,7 @@
|
|
|
921
923
|
"@rightkit/qa": "0.7.0",
|
|
922
924
|
"@rightkit/qa-chrome": "0.1.12",
|
|
923
925
|
"@rightkit/react-shell": "0.7.7",
|
|
924
|
-
"@rightkit/release": "0.6.
|
|
926
|
+
"@rightkit/release": "0.6.88",
|
|
925
927
|
"@rightkit/settings-ui": "0.7.4",
|
|
926
928
|
"@rightkit/shell": "0.1.1",
|
|
927
929
|
"@rightkit/tauri": "0.4.3",
|
|
@@ -1053,7 +1055,8 @@
|
|
|
1053
1055
|
"0.3.5",
|
|
1054
1056
|
"0.3.6",
|
|
1055
1057
|
"0.3.11",
|
|
1056
|
-
"0.3.12"
|
|
1058
|
+
"0.3.12",
|
|
1059
|
+
"0.3.13"
|
|
1057
1060
|
],
|
|
1058
1061
|
"rightkit-cache": [
|
|
1059
1062
|
"0.2.0",
|
|
@@ -1535,7 +1538,8 @@
|
|
|
1535
1538
|
"0.10.10",
|
|
1536
1539
|
"0.10.11",
|
|
1537
1540
|
"0.10.12",
|
|
1538
|
-
"0.10.13"
|
|
1541
|
+
"0.10.13",
|
|
1542
|
+
"0.10.14"
|
|
1539
1543
|
],
|
|
1540
1544
|
"rightkit-qa-driver": [
|
|
1541
1545
|
"0.3.0",
|
package/snapshot-check.mjs
CHANGED
|
@@ -452,7 +452,14 @@ export function verifySnapshotStore({ checkout, snapshot, commit, tree, ledger,
|
|
|
452
452
|
const message = miss && missingName
|
|
453
453
|
? `root ${root}: ${missingName} is missing from the store ${storeDir} (offline, no network fallback); install the checkout's dependencies so the store holds it, then run the check again`
|
|
454
454
|
: `root ${root}: the offline store check failed (store ${storeDir}): ${diagnostic.codes.join(", ") || `exit ${Number.isInteger(r?.status) ? r.status : "unknown"}`}`;
|
|
455
|
-
|
|
455
|
+
// pnpm's own text is never printed (it can carry registry addresses; rightkit#1505 keeps codes and a hash only). The two metadata codes
|
|
456
|
+
// say little on their own, so their meaning on an OFFLINE check is spelled out (Pulse, 2026-11-26: the cause behind them was pnpm's
|
|
457
|
+
// minimum-release-age rule holding back a package published an hour earlier, which this command's output never named).
|
|
458
|
+
const metadataMiss = !(miss && missingName) && diagnostic.codes.some((code) => code === "ERR_PNPM_NO_OFFLINE_META" || code === "ERR_PNPM_META_FETCH_FAIL");
|
|
459
|
+
const meaning = metadataMiss
|
|
460
|
+
? "; on this offline check those codes mean the store has no metadata for a version the lockfile names: either the checkout's dependencies were not installed after the lockfile changed (install them, then run the check again), or pnpm's minimum-release-age rule is holding back a version published within its window (see minimumReleaseAge and minimumReleaseAgeExclude in the root's pnpm settings)"
|
|
461
|
+
: "";
|
|
462
|
+
throw new CheckError(`${message}${meaning}; ${diagnostic.detail}`);
|
|
456
463
|
}
|
|
457
464
|
records.push({ root, storeDir, storeSource: source, pnpm: version, pinned: pin, lockfileSha256: crypto.createHash("sha256").update(fs.readFileSync(path.join(dir, "pnpm-lock.yaml"))).digest("hex"), ms });
|
|
458
465
|
}
|
package/unit-gate.mjs
CHANGED
|
@@ -394,7 +394,7 @@ export async function runUnitGate({ selector, to, root, commonDir, commit, tree,
|
|
|
394
394
|
const runtime = hash(runtimeFiles.map((file) => `${path.relative(runtimeDir, file)}\0${hash(fs.readFileSync(file))}`).join("\n"));
|
|
395
395
|
const report = { schema: "rightkit.unit-gate-report/1", unit, commit, tree, runtime, executor: executor.kind, stages: {} };
|
|
396
396
|
const save = () => { if (writeReport) writeReport(report); };
|
|
397
|
-
let state, owner, artifact, currentStage, checkTier = null;
|
|
397
|
+
let state, owner, artifact, currentStage, checkTier = null, compileTests = null;
|
|
398
398
|
// A broker-host run that reaches the qualify stage (--to qualify, or --to release) has its compile and package jobs attested: a pnpm job
|
|
399
399
|
// is sent the stage nonce, a carried Cargo call a nonce derived from it, both bound to this commit, tree, unit and stage, so each job's
|
|
400
400
|
// signed receipt can be verified hosted for exactly that and nothing else. `--to qualify` is the sanctioned no-upload route to that
|
|
@@ -466,6 +466,7 @@ export async function runUnitGate({ selector, to, root, commonDir, commit, tree,
|
|
|
466
466
|
const before = ledgerIds();
|
|
467
467
|
state = await stageEnv(stage, (runEnv) => owner.compileLocalUnit(unit.kind, argv, { env: runEnv, ...(source ? { source } : {}) }));
|
|
468
468
|
collectReceipts(stage, owner.localUnitCompileRequests?.(state), before);
|
|
469
|
+
compileTests = owner.localUnitCompileTests?.(state) ?? null;
|
|
469
470
|
} else if (stage === "package") {
|
|
470
471
|
const before = ledgerIds();
|
|
471
472
|
artifact = await stageEnv(stage, (runEnv) => owner.packageLocalUnit(state, { env: runEnv }));
|
|
@@ -503,7 +504,7 @@ export async function runUnitGate({ selector, to, root, commonDir, commit, tree,
|
|
|
503
504
|
try { command = (stageCommands({ unit, root, platform })[stage] ?? []).map(describeCommand).join("; ") || command; } catch { /* the stage name alone identifies the command */ }
|
|
504
505
|
directStages[stage] = directStageEvidence({ stage, commit, tree, command, ...(stage === "package" ? { outputSha256: artifact.artifactSha256 } : {}) });
|
|
505
506
|
}
|
|
506
|
-
report.stages[stage] = { ok: true, ...(stage === "package" || stage === "qualify" ? { artifactFile: artifact.artifactFile, artifactSha256: artifact.artifactSha256, ...(artifact.contentSha256 ? { contentSha256: artifact.contentSha256 } : {}) } : {}), ...(receipts[stage] ? { receipts: receipts[stage] } : {}), ...(released ?? {}) };
|
|
507
|
+
report.stages[stage] = { ok: true, ...(stage === "compile" && compileTests ? { tests: compileTests } : {}), ...(stage === "package" || stage === "qualify" ? { artifactFile: artifact.artifactFile, artifactSha256: artifact.artifactSha256, ...(artifact.contentSha256 ? { contentSha256: artifact.contentSha256 } : {}) } : {}), ...(receipts[stage] ? { receipts: receipts[stage] } : {}), ...(released ?? {}) };
|
|
507
508
|
save();
|
|
508
509
|
out(`rightkit-gate: [${stage}] ${unit.kind}:${unit.name} passed`);
|
|
509
510
|
}
|