@kungfu-tech/buildchain 4.0.2-alpha.45 → 4.0.2-alpha.47
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 +1 -1
- package/architecture/maintainability-debt.json +13 -13
- package/architecture/v4-release-topology.json +1 -1
- package/architecture/v4-universal-workflow-train-admission.json +2 -2
- package/dist/site/buildchain-contract.json +4 -4
- package/dist/site/buildchain-site.json +15 -10
- package/dist/site/kfd-claims.json +2 -2
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +2 -2
- package/dist/site/node-api-registry.json +13 -13
- package/dist/site/page-registry.json +9 -4
- package/dist/site/public-surface-audit.json +2 -2
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +6 -6
- package/dist/site/workflow-registry.json +5 -5
- package/docs/node-api-reference.md +15 -15
- package/docs/publish-transaction.md +36 -3
- package/package.json +1 -1
- package/packages/core/buildchain-v4-domain.wasm +0 -0
- package/packages/core/next-development-transition.js +5 -6
- package/packages/core/publication-sealed-bundle.js +78 -13
- package/packages/core/v4-domain-wasm-artifact.js +2 -2
- package/packages/core/v4-product-publication.js +2 -0
- package/packages/core/v4-universal-workflow-bootstrap.js +1 -1
- package/scripts/publication-candidate-sealer.mjs +7 -1
- package/scripts/v4-product-publication-intent.mjs +8 -0
- package/scripts/v4-universal-workflow-engine.mjs +4 -4
|
@@ -265,11 +265,11 @@ async function observedSourceTimestamp(repository, sourceSha) {
|
|
|
265
265
|
fail("protected publication source timestamp is unavailable");
|
|
266
266
|
return new Date(observed).toISOString();
|
|
267
267
|
}
|
|
268
|
-
async function observeProductPublicationRecovery(repository, sourceSha, candidateVersion) {
|
|
268
|
+
async function observeProductPublicationRecovery(repository, sourceSha, candidateVersion, channel) {
|
|
269
269
|
const apiUrl = process.env.GITHUB_API_URL || "https://api.github.com", token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN || "", prefix = `heads/buildchain/v4-product-state/${sourceSha}-`;
|
|
270
270
|
const stateRefs = (await githubJson({ apiUrl, token, path: `/repos/${repository}/git/matching-refs/${prefix}`, allowNotFound: true })) || [];
|
|
271
271
|
const recoveryStates = await Promise.all(stateRefs.map(async (stateRef) => { const version = v4ProductStateVersion(stateRef, sourceSha); const [stateCommit, exactTagRef] = await Promise.all([githubJson({ apiUrl, token, path: `/repos/${repository}/git/commits/${stateRef.object.sha}` }), githubJson({ apiUrl, token, path: `/repos/${repository}/git/ref/tags/v${version}`, allowNotFound: true })]); return { stateRef, stateCommit, exactTagRef }; }));
|
|
272
|
-
const exactTagRef = recoveryStates.length ? undefined : await githubJson({ apiUrl, token, path: `/repos/${repository}/git/ref/tags/v${encodeURIComponent(candidateVersion)}`, allowNotFound: true }); return { recoveryStates, exactTagRef };
|
|
272
|
+
const exactTagRef = recoveryStates.length ? undefined : await githubJson({ apiUrl, token, path: `/repos/${repository}/git/ref/tags/v${encodeURIComponent(channel === "stable" ? candidateVersion.replace(/-alpha\.\d+$/u, "") : candidateVersion)}`, allowNotFound: true }); return { recoveryStates, exactTagRef };
|
|
273
273
|
}
|
|
274
274
|
async function materializeProductPublicationIntent({
|
|
275
275
|
candidate,
|
|
@@ -282,8 +282,8 @@ async function materializeProductPublicationIntent({
|
|
|
282
282
|
);
|
|
283
283
|
const sourceTimestamp = await observedSourceTimestamp(repository, route.requestedSha);
|
|
284
284
|
const version = String(candidate.publicationVersion || candidate.version || "").trim(), explicitResume = String(inputs["resume-transaction-id"] || "") !== "";
|
|
285
|
-
const recovery = route.decision !== "Resume" || explicitResume ? {} : await observeProductPublicationRecovery(repository, route.requestedSha, version);
|
|
286
|
-
const recoveredVersion = selectV4RecoveredProductPublicationVersion({ routeDecision: route.decision, candidateVersion: version, requestedSha: route.requestedSha, explicitResume, ...recovery });
|
|
285
|
+
const recovery = route.decision !== "Resume" || explicitResume ? {} : await observeProductPublicationRecovery(repository, route.requestedSha, version, route.channel);
|
|
286
|
+
const recoveredVersion = selectV4RecoveredProductPublicationVersion({ routeDecision: route.decision, candidateVersion: version, channel: route.channel, requestedSha: route.requestedSha, explicitResume, ...recovery });
|
|
287
287
|
execFileSync(
|
|
288
288
|
process.execPath,
|
|
289
289
|
[
|