@rightkit/release 0.6.55 → 0.6.56
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/bin/darwin/rightkit-swap +0 -0
- package/local-publish.mjs +7 -3
- package/package.json +1 -1
- package/publish-cargo.mjs +5 -5
- package/rightkit-versions.json +1 -1
- package/stage-commands.mjs +1 -1
package/bin/darwin/rightkit-swap
CHANGED
|
Binary file
|
package/local-publish.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import { recordPublished, stageSourceVersions, workspaceFeedOptions } from "./ri
|
|
|
33
33
|
import { prepareSwapHelper, SWAP_HELPER_CARGO_ARGS, SWAP_HELPER_PACKAGE } from "./swap-helper-bundle.mjs";
|
|
34
34
|
import { exclusionsFor, npmContentDigest } from "./pack-digest.mjs";
|
|
35
35
|
import { requireDoorRun, gateStateDir } from "./gate-stages.mjs";
|
|
36
|
-
import { crossCompileEnv, crossTargetsFor, oneOutput, scopedCrossTargets } from "./cross-targets.mjs";
|
|
36
|
+
import { crateRunsOn, crossCompileEnv, crossTargetsFor, oneOutput, scopedCrossTargets } from "./cross-targets.mjs";
|
|
37
37
|
import { crossFeatureSets, defaultCheckFeatureSets, hostFeatureSets } from "./feature-sets.mjs";
|
|
38
38
|
|
|
39
39
|
export const LOCAL_OPERATOR = "agent (local-build grant)";
|
|
@@ -137,7 +137,11 @@ const JOBS_SUBCOMMANDS = new Set(["test", "clippy", "check", "package"]);
|
|
|
137
137
|
// stage-commands.mjs, which derives what a qualification's signed receipts must show (the hosted admission and the gate share it).
|
|
138
138
|
export const qualifyFmtArgs = (unit) => ["fmt", "-p", unit, "--check"];
|
|
139
139
|
export const npmPackArgs = (packDir, scratch) => ["--dir", packDir, "pack", "--pack-destination", scratch];
|
|
140
|
-
|
|
140
|
+
// A qualify-only pack verifies (compiles) the archive on the packing host, except for a crate whose ci/gate.config.json `platforms` leave that host
|
|
141
|
+
// out (crateRunsOn): it cannot build there (rightkit-tts-qwen-sys has no bindings for linux), so the archive is packed --no-verify and its
|
|
142
|
+
// compile is proven by the hosts it is scoped to (publish.yml's native verify jobs build and run the sealed archive). `entry` is the crate's
|
|
143
|
+
// gate config entry and `platform` the packing host's process.platform; with no platform the pack verifies, as before.
|
|
144
|
+
export const cargoPackageArgs = (unit, qualifyOnly, entry, platform) => ["package", "--locked", ...(qualifyOnly && (platform === undefined || crateRunsOn(entry, platform)) ? [] : ["--no-verify"]), "-p", unit];
|
|
141
145
|
export const CARGO_METADATA_ARGS = Object.freeze(["metadata", "--offline", "--format-version", "1", "--no-deps"]);
|
|
142
146
|
export function withCargoJobs(args, jobs) {
|
|
143
147
|
return jobs !== undefined && JOBS_SUBCOMMANDS.has(args[0])
|
|
@@ -998,7 +1002,7 @@ async function* publishUnitStages(parsed, deps, batch) {
|
|
|
998
1002
|
} else {
|
|
999
1003
|
// A combined publish verifies once in `cargo publish`; detached qualification verifies here before
|
|
1000
1004
|
// its evidence leaves this host, so the publishing host can reuse that exact archive's proof.
|
|
1001
|
-
const packageArgs = cargoPackageArgs(unit, parsed.qualifyOnly);
|
|
1005
|
+
const packageArgs = cargoPackageArgs(unit, parsed.qualifyOnly, gateConfig?.rust?.[unit], platform);
|
|
1002
1006
|
packCommands.push(`cargo ${packageArgs.join(" ")}`);
|
|
1003
1007
|
const packed = await run("cargo", withCargoJobs(packageArgs, parsed.jobs), { cwd: unitPath, env });
|
|
1004
1008
|
if (packed.error || packed.status !== 0) refuse(`cargo package failed for ${unit}\n${tail(`${packed.stdout ?? ""}\n${packed.stderr ?? ""}`)}`);
|
package/package.json
CHANGED
package/publish-cargo.mjs
CHANGED
|
@@ -415,16 +415,16 @@ export async function runCargoPublish(options, execute = (_command, args, settin
|
|
|
415
415
|
if (status.error || status.status !== 0 || String(status.stdout ?? "").trim()) throw new Error("--from-evidence requires clean crate Cargo.toml, Cargo.lock and ci gate config (ci/gate.config.json, ci/asset-gated.json)");
|
|
416
416
|
const proofHost = singleHostOfPolicy(gate.evidence) ?? "darwin";
|
|
417
417
|
const runs = gate.evidence.runs.filter((run) => run?.host?.os === proofHost);
|
|
418
|
-
const command = `cargo package --locked -p ${options.crate}`;
|
|
419
|
-
if (!runs.length || !runs.every((run) => run.steps?.some((step) => step.ok === true && step.command === command))) {
|
|
420
|
-
throw new Error("--from-evidence requires a verified cargo package --locked receipt for this artifact");
|
|
421
|
-
}
|
|
422
418
|
// Load the shared planner after module initialization: local-publish itself imports this publisher.
|
|
423
419
|
// Validate the complete current qualification matrix, not merely one passing test and lint command.
|
|
424
|
-
const { localTestPlan } = await import("./local-publish.mjs");
|
|
420
|
+
const { cargoPackageArgs, localTestPlan } = await import("./local-publish.mjs");
|
|
425
421
|
let config;
|
|
426
422
|
try { config = JSON.parse(fs.readFileSync(path.join(options.workspaceRoot, "ci", "gate.config.json"), "utf8")); }
|
|
427
423
|
catch { throw new Error("--from-evidence cannot read current ci/gate.config.json"); }
|
|
424
|
+
const command = `cargo ${cargoPackageArgs(options.crate, true, config?.rust?.[options.crate], proofHost).join(" ")}`;
|
|
425
|
+
if (!runs.length || !runs.every((run) => run.steps?.some((step) => step.ok === true && step.command === command))) {
|
|
426
|
+
throw new Error("--from-evidence requires a verified cargo package --locked receipt for this artifact");
|
|
427
|
+
}
|
|
428
428
|
for (const run of runs) {
|
|
429
429
|
if (!Array.isArray(run.steps) || run.steps.some((step) => step?.ok !== true || (step.failed ?? 0) !== 0)) {
|
|
430
430
|
throw new Error("--from-evidence refuses an unsuccessful qualification step");
|
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.4",
|
|
53
|
-
"@rightkit/release": "0.6.
|
|
53
|
+
"@rightkit/release": "0.6.56",
|
|
54
54
|
"@rightkit/send-ui": "0.1.0",
|
|
55
55
|
"@rightkit/settings-ui": "0.7.2",
|
|
56
56
|
"@rightkit/social-ui": "0.1.0",
|
package/stage-commands.mjs
CHANGED
|
@@ -104,7 +104,7 @@ export function expectedStageCommands({ kind, unit, config, manifest, platform }
|
|
|
104
104
|
pack.push(PNPM(npmPackArgs(dir, ANY_ABSOLUTE_PATH)));
|
|
105
105
|
} else {
|
|
106
106
|
compile.unshift(CARGO(crateDir, qualifyFmtArgs(unit)));
|
|
107
|
-
pack.push(CARGO(crateDir, cargoPackageArgs(unit, true)), CARGO(crateDir, [...CARGO_METADATA_ARGS], CARGO_METADATA_ARGS.filter((arg) => arg !== "--offline")));
|
|
107
|
+
pack.push(CARGO(crateDir, cargoPackageArgs(unit, true, config?.rust?.[unit], platform)), CARGO(crateDir, [...CARGO_METADATA_ARGS], CARGO_METADATA_ARGS.filter((arg) => arg !== "--offline")));
|
|
108
108
|
}
|
|
109
109
|
return { compile, package: pack };
|
|
110
110
|
}
|