@rightkit/release 0.6.16 → 0.6.20

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.
Files changed (64) hide show
  1. package/README.md +7 -3
  2. package/admission-host.mjs +9 -5
  3. package/app-closure.mjs +9 -3
  4. package/bin/darwin/rightkit-swap +0 -0
  5. package/bin/rightkit-gate.mjs +469 -102
  6. package/bin/rightkit-linux-setup.mjs +15 -0
  7. package/broker-admission.mjs +184 -0
  8. package/broker-wire.mjs +15 -3
  9. package/build-launch.mjs +4 -1
  10. package/build-ownership.mjs +125 -36
  11. package/build-release.mjs +39 -7
  12. package/cargo-contract.mjs +4 -1
  13. package/cargo-guard.mjs +25 -5
  14. package/cargo-target-shim.mjs +56 -7
  15. package/clippy-route.mjs +8 -7
  16. package/crate-graph.mjs +5 -1
  17. package/credential-provider.mjs +174 -0
  18. package/deterministic-scans.mjs +247 -40
  19. package/development.mjs +8 -0
  20. package/disk-policy.mjs +2 -2
  21. package/gate-executor.mjs +5 -3
  22. package/gate-stages.mjs +34 -3
  23. package/gradle-lock.mjs +206 -0
  24. package/heavy-command.mjs +33 -2
  25. package/linux-artifacts.mjs +2 -1
  26. package/linux-setup.mjs +106 -0
  27. package/local-publish.mjs +21 -10
  28. package/local-qualify.mjs +9 -3
  29. package/managed-cargo.mjs +54 -18
  30. package/ownership-lockfiles.mjs +14 -3
  31. package/ownership.mjs +5 -1
  32. package/package.json +17 -11
  33. package/protected-credentials.mjs +13 -5
  34. package/publication-gate.mjs +9 -4
  35. package/python-lock.mjs +209 -0
  36. package/qa-admission-policy.json +32 -0
  37. package/qa-layout.mjs +229 -0
  38. package/qa-runner.mjs +156 -0
  39. package/release-artifact-path.mjs +29 -3
  40. package/release-config.mjs +1 -1
  41. package/release-qa-command.mjs +58 -8
  42. package/release-qa-policy.mjs +5 -3
  43. package/release-source-identity.mjs +1 -0
  44. package/release.mjs +10 -2
  45. package/rightkit-ownership.json +1465 -79
  46. package/rightkit-registry-resolver.mjs +7 -3
  47. package/rightkit-versions.json +173 -36
  48. package/runtime-budget-classes.json +4 -0
  49. package/runtime-budgets.mjs +5 -1
  50. package/shell-contract.mjs +1 -1
  51. package/snapshot-broker.mjs +107 -9
  52. package/snapshot-check.mjs +2 -0
  53. package/snapshot-request.mjs +20 -3
  54. package/snapshot.mjs +11 -4
  55. package/stage-commands.mjs +2 -1
  56. package/stage-ledger.mjs +15 -0
  57. package/stage-sidecar.mjs +17 -3
  58. package/suite-signing.mjs +40 -4
  59. package/swift-lock.mjs +334 -0
  60. package/test-command.mjs +13 -3
  61. package/tool-build.mjs +156 -0
  62. package/unit-gate.mjs +9 -2
  63. package/windows-identity-plan.mjs +119 -0
  64. package/windows-identity.mjs +136 -0
