@kungfu-tech/buildchain 4.0.2-alpha.2 → 4.0.2-alpha.21
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/architecture/agent-change-map.md +52 -1
- package/architecture/ci-lane-change-budget.json +349 -0
- package/architecture/internal-capabilities.json +44 -1
- package/architecture/maintainability-debt.json +53 -33
- package/architecture/maintainability-policy.json +20 -15
- package/architecture/v3-core-mechanism-inventory.json +1 -0
- package/architecture/v4-delivery-warrant-shadow-fixtures.json +5 -5
- package/architecture/v4-release-invocation-fixtures.json +20 -0
- package/architecture/v4-release-topology.json +160 -84
- package/architecture/v4-runtime-semantic-closure.json +4 -1
- package/architecture/v4-universal-workflow-bootstrap.json +171 -0
- package/architecture/v4-universal-workflow-fault-campaign.json +72 -0
- package/architecture/v4-universal-workflow-train-admission.json +40 -0
- package/contracts/buildchain-v2-residuals-v1.json +0 -54
- package/contracts/v4-release-invocation-v1.schema.json +50 -2
- package/dist/site/buildchain-contract.json +87 -42
- package/dist/site/buildchain-site.json +15 -10
- package/dist/site/capability-registry.json +1 -1
- package/dist/site/controller-registry.json +46 -10
- package/dist/site/kfd-claims.json +174 -196
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +2 -2
- package/dist/site/node-api-registry.json +95 -20
- package/dist/site/page-registry.json +9 -4
- package/dist/site/public-surface-audit.json +178 -198
- package/dist/site/publication-authority-registry.json +67 -57
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +6 -6
- package/dist/site/workflow-registry.json +209 -259
- package/docs/node-api-reference.md +25 -22
- package/docs/reusable-build-surface.md +16 -0
- package/package.json +2 -2
- package/packages/core/buildchain-publication-authority.js +3 -2
- package/packages/core/ci-lane-change-budget.js +14 -1
- package/packages/core/dev-delivery-candidate-identity.js +18 -0
- package/packages/core/dev-delivery-execution-transfer.js +6 -7
- package/packages/core/dev-delivery-warrant-legacy-recovery.js +4 -2
- package/packages/core/dev-delivery-warrant-native-compatibility.js +33 -0
- package/packages/core/dev-delivery-warrant-state.js +42 -26
- package/packages/core/dev-delivery-warrant.js +8 -0
- package/packages/core/dev-delivery-writer-protocol-transition.js +72 -0
- package/packages/core/release-tail-product-capabilities.js +29 -0
- package/packages/core/release-tail-provider-plane.js +3 -3
- package/packages/core/v4-canonical-contracts.js +6 -0
- package/packages/core/v4-product-publication.js +387 -0
- package/packages/core/v4-protected-publication-source.js +93 -0
- package/packages/core/v4-publication-qualification.js +1 -0
- package/packages/core/v4-release-invocation.js +72 -3
- package/packages/core/v4-universal-workflow-bootstrap.js +586 -0
- package/scripts/check-inventory.mjs +13 -22
- package/scripts/check-maintainability.mjs +16 -113
- package/scripts/check-v4-release-topology.mjs +296 -40
- package/scripts/check-v4-universal-workflow-bootstrap.mjs +270 -0
- package/scripts/dev-delivery-warrant-store.mjs +73 -7
- package/scripts/dev-delivery-warrant-transition.mjs +109 -0
- package/scripts/dev-delivery-warrant.mjs +84 -100
- package/scripts/dev-pr-auto-merge.mjs +15 -15
- package/scripts/generate-channel-build-workflow.mjs +5 -1
- package/scripts/generate-channel-promotion-workflow.mjs +5 -3
- package/scripts/generate-v4-universal-workflow-facades.mjs +415 -0
- package/scripts/maintainability-public-surface.mjs +115 -0
- package/scripts/release-candidate-resolver.mjs +23 -24
- package/scripts/resume-from-candidate-run.mjs +16 -17
- package/scripts/universal-facade-maintainability.mjs +82 -0
- package/scripts/v4-product-publication-intent.mjs +114 -0
- package/scripts/v4-release-candidate-adapter.mjs +41 -0
- package/scripts/v4-universal-workflow-backflow.mjs +212 -0
- package/scripts/v4-universal-workflow-engine.mjs +617 -0
- package/scripts/v4-universal-workflow-self-dogfood.mjs +205 -0
- package/templates/universal-buildchain-bootstrap-recovery.yml +282 -0
- package/templates/universal-buildchain-bootstrap.yml +28 -0
|
@@ -13,6 +13,8 @@ export const V4_RELEASE_TRANSACTION_CONTRACT =
|
|
|
13
13
|
"kungfu-buildchain-v4-release-transaction/v1";
|
|
14
14
|
export const V4_RELEASE_RECEIPT_CONTRACT =
|
|
15
15
|
"kungfu-buildchain-v4-release-receipt/v1";
|
|
16
|
+
export const V4_RELEASE_PROVIDER_CONTRACT =
|
|
17
|
+
"kungfu-buildchain-release-tail-provider/v1";
|
|
16
18
|
|
|
17
19
|
const SHA_PATTERN = /^[0-9a-f]{40}$/u;
|
|
18
20
|
const TAG_PATTERN = /^v[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/u;
|
|
@@ -127,10 +129,59 @@ function validateAuthority(value) {
|
|
|
127
129
|
validateV4Root(value[name], `$/authority/${name}`);
|
|
128
130
|
}
|
|
129
131
|
|
|
132
|
+
function validateProvider(value, candidate) {
|
|
133
|
+
exactKeys(value, ["adapter", "contract", "repository"], "$/provider");
|
|
134
|
+
if (
|
|
135
|
+
value.adapter !== "built-in-provider-plane" ||
|
|
136
|
+
value.contract !== V4_RELEASE_PROVIDER_CONTRACT ||
|
|
137
|
+
value.repository !== candidate.repository
|
|
138
|
+
)
|
|
139
|
+
fault(
|
|
140
|
+
"invalid-release-provider",
|
|
141
|
+
"$/provider",
|
|
142
|
+
"provider identity must bind the built-in Provider Plane and candidate repository",
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function validateParent(value) {
|
|
147
|
+
exactKeys(
|
|
148
|
+
value,
|
|
149
|
+
["invocationRoot", "transactionRoot", "receiptRoot"],
|
|
150
|
+
"$/parent",
|
|
151
|
+
);
|
|
152
|
+
const roots = [
|
|
153
|
+
value.invocationRoot,
|
|
154
|
+
value.transactionRoot,
|
|
155
|
+
value.receiptRoot,
|
|
156
|
+
];
|
|
157
|
+
if (roots.every((root) => root === null)) return;
|
|
158
|
+
if (roots.some((root) => root === null))
|
|
159
|
+
fault(
|
|
160
|
+
"invalid-release-parent-lineage",
|
|
161
|
+
"$/parent",
|
|
162
|
+
"parent lineage roots must be either all null or all present",
|
|
163
|
+
);
|
|
164
|
+
roots.forEach((root, index) =>
|
|
165
|
+
validateV4Root(
|
|
166
|
+
root,
|
|
167
|
+
`$/parent/${["invocationRoot", "transactionRoot", "receiptRoot"][index]}`,
|
|
168
|
+
),
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
130
172
|
export function createV4ReleaseInvocation(value) {
|
|
131
173
|
exactKeys(
|
|
132
174
|
value,
|
|
133
|
-
[
|
|
175
|
+
[
|
|
176
|
+
"schema",
|
|
177
|
+
"publisher",
|
|
178
|
+
"runtime",
|
|
179
|
+
"candidate",
|
|
180
|
+
"target",
|
|
181
|
+
"authority",
|
|
182
|
+
"provider",
|
|
183
|
+
"parent",
|
|
184
|
+
],
|
|
134
185
|
"$",
|
|
135
186
|
);
|
|
136
187
|
if (value.schema !== V4_RELEASE_INVOCATION_CONTRACT)
|
|
@@ -144,6 +195,8 @@ export function createV4ReleaseInvocation(value) {
|
|
|
144
195
|
validateCandidate(value.candidate);
|
|
145
196
|
validateTarget(value.target);
|
|
146
197
|
validateAuthority(value.authority);
|
|
198
|
+
validateProvider(value.provider, value.candidate);
|
|
199
|
+
validateParent(value.parent);
|
|
147
200
|
v4CanonicalBytes(value);
|
|
148
201
|
const roots = {
|
|
149
202
|
publisherRoot: v4ContentRoot(
|
|
@@ -160,6 +213,8 @@ export function createV4ReleaseInvocation(value) {
|
|
|
160
213
|
"release-invocation-authority",
|
|
161
214
|
value.authority,
|
|
162
215
|
),
|
|
216
|
+
providerRoot: v4ContentRoot("release-invocation-provider", value.provider),
|
|
217
|
+
parentRoot: v4ContentRoot("release-invocation-parent", value.parent),
|
|
163
218
|
};
|
|
164
219
|
const invocationRoot = v4ContentRoot("release-invocation", {
|
|
165
220
|
schema: V4_RELEASE_INVOCATION_CONTRACT,
|
|
@@ -261,16 +316,30 @@ export function planV4ReleaseRoute({
|
|
|
261
316
|
export function createV4ReleaseTransaction(value) {
|
|
262
317
|
exactKeys(
|
|
263
318
|
value,
|
|
264
|
-
[
|
|
319
|
+
[
|
|
320
|
+
"invocationRoot",
|
|
321
|
+
"publisherRoot",
|
|
322
|
+
"runtimeRoot",
|
|
323
|
+
"providerRoot",
|
|
324
|
+
"parentRoot",
|
|
325
|
+
],
|
|
265
326
|
"$transaction",
|
|
266
327
|
);
|
|
267
|
-
for (const name of [
|
|
328
|
+
for (const name of [
|
|
329
|
+
"invocationRoot",
|
|
330
|
+
"publisherRoot",
|
|
331
|
+
"runtimeRoot",
|
|
332
|
+
"providerRoot",
|
|
333
|
+
"parentRoot",
|
|
334
|
+
])
|
|
268
335
|
validateV4Root(value[name], `$transaction/${name}`);
|
|
269
336
|
const transaction = {
|
|
270
337
|
schema: V4_RELEASE_TRANSACTION_CONTRACT,
|
|
271
338
|
invocationRoot: value.invocationRoot,
|
|
272
339
|
publisherRoot: value.publisherRoot,
|
|
273
340
|
runtimeRoot: value.runtimeRoot,
|
|
341
|
+
providerRoot: value.providerRoot,
|
|
342
|
+
parentRoot: value.parentRoot,
|
|
274
343
|
phases: ["QUALIFY", "APPLY", "SETTLE"],
|
|
275
344
|
writer: "canonical-v4-apply",
|
|
276
345
|
};
|