@kungfu-tech/buildchain 2.14.14-alpha.1 → 2.14.14-alpha.2
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/actions/promote-buildchain-ref/README.md +6 -4
- package/dist/site/buildchain-contract.json +75 -21
- package/dist/site/buildchain-site.json +23 -22
- package/dist/site/controller-registry.json +47 -1
- package/dist/site/kfd-claims.json +10 -5
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +4 -4
- package/dist/site/node-api-registry.json +5 -5
- package/dist/site/page-registry.json +10 -10
- package/dist/site/public-surface-audit.json +9 -4
- package/dist/site/publication-authority-registry.json +3 -2
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-model.json +4 -2
- package/dist/site/site-manifest.json +8 -8
- package/dist/site/workflow-registry.json +7 -2
- package/docs/binary-distribution.md +22 -8
- package/docs/release-candidate.md +4 -2
- package/docs/release-governance.md +5 -3
- package/docs/site-bundle-contract.md +4 -0
- package/package.json +1 -1
- package/packages/core/buildchain-contract.js +2 -1
- package/packages/core/controller-evidence.js +8 -0
- package/packages/core/issue-reporting.js +9 -4
- package/packages/core/publication-authority.js +75 -0
- package/scripts/assemble-binary-release-admission.mjs +201 -0
- package/scripts/check-inventory.mjs +1 -1
- package/scripts/ensure-github-release.mjs +20 -6
- package/scripts/generate-channel-promotion-workflow.mjs +3 -3
- package/scripts/generate-site-bundle.mjs +8 -4
- package/scripts/runtime-ref-core.mjs +12 -0
- package/scripts/site-bundle-homepage.mjs +39 -0
|
@@ -204,7 +204,7 @@ ${secrets.trimEnd()}
|
|
|
204
204
|
${publicOutputs(outputs)}
|
|
205
205
|
|
|
206
206
|
permissions:
|
|
207
|
-
actions:
|
|
207
|
+
actions: write
|
|
208
208
|
checks: write
|
|
209
209
|
contents: write
|
|
210
210
|
id-token: write
|
|
@@ -404,7 +404,7 @@ jobs:
|
|
|
404
404
|
if: \${{ needs.resolve-promotion.outputs.channel == 'alpha' }}
|
|
405
405
|
uses: kungfu-systems/buildchain/${alphaRoute.workflowPath}@${alphaRoute.callRef}
|
|
406
406
|
permissions:
|
|
407
|
-
actions:
|
|
407
|
+
actions: write
|
|
408
408
|
checks: write
|
|
409
409
|
contents: write
|
|
410
410
|
id-token: write
|
|
@@ -419,7 +419,7 @@ ${alphaForwarded}
|
|
|
419
419
|
if: \${{ needs.resolve-promotion.outputs.channel == 'stable' }}
|
|
420
420
|
uses: kungfu-systems/buildchain/${stableRoute.workflowPath}@${stableRoute.callRef}
|
|
421
421
|
permissions:
|
|
422
|
-
actions:
|
|
422
|
+
actions: write
|
|
423
423
|
checks: write
|
|
424
424
|
contents: write
|
|
425
425
|
id-token: write
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
enumerateWorkflowInputs,
|
|
29
29
|
} from "../packages/core/public-surface-audit.js";
|
|
30
30
|
import { createSurfaceTimestampPolicy } from "../packages/core/surface-manifest.js";
|
|
31
|
+
import { projectHomepageIntro } from "./site-bundle-homepage.mjs";
|
|
31
32
|
|
|
32
33
|
const SITE_BUNDLE_CONTRACT = "kungfu-buildchain-site-bundle";
|
|
33
34
|
const PUBLICATION_RELEASE_REGISTRY_CONTRACT = "kungfu-buildchain-publication-release-registry";
|
|
@@ -702,6 +703,7 @@ function buildSiteBundle() {
|
|
|
702
703
|
const packageJson = readJson("package.json");
|
|
703
704
|
const inventory = readJson("tests/buildchain-inventory.json");
|
|
704
705
|
const readme = parseReadme(readText(README_PATH));
|
|
706
|
+
const homepageIntro = projectHomepageIntro(readme.intro);
|
|
705
707
|
const docs = BUILDCHAIN_AGENT_MANUALS.map((manual) => docEntry(manual.id, manual.title, manual.path, manual.plane));
|
|
706
708
|
const pages = buildSitePages();
|
|
707
709
|
const preservedTimestampPolicy = readExistingSiteTimestampPolicy(packageJson.version);
|
|
@@ -945,8 +947,10 @@ function buildSiteBundle() {
|
|
|
945
947
|
},
|
|
946
948
|
githubRelease: {
|
|
947
949
|
exactTagRelease: true,
|
|
948
|
-
|
|
949
|
-
|
|
950
|
+
authoritativeIntent: "Buildchain publication channel controls prerelease/latest metadata when available",
|
|
951
|
+
alphaChannel: "alpha publication sets prerelease=true and make_latest=false",
|
|
952
|
+
stableChannels: "release, stable, and major publication set prerelease=false and make_latest=true",
|
|
953
|
+
tagFallback: "ordinary callers without publication intent use semver prerelease syntax",
|
|
950
954
|
evidenceAssets: [
|
|
951
955
|
"publish evidence JSON",
|
|
952
956
|
"buildchain.release.json",
|
|
@@ -1218,8 +1222,8 @@ function buildSiteBundle() {
|
|
|
1218
1222
|
},
|
|
1219
1223
|
homepage: {
|
|
1220
1224
|
title: readme.title,
|
|
1221
|
-
lead:
|
|
1222
|
-
mechanismSummary:
|
|
1225
|
+
lead: homepageIntro.lead,
|
|
1226
|
+
mechanismSummary: homepageIntro.mechanismSummary,
|
|
1223
1227
|
sections: homepageSections,
|
|
1224
1228
|
displayPlan: {
|
|
1225
1229
|
firstScreen: {
|
|
@@ -111,6 +111,8 @@ export function validateRuntimeOverrideTrust({
|
|
|
111
111
|
requestedRef = "",
|
|
112
112
|
eventName = "",
|
|
113
113
|
actorPermission = "",
|
|
114
|
+
sameRepositoryPullRequest = false,
|
|
115
|
+
pullRequestHeadSha = "",
|
|
114
116
|
} = {}) {
|
|
115
117
|
if (!String(requestedRef || "").trim()) {
|
|
116
118
|
return { ok: true, decision: "stable-default" };
|
|
@@ -118,6 +120,16 @@ export function validateRuntimeOverrideTrust({
|
|
|
118
120
|
if (isOfficialBuildchainChannelRef(requestedRef)) {
|
|
119
121
|
return { ok: true, decision: "official-channel" };
|
|
120
122
|
}
|
|
123
|
+
const normalizedRequested = String(requestedRef || "").trim().toLowerCase();
|
|
124
|
+
const normalizedHeadSha = String(pullRequestHeadSha || "").trim().toLowerCase();
|
|
125
|
+
if (
|
|
126
|
+
eventName === "pull_request" &&
|
|
127
|
+
sameRepositoryPullRequest === true &&
|
|
128
|
+
EXACT_SHA_RE.test(normalizedRequested) &&
|
|
129
|
+
normalizedRequested === normalizedHeadSha
|
|
130
|
+
) {
|
|
131
|
+
return { ok: true, decision: "same-repository-pr-head" };
|
|
132
|
+
}
|
|
121
133
|
if (eventName !== "workflow_dispatch") {
|
|
122
134
|
return {
|
|
123
135
|
ok: false,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const BADGE_BLOCK_START = "<!-- buildchain:badges:start -->";
|
|
2
|
+
const BADGE_BLOCK_END = "<!-- buildchain:badges:end -->";
|
|
3
|
+
|
|
4
|
+
function normalizeMarkdown(value) {
|
|
5
|
+
return String(value || "").replace(/\r\n/g, "\n").trim();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function paragraphBlocks(markdown) {
|
|
9
|
+
return normalizeMarkdown(markdown)
|
|
10
|
+
.split(/\n{2,}/)
|
|
11
|
+
.map((block) => block.replace(/\n/g, " ").trim())
|
|
12
|
+
.filter(Boolean);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function projectHomepageIntro(markdown) {
|
|
16
|
+
const intro = normalizeMarkdown(markdown);
|
|
17
|
+
const start = intro.indexOf(BADGE_BLOCK_START);
|
|
18
|
+
const end = intro.indexOf(BADGE_BLOCK_END);
|
|
19
|
+
if ((start >= 0) !== (end >= 0) || (start >= 0 && end < start)) {
|
|
20
|
+
throw new Error("README.md managed badge block is incomplete");
|
|
21
|
+
}
|
|
22
|
+
if (start >= 0) {
|
|
23
|
+
const endOffset = end + BADGE_BLOCK_END.length;
|
|
24
|
+
const lead = intro.slice(start, endOffset).trim();
|
|
25
|
+
const remaining = [intro.slice(0, start), intro.slice(endOffset)]
|
|
26
|
+
.map((part) => part.trim())
|
|
27
|
+
.filter(Boolean)
|
|
28
|
+
.join("\n\n");
|
|
29
|
+
return {
|
|
30
|
+
lead,
|
|
31
|
+
mechanismSummary: paragraphBlocks(remaining),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const blocks = paragraphBlocks(intro);
|
|
35
|
+
return {
|
|
36
|
+
lead: blocks[0] || "",
|
|
37
|
+
mechanismSummary: blocks.slice(1),
|
|
38
|
+
};
|
|
39
|
+
}
|