@@ -278,10 +278,12 @@ export function approveRunner({
278
278
  if (!runner || !String(runner).trim()) throw new QaPolicyError("runner is required");
279
279
  if (!nonEmpty(version)) throw new QaPolicyError("version is required");
280
280
  if (note !== undefined && typeof note !== "string") throw new QaPolicyError("note must be a string");
281
- let published;
282
- try { published = JSON.parse(readFileSync(versionsFile, "utf8")).registry?.cargo?.["rightkit-qa"]; }
281
+ // A runner is the published version or the one RightKit has staged for its next publication (`stagedCargo`): an app's `qa.version` may name the staged one
282
+ // while the gate-built binary is what runs (qa-runner.mjs); admission is still by this sha256, never by the version string.
283
+ let published; let staged;
284
+ try { const feed = JSON.parse(readFileSync(versionsFile, "utf8")); published = feed.registry?.cargo?.["rightkit-qa"]; staged = feed.stagedCargo?.["rightkit-qa"]; }
283
285
  catch (error) { throw new QaPolicyError(`the published rightkit-qa version cannot be read (${versionsFile}): ${error.message}`); }
284
- if (published !== version) throw new QaPolicyError(`rightkit-qa ${version} is not the published version (rightkit-versions.json registry.cargo has ${published ?? "no rightkit-qa"}); only the published runner can be approved`);
286
+ if (published !== version && staged !== version) throw new QaPolicyError(`rightkit-qa ${version} is not the published version (rightkit-versions.json registry.cargo has ${published ?? "no rightkit-qa"}); only the published runner can be approved`);
285
287
  // The file that is digested is the file that is run: an absolute path, never a PATH lookup, and re-digested after.
286
288
  const file = path.resolve(String(runner));
287
289
  const sha256 = sha256Of(readRunnerBytes(file));
@@ -76,6 +76,7 @@ export function resolveReleaseSource({ cwd = process.cwd(), env = process.env, g
76
76
  let detail = "";
77
77
  try { repoRoot = plainGit(git, cwd, ["rev-parse", "--show-toplevel"]).trim(); } catch (error) { detail = ` (${error.message})`; }
78
78
  if (!repoRoot) throw new ReleaseSourceError(`${cwd} is not inside a Git repository${detail}`, NO_REPOSITORY_CODE);
79
+ repoRoot = path.normalize(repoRoot); // git prints C:/dir on Windows; every other path here is in the platform's own spelling
79
80
  const commit = plainGit(git, repoRoot, ["rev-parse", "HEAD"]).trim();
80
81
  const tree = plainGit(git, repoRoot, ["rev-parse", `${commit}^{tree}`]).trim();
81
82
  if (!OBJECT_ID.test(commit) || !OBJECT_ID.test(tree)) throw new Error("the checkout's HEAD is not a commit");
package/release.mjs CHANGED
@@ -15,7 +15,7 @@ import { assertQaAdoption, assertQaBackdoorContract } from "./qa-contract.mjs";
15
15
  import { assertLegalReleaseContract } from "./legal-contract.mjs";
16
16
  import { DECLARED_UNRELATED_POLICY, declaredUnrelatedRefusal, releaseArtifactPaths } from "./hosted-workflow-policy.mjs";
17
17
  import { assertNativeIosPrepareHasManifest, assertPrimaryReleaseCheckout, dirtyBuildInputs, resolveReleaseBuildInputs } from "./release-invocation.mjs";
18
- import { resolveReleaseSource, sourceRootOf } from "./release-source-identity.mjs";
18
+ import { gitRootOf, isSnapshotSource, resolveReleaseSource, sourceRootOf } from "./release-source-identity.mjs";
19
19
  import { ArtifactPathError, assertSplitCommandPaths, releaseCommandSteps, resolveArtifactPath, splitArtifactContext } from "./release-artifact-path.mjs";
20
20
  import { declaredCargoManifest, hasDefaultTauriManifest, resolveNativeCargoLayout } from "./native-cargo-layout.mjs";
21
21
  import {
@@ -622,7 +622,15 @@ if (problems.length || prebuildFindings.length) {
622
622
  process.exit(1);
623
623
  }
624
624
 
625
- const releaseLock = acquireReleaseLock(root, config.app ?? path.basename(root), opts.platform, opts.tier);
625
+ // The lock is an output, so a door split keeps it in the checkout's app directory: the snapshot is the commit's bytes, and a lock directory left
626
+ // there fails the door's after-stage verify (HeardRight Windows package, 2026-11-01: ".cache/right-release is an empty directory the commit does not have").
627
+ const lockRoot = (() => {
628
+ if (!workerSource || !isSnapshotSource(workerSource)) return root;
629
+ const relative = path.relative(sourceRootOf(workerSource), root);
630
+ if (relative.startsWith("..") || path.isAbsolute(relative)) fail(`the release config directory ${root} is not inside the door snapshot ${sourceRootOf(workerSource)}; the release lock has no checkout counterpart`);
631
+ return path.join(gitRootOf(workerSource), relative);
632
+ })();
633
+ const releaseLock = acquireReleaseLock(lockRoot, config.app ?? path.basename(root), opts.platform, opts.tier);
626
634
  const mode = "package";
627
635
  const command = target.package;
628
636
  if (!command && opts.platform !== "android" && opts.platform !== "ios" && !packageCommandOptional(target, resolveProjectType({ appRoot: root, config, target }), { expanded: true })) fail(`${config.app ?? "app"} has no ${opts.platform} ${mode} command`);