@kungfu-tech/buildchain 3.0.2 → 3.0.3-alpha.1
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/AGENTS.md +1 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +27 -1
- package/actions/promote-buildchain-ref/README.md +90 -19
- package/actions/report-buildchain-issue/README.md +20 -2
- package/actions/run-lifecycle/README.md +5 -0
- package/actions/validate-config/README.md +19 -1
- package/bin/buildchain.mjs +56 -2
- package/bin/internal/command-registry.mjs +82 -0
- package/bin/internal/trust-release-cli.mjs +1 -0
- package/contracts/auditable-demo-media-profiles-v1.json +116 -1
- package/contracts/buildchain-v2-residuals-v1.json +146 -0
- package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +143 -0
- package/contracts/evidence/auditable-demo-web-delivery-v1.json +7 -3
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/complete-transcript.txt +2 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/public-projection.json +16 -0
- package/contracts/fixtures/auditable-demo-responsive-web-delivery-v1/scene.json +12 -0
- package/dist/site/buildchain-contract.json +188 -46
- package/dist/site/buildchain-site.json +181 -90
- package/dist/site/capability-registry.json +5 -5
- package/dist/site/cli-registry.json +860 -98
- package/dist/site/controller-registry.json +118 -5
- package/dist/site/kfd-claims.json +233 -19
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +20 -20
- package/dist/site/node-api-registry.json +374 -59
- package/dist/site/page-registry.json +156 -65
- package/dist/site/public-surface-audit.json +231 -22
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +3 -0
- package/dist/site/site-manifest.json +24 -24
- package/dist/site/workflow-registry.json +575 -79
- package/docs/MAP.md +22 -4
- package/docs/auditable-demo.md +54 -13
- package/docs/aws-us-elastic-runner-burst-plane.md +381 -0
- package/docs/cli.md +119 -12
- package/docs/consumer-issue-reporting.md +20 -2
- package/docs/dev-alpha-candidate-patrol.md +24 -10
- package/docs/github-governance-authority.md +24 -31
- package/docs/lifecycle-protocol.md +20 -2
- package/docs/migration-inventory.md +24 -5
- package/docs/observed-evidence-patrol.md +28 -12
- package/docs/ownership.md +19 -1
- package/docs/publication-artifacts.md +158 -18
- package/docs/publication-authority.md +4 -4
- package/docs/publish-transaction.md +78 -31
- package/docs/release-candidate.md +24 -0
- package/docs/release-flow.md +50 -32
- package/docs/release-governance.md +39 -32
- package/docs/release-passport.md +4 -0
- package/docs/release-propagation.md +57 -12
- package/docs/reusable-build-surface.md +218 -90
- package/docs/runtime-train-validation.md +20 -2
- package/docs/shifu-gate-profiles.md +7 -1
- package/docs/stable-candidate-patrol.md +6 -6
- package/docs/toolkit-observability.md +22 -0
- package/docs/versioning.md +46 -24
- package/docs/web-surface-deployments.md +82 -1
- package/package.json +7 -5
- package/packages/core/README.md +60 -4
- package/packages/core/artifact-signing.js +1 -0
- package/packages/core/buildchain-contract.js +9 -4
- package/packages/core/cache-evidence.js +1 -0
- package/packages/core/controller-evidence.js +2 -0
- package/packages/core/diagnostics.js +105 -30
- package/packages/core/github-governance-authority.js +25 -17
- package/packages/core/index.js +40 -0
- package/packages/core/paper.js +3226 -0
- package/packages/core/public-surface-audit.js +3 -0
- package/packages/core/publication-artifact.js +1 -6
- package/packages/core/publication-authority.js +1 -0
- package/packages/core/publication-control-plane-audit.js +28 -0
- package/packages/core/publication-reproducibility.js +947 -0
- package/packages/core/publication-sealed-bundle.js +190 -0
- package/packages/core/publish-transaction.js +147 -17
- package/packages/core/release-candidate.js +234 -0
- package/packages/core/release-passport.js +519 -228
- package/packages/core/release-propagation.js +175 -1
- package/packages/core/stable-release-gate.js +4 -1
- package/scripts/artifact-signing-delegation.mjs +268 -0
- package/scripts/audit-github-governance.mjs +32 -13
- package/scripts/audit-publication-control-plane.mjs +17 -8
- package/scripts/auditable-demo.mjs +266 -7
- package/scripts/aws-codebuild-toolchain.mjs +285 -0
- package/scripts/aws-macos-jit-core.mjs +378 -0
- package/scripts/aws-macos-jit.mjs +123 -0
- package/scripts/aws-runner-burst-core.mjs +248 -0
- package/scripts/aws-runner-burst.mjs +79 -0
- package/scripts/aws-windows-jit-core.mjs +374 -0
- package/scripts/aws-windows-jit.mjs +121 -0
- package/scripts/build-contract-core.mjs +69 -6
- package/scripts/build-standalone-binary.mjs +23 -0
- package/scripts/buildchain-contract-lock.mjs +1 -1
- package/scripts/buildchain-patrol.mjs +1 -1
- package/scripts/check-internal-architecture.mjs +69 -2
- package/scripts/check-inventory.mjs +70 -2
- package/scripts/check-javascript-syntax.mjs +31 -0
- package/scripts/check-maintainability.mjs +371 -0
- package/scripts/compiler-cache-evidence.mjs +221 -0
- package/scripts/dev-alpha-candidate-patrol.mjs +288 -43
- package/scripts/dispatch-artifact-signing-authority.mjs +7 -1
- package/scripts/finalize-native-artifact-signing-result.mjs +185 -31
- package/scripts/gate-profile-core.mjs +6 -1
- package/scripts/generate-channel-promotion-workflow.mjs +3 -12
- package/scripts/generate-release-candidate-passport.mjs +4 -0
- package/scripts/generate-site-bundle.mjs +84 -18
- package/scripts/import-artifact-signing-results.mjs +64 -5
- package/scripts/inspect-artifact-signing-requests.mjs +52 -14
- package/scripts/maintainability-metrics.mjs +339 -0
- package/scripts/npm-publish-transaction.mjs +57 -6
- package/scripts/observed-evidence.mjs +151 -33
- package/scripts/paper.mjs +645 -0
- package/scripts/promotion-channel-router.mjs +16 -4
- package/scripts/publication-reproducibility.mjs +62 -0
- package/scripts/reconcile-github-governance.mjs +8 -1
- package/scripts/release-propagation.mjs +39 -0
- package/scripts/resolve-artifact-signing-upload-route.mjs +55 -0
- package/scripts/resolve-build-contract.mjs +6 -0
- package/scripts/route-offline-runners.mjs +236 -0
- package/scripts/run-candidate-body-prefix-renderer.mjs +187 -0
- package/scripts/run-lifecycle-core.mjs +62 -1
- package/scripts/runtime-ref-core.mjs +36 -4
- package/scripts/seal-artifact-signing-requests.mjs +64 -12
- package/scripts/stable-candidate-qualification.mjs +50 -0
- package/scripts/verify-artifact-signing-results.mjs +26 -1
- package/scripts/web-surface-core.mjs +272 -86
- package/scripts/web-surface-production-decision.mjs +19 -3
|
@@ -77,6 +77,9 @@ function commandId(first = "", second = "", third = "") {
|
|
|
77
77
|
if (head === "publication-artifact") return "publication-artifact";
|
|
78
78
|
if (head === "publication" && sub) return `publication-artifact-${sub}`;
|
|
79
79
|
if (head === "publication") return "publication-artifact";
|
|
80
|
+
if (head === "paper" && sub === "bootstrap" && normalizedLeaf === "npm") return "paper-bootstrap-npm";
|
|
81
|
+
if (head === "paper" && sub) return `paper-${sub}`;
|
|
82
|
+
if (head === "paper") return "paper";
|
|
80
83
|
if (head === "build-contract") return "build-contract";
|
|
81
84
|
if (head === "infra-contract") return "infra-contract";
|
|
82
85
|
if (head === "web-surface") return "web-surface";
|
|
@@ -253,7 +253,7 @@ export function createPublicationSourceBundle({
|
|
|
253
253
|
} = {}) {
|
|
254
254
|
const outputPath = path.resolve(cwd, output);
|
|
255
255
|
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
|
|
256
|
-
const paths = sourcePaths.length > 0 ? sourcePaths : ["."];
|
|
256
|
+
const paths = [...(sourcePaths.length > 0 ? sourcePaths : ["."])].sort();
|
|
257
257
|
execFileSync("git", [
|
|
258
258
|
"archive",
|
|
259
259
|
"--format=tar.gz",
|
|
@@ -501,11 +501,6 @@ function mergePublicationRegistryVersions({ registries = [], publicationId }) {
|
|
|
501
501
|
if (registry.publication?.id !== publicationId) {
|
|
502
502
|
throw new Error(`publication archive registry id mismatch: expected ${publicationId}, got ${registry.publication?.id || "(missing)"}`);
|
|
503
503
|
}
|
|
504
|
-
if (registry.historyPolicy === "cumulative-authenticated-hydration") {
|
|
505
|
-
const declaredVersions = new Set(registry.versions.map((record) => String(record?.version || "")));
|
|
506
|
-
const missingVersions = [...versions.keys()].filter((version) => !declaredVersions.has(version));
|
|
507
|
-
if (missingVersions.length > 0) throw new Error(`cumulative publication archive registry dropped accepted versions: ${missingVersions.join(", ")}`);
|
|
508
|
-
}
|
|
509
504
|
for (const record of registry.versions) {
|
|
510
505
|
const version = String(record?.version || "").trim();
|
|
511
506
|
if (!version) throw new Error("publication archive registry record is missing version");
|
|
@@ -649,6 +649,7 @@ function validatePublicationEvidence(publicationEvidence, admission) {
|
|
|
649
649
|
platformMatrix: passport.platformMatrix,
|
|
650
650
|
buildchain: passport.buildchain,
|
|
651
651
|
...(passport.gateProfileEvidence ? { gateProfileEvidence: passport.gateProfileEvidence } : {}),
|
|
652
|
+
...(passport.familyEvidence ? { familyEvidence: passport.familyEvidence } : {}),
|
|
652
653
|
...(passport.controllerReceipts ? { controllerReceipts: passport.controllerReceipts } : {}),
|
|
653
654
|
});
|
|
654
655
|
if (normalizeDigest(passport.candidateHash, "releaseCandidatePassport.candidateHash") !== candidateHash) {
|
|
@@ -10,6 +10,34 @@ export const BUILDCHAIN_RELEASE_RECONCILIATION_PATHS = Object.freeze([
|
|
|
10
10
|
"package.json",
|
|
11
11
|
]);
|
|
12
12
|
|
|
13
|
+
function deploymentPatternExpression(pattern) {
|
|
14
|
+
let expression = "";
|
|
15
|
+
for (let index = 0; index < pattern.length; index += 1) {
|
|
16
|
+
const character = pattern[index];
|
|
17
|
+
if (character === "*") {
|
|
18
|
+
if (pattern[index + 1] === "*") {
|
|
19
|
+
expression += ".*";
|
|
20
|
+
index += 1;
|
|
21
|
+
} else {
|
|
22
|
+
expression += "[^/]*";
|
|
23
|
+
}
|
|
24
|
+
} else {
|
|
25
|
+
expression += character.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return new RegExp(`^${expression}$`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function matchesGithubDeploymentPolicy(policy, { ref, refType = "branch" } = {}) {
|
|
32
|
+
const normalizedRef = String(ref || "");
|
|
33
|
+
const normalizedType = String(refType || "");
|
|
34
|
+
const policyName = String(policy?.name || "");
|
|
35
|
+
const policyType = String(policy?.type || "");
|
|
36
|
+
if (!normalizedRef || !["branch", "tag"].includes(normalizedType)) return false;
|
|
37
|
+
if (policyType !== normalizedType || !policyName) return false;
|
|
38
|
+
return deploymentPatternExpression(policyName).test(normalizedRef);
|
|
39
|
+
}
|
|
40
|
+
|
|
13
41
|
export function evaluateBuildchainReleaseReconciliation({
|
|
14
42
|
repository,
|
|
15
43
|
publicationVersion,
|