@kungfu-tech/buildchain 2.14.2-alpha.0 → 2.14.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/bin/buildchain.mjs +2 -2
- package/dist/site/buildchain-contract.json +5 -5
- package/dist/site/buildchain-site.json +16 -16
- package/dist/site/capability-registry.json +1 -1
- package/dist/site/kfd-claims.json +21 -7
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +4 -4
- package/dist/site/node-api-registry.json +3 -3
- package/dist/site/page-registry.json +8 -8
- package/dist/site/public-surface-audit.json +20 -4
- package/dist/site/publication-authority-registry.json +19 -1
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +8 -8
- package/dist/site/workflow-registry.json +14 -0
- package/docs/cli.md +28 -2
- package/docs/release-flow.md +6 -1
- package/docs/release-governance.md +16 -0
- package/docs/versioning.md +1 -0
- package/package.json +1 -1
- package/packages/core/buildchain-config.js +52 -0
- package/packages/core/buildchain-publication-authority.js +1 -0
- package/packages/core/release-line-bootstrap.js +14 -1
- package/scripts/dev-merge-queue.mjs +231 -16
|
@@ -280,6 +280,19 @@
|
|
|
280
280
|
"runnerPolicy": "unqualified",
|
|
281
281
|
"notes": ""
|
|
282
282
|
},
|
|
283
|
+
{
|
|
284
|
+
"workflowPath": ".github/workflows/dev-merge-queue-governance.yml",
|
|
285
|
+
"authorityClass": "governance-write",
|
|
286
|
+
"publicationCapable": false,
|
|
287
|
+
"capabilityIds": [],
|
|
288
|
+
"credentialMode": "none",
|
|
289
|
+
"publisherWorkflowMode": "fixed",
|
|
290
|
+
"publisherWorkflowPath": ".github/workflows/dev-merge-queue-governance.yml",
|
|
291
|
+
"environment": "",
|
|
292
|
+
"environmentMode": "fixed",
|
|
293
|
+
"runnerPolicy": "unqualified",
|
|
294
|
+
"notes": ""
|
|
295
|
+
},
|
|
283
296
|
{
|
|
284
297
|
"workflowPath": ".github/workflows/dev-pr-auto-merge.yml",
|
|
285
298
|
"authorityClass": "governance-write",
|
|
@@ -657,6 +670,11 @@
|
|
|
657
670
|
"signals": [],
|
|
658
671
|
"classified": false
|
|
659
672
|
},
|
|
673
|
+
{
|
|
674
|
+
"path": ".github/workflows/dev-merge-queue-governance.yml",
|
|
675
|
+
"signals": [],
|
|
676
|
+
"classified": true
|
|
677
|
+
},
|
|
660
678
|
{
|
|
661
679
|
"path": ".github/workflows/dev-pr-auto-merge.yml",
|
|
662
680
|
"signals": [
|
|
@@ -774,5 +792,5 @@
|
|
|
774
792
|
"classified": false
|
|
775
793
|
}
|
|
776
794
|
],
|
|
777
|
-
"registryDigest": "
|
|
795
|
+
"registryDigest": "24c7f5210da277b79ce13356c439c14ea49f6c54ba9e083f42ce47fdfdacc55c"
|
|
778
796
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"publishedAt": "2026-07-
|
|
4
|
+
"generatedAt": "2026-07-18T01:00:00.995Z",
|
|
5
|
+
"publishedAt": "2026-07-18T01:00:00.995Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "ae16e640bf2f21c8f981ffa8b3523c8aae9200b2",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"package": {
|
|
34
34
|
"name": "@kungfu-tech/buildchain",
|
|
35
|
-
"version": "2.14.2
|
|
35
|
+
"version": "2.14.2",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-07-
|
|
5
|
-
"publishedAt": "2026-07-
|
|
4
|
+
"generatedAt": "2026-07-18T01:00:00.995Z",
|
|
5
|
+
"publishedAt": "2026-07-18T01:00:00.995Z",
|
|
6
6
|
"reproducible": true,
|
|
7
7
|
"timestampPolicy": "ci-injected",
|
|
8
8
|
"deterministicInputs": [
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"declared Buildchain surface manifest contract"
|
|
20
20
|
],
|
|
21
21
|
"sourceDateEpoch": "0",
|
|
22
|
-
"sourceRevision": "
|
|
22
|
+
"sourceRevision": "ae16e640bf2f21c8f981ffa8b3523c8aae9200b2",
|
|
23
23
|
"timestampPolicyDetails": {
|
|
24
24
|
"contract": "kungfu-buildchain-surface-timestamp-policy",
|
|
25
25
|
"timestampFields": [
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"package": {
|
|
39
39
|
"name": "@kungfu-tech/buildchain",
|
|
40
|
-
"version": "2.14.2
|
|
40
|
+
"version": "2.14.2",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
"path": "docs/cli.md",
|
|
190
190
|
"plane": "use",
|
|
191
191
|
"exists": true,
|
|
192
|
-
"digest": "sha256:
|
|
192
|
+
"digest": "sha256:1733f9377938a16e6de77511546be7de67c5ab8816220d693fd46f55450a5148"
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
"id": "build-facts",
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
"path": "docs/release-governance.md",
|
|
238
238
|
"plane": "why",
|
|
239
239
|
"exists": true,
|
|
240
|
-
"digest": "sha256:
|
|
240
|
+
"digest": "sha256:e64ffd6183eaa7b73f8c0c133a645ced22212bca70c9609ad5f667cf3830aaae"
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"id": "release-flow",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
"path": "docs/release-flow.md",
|
|
246
246
|
"plane": "verify",
|
|
247
247
|
"exists": true,
|
|
248
|
-
"digest": "sha256:
|
|
248
|
+
"digest": "sha256:fc6495a7b5124c17c880777e16fc98e60ed7766ec9a958abfca3030bdc2c321e"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"id": "runtime-train-validation",
|
|
@@ -261,7 +261,7 @@
|
|
|
261
261
|
"path": "docs/versioning.md",
|
|
262
262
|
"plane": "why",
|
|
263
263
|
"exists": true,
|
|
264
|
-
"digest": "sha256:
|
|
264
|
+
"digest": "sha256:e856ec8aee11ff4bd2760425a8950538a91245cd5624c22c8768af50d6b1a8ce"
|
|
265
265
|
},
|
|
266
266
|
{
|
|
267
267
|
"id": "web-surface-deployments",
|
|
@@ -992,6 +992,20 @@
|
|
|
992
992
|
"capabilityGroup": "api-cli-reference",
|
|
993
993
|
"status": "active"
|
|
994
994
|
},
|
|
995
|
+
{
|
|
996
|
+
"id": "dev-merge-queue-governance",
|
|
997
|
+
"path": ".github/workflows/dev-merge-queue-governance.yml",
|
|
998
|
+
"reusable": false,
|
|
999
|
+
"inputs": [],
|
|
1000
|
+
"inputCount": 0,
|
|
1001
|
+
"secrets": [],
|
|
1002
|
+
"secretCount": 0,
|
|
1003
|
+
"outputs": [],
|
|
1004
|
+
"outputCount": 0,
|
|
1005
|
+
"surface": "repository-workflow",
|
|
1006
|
+
"capabilityGroup": "api-cli-reference",
|
|
1007
|
+
"status": "active"
|
|
1008
|
+
},
|
|
995
1009
|
{
|
|
996
1010
|
"id": "dev-pr-auto-merge",
|
|
997
1011
|
"path": ".github/workflows/dev-pr-auto-merge.yml",
|
package/docs/cli.md
CHANGED
|
@@ -208,6 +208,31 @@ required status checks from strict to loose, preserves the required check
|
|
|
208
208
|
identities, and is safe to repeat. `gh` must be authenticated with repository
|
|
209
209
|
Administration write permission for apply mode.
|
|
210
210
|
|
|
211
|
+
Repositories can make that policy declarative in `buildchain.toml`:
|
|
212
|
+
|
|
213
|
+
```toml
|
|
214
|
+
[governance.dev.merge_queue]
|
|
215
|
+
mode = "enabled" # enabled, inherit, or disabled
|
|
216
|
+
required_workflows = [".github/workflows/verify.yml"]
|
|
217
|
+
check_response_timeout_minutes = 120
|
|
218
|
+
max_entries_to_build = 1
|
|
219
|
+
bypass_users = ["release-owner"]
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Use `buildchain dev merge-queue --from-config` to resolve and reconcile the
|
|
223
|
+
declaration. `enabled` requires an exact queue on the target dev branch;
|
|
224
|
+
`disabled` suppresses automatic queue creation; `inherit` copies the active
|
|
225
|
+
default dev branch's queue parameters and bypass actors. When the table is
|
|
226
|
+
absent, release-line bootstrap uses the backward-compatible `inherit` mode.
|
|
227
|
+
Every inherited or explicitly enabled queue still validates each declared
|
|
228
|
+
required workflow before any mutation. For a legacy repository with no table,
|
|
229
|
+
an already-active exact queue on the current default dev branch is accepted as
|
|
230
|
+
the inheritance evidence; new declarations should list the workflows so future
|
|
231
|
+
changes are revalidated from source.
|
|
232
|
+
The `Dev Merge Queue Governance` workflow runs this reconciliation after
|
|
233
|
+
governance-relevant changes land on a dev branch; its manual dispatch remains
|
|
234
|
+
dry-run by default.
|
|
235
|
+
|
|
211
236
|
`buildchain release line open` plans or writes the first version-state commit
|
|
212
237
|
for a new semver minor line. It does not publish anything. The dry-run mode is
|
|
213
238
|
the default and returns the dev/alpha/release refs, protection contract, default
|
|
@@ -224,8 +249,9 @@ buildchain release line open \
|
|
|
224
249
|
The write mode only updates local version-state files. The repository workflow
|
|
225
250
|
`Release Line Bootstrap` wraps this command and, when `apply=true`, commits the
|
|
226
251
|
initial version state, creates `dev/vX/vX.Y`, `alpha/vX/vX.Y`, and
|
|
227
|
-
`release/vX/vX.Y`, applies one-review branch protection,
|
|
228
|
-
|
|
252
|
+
`release/vX/vX.Y`, applies one-review branch protection, reconciles declared or
|
|
253
|
+
inherited merge-queue governance, switches the default branch only after that
|
|
254
|
+
reconciliation succeeds, and opens the first dev-to-alpha channel PR:
|
|
229
255
|
|
|
230
256
|
```bash
|
|
231
257
|
buildchain release line open \
|
package/docs/release-flow.md
CHANGED
|
@@ -108,12 +108,17 @@ When the workflow is run with `apply=true`, Buildchain:
|
|
|
108
108
|
- applies branch protection with one approving review and the configured
|
|
109
109
|
required status check; dev starts strict, while alpha and release also require
|
|
110
110
|
the pair-specific `verify` aggregate without a source-up-to-date ancestry loop;
|
|
111
|
+
- reconciles the new dev branch's explicitly declared merge queue, or inherits
|
|
112
|
+
the exact queue parameters and bypass actors from the current default dev
|
|
113
|
+
branch when the policy is `inherit` or absent;
|
|
111
114
|
- switches the repository default branch to the new dev line when requested;
|
|
112
115
|
- opens the first `dev/v2/v2.10 -> alpha/v2/v2.10` channel PR when requested.
|
|
113
116
|
|
|
114
117
|
This makes minor-line creation a single audited operation. The channel PR still
|
|
115
118
|
goes through the normal verify/review/promotion path before an alpha is
|
|
116
|
-
published.
|
|
119
|
+
published. Queue reconciliation runs after branch protection and before the
|
|
120
|
+
default-branch switch, so a failed governance apply leaves the old active line
|
|
121
|
+
in place and the idempotently created new refs can be retried.
|
|
117
122
|
|
|
118
123
|
## Alpha Promotion
|
|
119
124
|
|
|
@@ -424,6 +424,22 @@ protection. The ruleset uses the first merge method that the repository itself
|
|
|
424
424
|
allows, and fails closed when the repository has no enabled merge method.
|
|
425
425
|
Re-running the command is idempotent.
|
|
426
426
|
|
|
427
|
+
The repository policy can be declared once instead of repeated as CLI flags:
|
|
428
|
+
|
|
429
|
+
```toml
|
|
430
|
+
[governance.dev.merge_queue]
|
|
431
|
+
mode = "inherit"
|
|
432
|
+
required_workflows = [".github/workflows/verify.yml"]
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
`enabled` explicitly requires Buildchain to create or update an exact-branch
|
|
436
|
+
queue; `inherit` copies queue parameters and bypass actors from the repository's
|
|
437
|
+
current default dev branch; `disabled` prevents automatic queue creation. An
|
|
438
|
+
absent declaration behaves as `inherit` during release-line bootstrap so a new
|
|
439
|
+
major or minor line does not silently lose governance already active on the
|
|
440
|
+
previous line. Required status-check identities still come from the new
|
|
441
|
+
branch's own classic protection rather than being copied from the old branch.
|
|
442
|
+
|
|
427
443
|
Merge-queue rules also reject generated post-publish version-state ref updates.
|
|
428
444
|
When the sealed promotion workflow uses a dedicated GitHub App, user, or team
|
|
429
445
|
already declared by release governance, repeat `--bypass-app`, `--bypass-user`,
|
package/docs/versioning.md
CHANGED
|
@@ -61,6 +61,7 @@ repository changes are patch".
|
|
|
61
61
|
|
|
62
62
|
| Date | Action | Line | Faces | Class | Rationale | PR |
|
|
63
63
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
64
|
+
| 2026-07-17 | extend-minor | `v2.14` | merge-queue-config, release-line-governance-inheritance | additive | Buildchain config can explicitly enable, inherit, or disable exact dev-channel merge queues, and release-line bootstrap reconciles the declared or inherited policy before moving the repository default branch. | |
|
|
64
65
|
| 2026-07-16 | open-minor | `v2.14` | dev-merge-queue-governance | additive | The public CLI adds a dry-run-first, idempotent merge-queue governance command that verifies required workflow event compatibility before applying an exact dev-channel ruleset and removing the strict up-to-date race. | |
|
|
65
66
|
| 2026-07-15 | open-minor | `v2.13` | artifact-verification-envelope, package-subpaths | additive | The public envelope seals exact artifact, provenance, identity, lifecycle, revocation, and existing KFD assessment roots into one consumer-ready KFX admission input, with a dedicated Node API export and fail-closed verifier. | |
|
|
66
67
|
| 2026-07-11 | open-minor | `v2.12` | channel-build-router, channel-selection-protocol | additive | The public `build.yml` reusable workflow lets consumers declare one build job while Buildchain selects generic major alpha for development/prerelease intent and stable major for production release intent, with explicit overrides, separate locks, and fail-closed ambiguity handling. | |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungfu-tech/buildchain",
|
|
3
|
-
"version": "2.14.2
|
|
3
|
+
"version": "2.14.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
|
|
6
6
|
"repository": "https://github.com/kungfu-systems/buildchain",
|
|
@@ -20,6 +20,7 @@ const SUPPORTED_PUBLISH_AUTH = new Set(["trusted-publishing", "npm-token"]);
|
|
|
20
20
|
const SUPPORTED_PUBLISH_KINDS = new Set(["npm-package", "npm-paper-package"]);
|
|
21
21
|
const SUPPORTED_PACKAGE_SET_ORDER = new Set(["as-provided", "platforms-first-main-last"]);
|
|
22
22
|
const SUPPORTED_STABLE_RELEASE_STRATEGIES = new Set(["manual", "latest-qualified-alpha"]);
|
|
23
|
+
const SUPPORTED_MERGE_QUEUE_MODES = new Set(["inherit", "enabled", "disabled"]);
|
|
23
24
|
const SUPPORTED_NATIVE_COMPILER_CACHE = new Set(["auto", "ccache", "sccache", "none"]);
|
|
24
25
|
const WEB_SURFACE_CHANNELS = ["preview", "staging", "production"];
|
|
25
26
|
const SUPPORTED_CHANNEL_VISIBILITY = new Set(["ephemeral", "protected", "public", "internal"]);
|
|
@@ -184,6 +185,9 @@ export function normalizeBuildchainConfig(config) {
|
|
|
184
185
|
if (normalized.release !== undefined) {
|
|
185
186
|
normalized.release = normalizeReleaseSection(normalized.release);
|
|
186
187
|
}
|
|
188
|
+
if (normalized.governance !== undefined) {
|
|
189
|
+
normalized.governance = normalizeGovernanceSection(normalized.governance);
|
|
190
|
+
}
|
|
187
191
|
if (normalized.channels !== undefined) {
|
|
188
192
|
normalized.channels = normalizeChannelsSection(normalized.channels, normalized.project);
|
|
189
193
|
}
|
|
@@ -219,6 +223,53 @@ export function normalizeBuildchainConfig(config) {
|
|
|
219
223
|
return normalized;
|
|
220
224
|
}
|
|
221
225
|
|
|
226
|
+
function normalizeGovernanceSection(governance) {
|
|
227
|
+
assertPlainObject(governance, "governance");
|
|
228
|
+
const normalized = { ...governance };
|
|
229
|
+
if (governance.dev !== undefined) {
|
|
230
|
+
assertPlainObject(governance.dev, "governance.dev");
|
|
231
|
+
normalized.dev = { ...governance.dev };
|
|
232
|
+
if (governance.dev.merge_queue !== undefined) {
|
|
233
|
+
const mergeQueue = assertPlainObject(governance.dev.merge_queue, "governance.dev.merge_queue");
|
|
234
|
+
const mode = mergeQueue.mode === undefined
|
|
235
|
+
? "inherit"
|
|
236
|
+
: assertString(mergeQueue.mode, "governance.dev.merge_queue.mode");
|
|
237
|
+
if (!SUPPORTED_MERGE_QUEUE_MODES.has(mode)) {
|
|
238
|
+
throw new Error("governance.dev.merge_queue.mode must be one of inherit, enabled, or disabled");
|
|
239
|
+
}
|
|
240
|
+
const checkResponseTimeoutMinutes = mergeQueue.check_response_timeout_minutes === undefined
|
|
241
|
+
? 120
|
|
242
|
+
: Number(mergeQueue.check_response_timeout_minutes);
|
|
243
|
+
const maxEntriesToBuild = mergeQueue.max_entries_to_build === undefined
|
|
244
|
+
? 1
|
|
245
|
+
: Number(mergeQueue.max_entries_to_build);
|
|
246
|
+
if (!Number.isInteger(checkResponseTimeoutMinutes) || checkResponseTimeoutMinutes < 1) {
|
|
247
|
+
throw new Error("governance.dev.merge_queue.check_response_timeout_minutes must be a positive integer");
|
|
248
|
+
}
|
|
249
|
+
if (!Number.isInteger(maxEntriesToBuild) || maxEntriesToBuild < 1) {
|
|
250
|
+
throw new Error("governance.dev.merge_queue.max_entries_to_build must be a positive integer");
|
|
251
|
+
}
|
|
252
|
+
normalized.dev = {
|
|
253
|
+
...governance.dev,
|
|
254
|
+
mergeQueue: {
|
|
255
|
+
mode,
|
|
256
|
+
requiredWorkflows: normalizeStringArray(
|
|
257
|
+
mergeQueue.required_workflows,
|
|
258
|
+
"governance.dev.merge_queue.required_workflows",
|
|
259
|
+
),
|
|
260
|
+
checkResponseTimeoutMinutes,
|
|
261
|
+
maxEntriesToBuild,
|
|
262
|
+
bypassApps: normalizeStringArray(mergeQueue.bypass_apps, "governance.dev.merge_queue.bypass_apps"),
|
|
263
|
+
bypassUsers: normalizeStringArray(mergeQueue.bypass_users, "governance.dev.merge_queue.bypass_users"),
|
|
264
|
+
bypassTeams: normalizeStringArray(mergeQueue.bypass_teams, "governance.dev.merge_queue.bypass_teams"),
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
delete normalized.dev.merge_queue;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return normalized;
|
|
271
|
+
}
|
|
272
|
+
|
|
222
273
|
function normalizeReleaseSection(release) {
|
|
223
274
|
assertPlainObject(release, "release");
|
|
224
275
|
const normalized = { ...release };
|
|
@@ -1451,6 +1502,7 @@ export function validateBuildchainConfig(
|
|
|
1451
1502
|
lifecycleStages,
|
|
1452
1503
|
publish: loadedConfig.config.publish,
|
|
1453
1504
|
release: loadedConfig.config.release,
|
|
1505
|
+
governance: loadedConfig.config.governance,
|
|
1454
1506
|
facts: loadedConfig.config.facts,
|
|
1455
1507
|
publication: loadedConfig.config.publication,
|
|
1456
1508
|
};
|
|
@@ -25,6 +25,7 @@ const DESCRIPTORS = Object.freeze([
|
|
|
25
25
|
[".github/workflows/buildchain-patrol.yml", "governance-write"],
|
|
26
26
|
[".github/workflows/buildchain-ref-promotion.yml", "governance-write"],
|
|
27
27
|
[".github/workflows/buildchain-stable-candidate-patrol.yml", "governance-write"],
|
|
28
|
+
[".github/workflows/dev-merge-queue-governance.yml", "governance-write"],
|
|
28
29
|
[".github/workflows/dev-pr-auto-merge.yml", "governance-write"],
|
|
29
30
|
[".github/workflows/npm-publish.yml", "dry-run-only"],
|
|
30
31
|
[".github/workflows/paper-release-sealed.yml", "product-publication", true, ["npm-publish", "github-release"], "trusted-publishing", "none", "fixed", "caller-bound"],
|
|
@@ -158,6 +158,8 @@ export function planReleaseLineBootstrap({
|
|
|
158
158
|
const alphaRef = `alpha/v${parsedMajor}/${line}`;
|
|
159
159
|
const releaseRef = `release/v${parsedMajor}/${line}`;
|
|
160
160
|
const loadedConfig = loadBuildchainConfig(cwd);
|
|
161
|
+
const declaredMergeQueue = loadedConfig?.config?.governance?.dev?.mergeQueue;
|
|
162
|
+
const mergeQueueMode = declaredMergeQueue?.mode || "inherit";
|
|
161
163
|
const versionFiles = discoverVersionStateFiles(cwd, loadedConfig);
|
|
162
164
|
const lifecycleVersionState =
|
|
163
165
|
getLifecycleStage(loadedConfig, "version-state") ||
|
|
@@ -201,22 +203,33 @@ export function planReleaseLineBootstrap({
|
|
|
201
203
|
enforceAdmins: true,
|
|
202
204
|
protectedRefs: [devRef, alphaRef, releaseRef],
|
|
203
205
|
},
|
|
206
|
+
governance: {
|
|
207
|
+
mergeQueue: {
|
|
208
|
+
declared: Boolean(declaredMergeQueue),
|
|
209
|
+
mode: mergeQueueMode,
|
|
210
|
+
source: mergeQueueMode === "inherit" ? "repository-default-branch" : "buildchain-config",
|
|
211
|
+
requiredWorkflows: declaredMergeQueue?.requiredWorkflows || [],
|
|
212
|
+
reconcileBeforeDefaultBranchSwitch: true,
|
|
213
|
+
},
|
|
214
|
+
},
|
|
204
215
|
repositoryActions: [
|
|
205
216
|
{ action: "create-or-verify-source-ref", ref: source },
|
|
206
217
|
{ action: "commit-initial-version-state", ref: branch, version: resolvedInitialVersion },
|
|
207
218
|
{ action: "create-dev-branch", ref: devRef, from: branch },
|
|
208
219
|
{ action: "create-alpha-branch", ref: alphaRef, from: source },
|
|
209
220
|
{ action: "create-release-branch", ref: releaseRef, from: source },
|
|
210
|
-
...(setDefault ? [{ action: "set-default-branch", ref: devRef }] : []),
|
|
211
221
|
{ action: "protect-branch", ref: devRef },
|
|
212
222
|
{ action: "protect-branch", ref: alphaRef },
|
|
213
223
|
{ action: "protect-branch", ref: releaseRef },
|
|
224
|
+
{ action: "reconcile-dev-merge-queue", ref: devRef, mode: mergeQueueMode },
|
|
225
|
+
...(setDefault ? [{ action: "set-default-branch", ref: devRef }] : []),
|
|
214
226
|
...(createAlphaPr ? [{ action: "open-alpha-pr", head: devRef, base: alphaRef }] : []),
|
|
215
227
|
],
|
|
216
228
|
notes: [
|
|
217
229
|
"This bootstrap creates the new minor line before the first alpha promotion.",
|
|
218
230
|
"The source ref stays as the baseline for alpha/release until reviewed channel PRs move them.",
|
|
219
231
|
"The dev branch receives only the initial version-state commit and becomes the active line when setDefault is true.",
|
|
232
|
+
"Merge queue governance is reconciled after branch protection and before the repository default branch moves.",
|
|
220
233
|
],
|
|
221
234
|
};
|
|
222
235
|
}
|