@kungfu-tech/buildchain 3.0.7 → 3.0.8
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/contracts/engineering-housekeeper-v1.schema.json +11 -1
- package/contracts/fixtures/engineering-housekeeper-v1/cases.json +10 -0
- package/contracts/release-cut-v1.schema.json +70 -0
- package/contracts/release-train-transition-v1.schema.json +85 -0
- package/contracts/release-train-v1.schema.json +82 -0
- package/dist/site/buildchain-contract.json +302 -16
- package/dist/site/buildchain-site.json +83 -27
- package/dist/site/capability-registry.json +4 -3
- package/dist/site/kfd-claims.json +45 -8
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +22 -6
- package/dist/site/node-api-registry.json +1218 -489
- package/dist/site/page-registry.json +65 -17
- package/dist/site/public-surface-audit.json +13 -8
- package/dist/site/publication-authority-registry.json +2 -4
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +1 -0
- package/dist/site/site-manifest.json +18 -10
- package/dist/site/workflow-registry.json +10 -9
- package/docs/MAP.md +1 -1
- package/docs/aws-us-elastic-runner-burst-plane.md +20 -7
- package/docs/engineering-housekeeper.md +61 -28
- package/docs/node-api-reference.md +109 -77
- package/docs/release-governance.md +13 -10
- package/docs/release-train.md +102 -0
- package/docs/reusable-build-surface.md +16 -6
- package/docs/site-bundle-contract.md +5 -1
- package/docs/versioning.md +1 -0
- package/package.json +2 -1
- package/packages/core/buildchain-agent-manuals.js +1 -0
- package/packages/core/buildchain-compatibility-proof.js +577 -0
- package/packages/core/buildchain-contract.js +46 -181
- package/packages/core/engineering-housekeeper-github-client.js +18 -1
- package/packages/core/engineering-housekeeper-github.js +247 -41
- package/packages/core/engineering-housekeeper.js +15 -0
- package/packages/core/release-train.js +520 -0
- package/scripts/aws-macos-jit-controller-core.mjs +33 -11
- package/scripts/aws-macos-jit-controller-runtime.mjs +208 -0
- package/scripts/aws-macos-jit-controller.mjs +50 -37
- package/scripts/aws-macos-jit-core.mjs +41 -3
- package/scripts/buildchain-contract-lock.mjs +6 -0
- package/scripts/dispatch-artifact-signing-authority.mjs +4 -7
- package/scripts/engineering-housekeeper-workflow.mjs +13 -6
- package/scripts/generate-site-bundle.mjs +2 -0
- package/scripts/site-capability-metadata.mjs +1 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"cliCommandCount": 114,
|
|
7
7
|
"workflowCount": 69,
|
|
8
8
|
"actionCount": 7,
|
|
9
|
-
"sitePageCount":
|
|
9
|
+
"sitePageCount": 71,
|
|
10
10
|
"docCommandRefCount": 924,
|
|
11
11
|
"failureCount": 0
|
|
12
12
|
},
|
|
@@ -2129,13 +2129,14 @@
|
|
|
2129
2129
|
"retained-patterns",
|
|
2130
2130
|
"stale-days",
|
|
2131
2131
|
"stale-pull-request-label",
|
|
2132
|
-
"target-branch"
|
|
2132
|
+
"target-branch",
|
|
2133
|
+
"temporary-branch-patterns"
|
|
2133
2134
|
],
|
|
2134
|
-
"inputCount":
|
|
2135
|
+
"inputCount": 14,
|
|
2135
2136
|
"secrets": [
|
|
2136
|
-
"
|
|
2137
|
-
"
|
|
2138
|
-
"
|
|
2137
|
+
"housekeeper_app_id",
|
|
2138
|
+
"housekeeper_app_private_key",
|
|
2139
|
+
"housekeeper_token"
|
|
2139
2140
|
],
|
|
2140
2141
|
"secretCount": 3,
|
|
2141
2142
|
"outputs": [
|
|
@@ -3323,6 +3324,10 @@
|
|
|
3323
3324
|
"id": "manual:release-tail-provider-plane",
|
|
3324
3325
|
"category": "manual"
|
|
3325
3326
|
},
|
|
3327
|
+
{
|
|
3328
|
+
"id": "manual:release-train",
|
|
3329
|
+
"category": "manual"
|
|
3330
|
+
},
|
|
3326
3331
|
{
|
|
3327
3332
|
"id": "manual:reusable-build-surface",
|
|
3328
3333
|
"category": "manual"
|
|
@@ -7988,8 +7993,8 @@
|
|
|
7988
7993
|
"workflowRegistryPath": "dist/site/workflow-registry.json",
|
|
7989
7994
|
"pageRegistryPath": "dist/site/page-registry.json",
|
|
7990
7995
|
"cliRegistryDigest": "e7b90e95dabcffb3fecb8e84cec48d7a99261c5e90732aff0ebc174b01c4e35c",
|
|
7991
|
-
"workflowRegistryDigest": "
|
|
7992
|
-
"pageRegistryDigest": "
|
|
7996
|
+
"workflowRegistryDigest": "964686c03a329b906a9f832d81c60eed8a50d2d2770b9b9f4ede2dbe32f9b98b",
|
|
7997
|
+
"pageRegistryDigest": "83e4701148132712b684efb1f474943752ad8371e60f598f162b553f504e987f"
|
|
7993
7998
|
},
|
|
7994
7999
|
"comparison": {
|
|
7995
8000
|
"missingCliRegistry": [],
|
|
@@ -1037,9 +1037,7 @@
|
|
|
1037
1037
|
},
|
|
1038
1038
|
{
|
|
1039
1039
|
"path": ".github/workflows/engineering-housekeeper.yml",
|
|
1040
|
-
"signals": [
|
|
1041
|
-
"write-permission"
|
|
1042
|
-
],
|
|
1040
|
+
"signals": [],
|
|
1043
1041
|
"classified": true
|
|
1044
1042
|
},
|
|
1045
1043
|
{
|
|
@@ -1189,5 +1187,5 @@
|
|
|
1189
1187
|
"classified": false
|
|
1190
1188
|
}
|
|
1191
1189
|
],
|
|
1192
|
-
"registryDigest": "
|
|
1190
|
+
"registryDigest": "26e5356238677038bda4efe2b91dbf3939270b31c65ff8a36bbdf0d3e5227913"
|
|
1193
1191
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-publication-release-registry",
|
|
4
|
-
"generatedAt": "2026-08-
|
|
5
|
-
"publishedAt": "2026-08-
|
|
4
|
+
"generatedAt": "2026-08-11T00:43:51.000Z",
|
|
5
|
+
"publishedAt": "2026-08-11T00:43:51.000Z",
|
|
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": "827fa0252c0546816c33ec89e66ca505ad6d5162",
|
|
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": "3.0.
|
|
35
|
+
"version": "3.0.8",
|
|
36
36
|
"versionSource": "package.json#version"
|
|
37
37
|
},
|
|
38
38
|
"sourceKind": "package-site-bundle",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"./kfd-gate": "./packages/core/kfd-gate.js",
|
|
52
52
|
"./release-candidate": "./packages/core/release-candidate.js",
|
|
53
53
|
"./release-candidate-recovery": "./packages/core/release-candidate-recovery.js",
|
|
54
|
+
"./release-train": "./packages/core/release-train.js",
|
|
54
55
|
"./stable-candidate-ledger": "./packages/core/stable-candidate-ledger.js",
|
|
55
56
|
"./release-passport": "./packages/core/release-passport.js",
|
|
56
57
|
"./release-passport-contract": "./packages/core/release-passport-contract.js",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"contract": "kungfu-buildchain-site-manifest",
|
|
4
|
-
"generatedAt": "2026-08-
|
|
5
|
-
"publishedAt": "2026-08-
|
|
4
|
+
"generatedAt": "2026-08-11T00:43:51.000Z",
|
|
5
|
+
"publishedAt": "2026-08-11T00:43:51.000Z",
|
|
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": "827fa0252c0546816c33ec89e66ca505ad6d5162",
|
|
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": "3.0.
|
|
40
|
+
"version": "3.0.8",
|
|
41
41
|
"versionSource": "package.json#version"
|
|
42
42
|
},
|
|
43
43
|
"entrypoint": "buildchain-site.json",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"path": "docs/MAP.md",
|
|
54
54
|
"plane": "use",
|
|
55
55
|
"exists": true,
|
|
56
|
-
"digest": "sha256:
|
|
56
|
+
"digest": "sha256:5292461118df2ec99a15411b6ed50c288abeb05d992677e3500b9bd46255a001"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"id": "getting-started",
|
|
@@ -127,6 +127,14 @@
|
|
|
127
127
|
"exists": true,
|
|
128
128
|
"digest": "sha256:d76bbd75aab3c4dd94756c1c64562a125e74369c7c8b97342dbcacc5d7561602"
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
"id": "release-train",
|
|
132
|
+
"title": "Release Train and Release Cut",
|
|
133
|
+
"path": "docs/release-train.md",
|
|
134
|
+
"plane": "verify",
|
|
135
|
+
"exists": true,
|
|
136
|
+
"digest": "sha256:550e50726ff479730bee1abe7839776308396bb01613e31a3ed6e898297619fa"
|
|
137
|
+
},
|
|
130
138
|
{
|
|
131
139
|
"id": "release-propagation",
|
|
132
140
|
"title": "Release propagation",
|
|
@@ -189,7 +197,7 @@
|
|
|
189
197
|
"path": "docs/site-bundle-contract.md",
|
|
190
198
|
"plane": "use",
|
|
191
199
|
"exists": true,
|
|
192
|
-
"digest": "sha256:
|
|
200
|
+
"digest": "sha256:371030eda56d7a968d037e8b9a348e0211038506b8c0b14c539ec790ce884945"
|
|
193
201
|
},
|
|
194
202
|
{
|
|
195
203
|
"id": "migration-inventory",
|
|
@@ -237,7 +245,7 @@
|
|
|
237
245
|
"path": "docs/node-api-reference.md",
|
|
238
246
|
"plane": "use",
|
|
239
247
|
"exists": true,
|
|
240
|
-
"digest": "sha256:
|
|
248
|
+
"digest": "sha256:34f39632494c0f4d4961fd79fc8ac94466da56c29f04f09e706f402d98ef125c"
|
|
241
249
|
},
|
|
242
250
|
{
|
|
243
251
|
"id": "build-facts",
|
|
@@ -277,7 +285,7 @@
|
|
|
277
285
|
"path": "docs/reusable-build-surface.md",
|
|
278
286
|
"plane": "use",
|
|
279
287
|
"exists": true,
|
|
280
|
-
"digest": "sha256:
|
|
288
|
+
"digest": "sha256:7f69bf3faf8c86b4af268f8e79d511f73de745e146a23809394074f816a372d7"
|
|
281
289
|
},
|
|
282
290
|
{
|
|
283
291
|
"id": "publish-transaction",
|
|
@@ -317,7 +325,7 @@
|
|
|
317
325
|
"path": "docs/release-governance.md",
|
|
318
326
|
"plane": "why",
|
|
319
327
|
"exists": true,
|
|
320
|
-
"digest": "sha256:
|
|
328
|
+
"digest": "sha256:150a6ceb40636838ed157abe11ae1dfe43f6447f01462a0238d343b9cf89fcb4"
|
|
321
329
|
},
|
|
322
330
|
{
|
|
323
331
|
"id": "release-flow",
|
|
@@ -341,7 +349,7 @@
|
|
|
341
349
|
"path": "docs/versioning.md",
|
|
342
350
|
"plane": "why",
|
|
343
351
|
"exists": true,
|
|
344
|
-
"digest": "sha256:
|
|
352
|
+
"digest": "sha256:6af44926f8138932aeb606bb264b19a40a273ce7bea7bad9b021bb9aa542d61b"
|
|
345
353
|
},
|
|
346
354
|
{
|
|
347
355
|
"id": "web-surface-deployments",
|
|
@@ -1953,7 +1953,7 @@
|
|
|
1953
1953
|
"status": "preview",
|
|
1954
1954
|
"owner": "buildchain-workflows",
|
|
1955
1955
|
"maturity": "preview",
|
|
1956
|
-
"introducedVersion": "3.0.
|
|
1956
|
+
"introducedVersion": "3.0.8",
|
|
1957
1957
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
1958
1958
|
"deprecationReplacement": "",
|
|
1959
1959
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -1974,7 +1974,7 @@
|
|
|
1974
1974
|
"status": "preview",
|
|
1975
1975
|
"owner": "buildchain-workflows",
|
|
1976
1976
|
"maturity": "preview",
|
|
1977
|
-
"introducedVersion": "3.0.
|
|
1977
|
+
"introducedVersion": "3.0.8",
|
|
1978
1978
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
1979
1979
|
"deprecationReplacement": "",
|
|
1980
1980
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -1995,7 +1995,7 @@
|
|
|
1995
1995
|
"status": "preview",
|
|
1996
1996
|
"owner": "buildchain-workflows",
|
|
1997
1997
|
"maturity": "preview",
|
|
1998
|
-
"introducedVersion": "3.0.
|
|
1998
|
+
"introducedVersion": "3.0.8",
|
|
1999
1999
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
2000
2000
|
"deprecationReplacement": "",
|
|
2001
2001
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
|
@@ -2018,13 +2018,14 @@
|
|
|
2018
2018
|
"retained-patterns",
|
|
2019
2019
|
"stale-days",
|
|
2020
2020
|
"stale-pull-request-label",
|
|
2021
|
-
"target-branch"
|
|
2021
|
+
"target-branch",
|
|
2022
|
+
"temporary-branch-patterns"
|
|
2022
2023
|
],
|
|
2023
|
-
"inputCount":
|
|
2024
|
+
"inputCount": 14,
|
|
2024
2025
|
"secrets": [
|
|
2025
|
-
"
|
|
2026
|
-
"
|
|
2027
|
-
"
|
|
2026
|
+
"housekeeper_app_id",
|
|
2027
|
+
"housekeeper_app_private_key",
|
|
2028
|
+
"housekeeper_token"
|
|
2028
2029
|
],
|
|
2029
2030
|
"secretCount": 3,
|
|
2030
2031
|
"outputs": [
|
|
@@ -2044,7 +2045,7 @@
|
|
|
2044
2045
|
"status": "preview",
|
|
2045
2046
|
"owner": "buildchain-workflows",
|
|
2046
2047
|
"maturity": "preview",
|
|
2047
|
-
"introducedVersion": "3.0.
|
|
2048
|
+
"introducedVersion": "3.0.8",
|
|
2048
2049
|
"compatibilityPromise": "preserved-through-the-v3-major-line",
|
|
2049
2050
|
"deprecationReplacement": "",
|
|
2050
2051
|
"sunsetCondition": "explicit-breaking-change-review-in-a-future-major-line",
|
package/docs/MAP.md
CHANGED
|
@@ -59,7 +59,7 @@ workflow, action, and Node API export also carries a `capabilityGroup`,
|
|
|
59
59
|
| Capability group | Primary facts | Primary manuals |
|
|
60
60
|
| --- | --- | --- |
|
|
61
61
|
| Getting Started | `capability-registry.json`, `product-mechanism.json` | [`getting-started.md`](getting-started.md), [`install.md`](install.md), [`product-mechanism.md`](product-mechanism.md), [`cli.md`](cli.md) |
|
|
62
|
-
| Release Passport and Trust | `release-model.json`, `artifact-schemas.json`, `publication-authority-registry.json`, `kfd-claims.json` | [`release-passport.md`](release-passport.md), [`github-artifact-attestation.md`](github-artifact-attestation.md), [`publication-authority.md`](publication-authority.md), [`release-candidate.md`](release-candidate.md), [`publish-transaction.md`](publish-transaction.md), [`release-tail-contract.md`](release-tail-contract.md), [`publication-rehearsal.md`](publication-rehearsal.md), [`binary-distribution.md`](binary-distribution.md) |
|
|
62
|
+
| Release Passport and Trust | `release-model.json`, `artifact-schemas.json`, `publication-authority-registry.json`, `kfd-claims.json` | [`release-passport.md`](release-passport.md), [`github-artifact-attestation.md`](github-artifact-attestation.md), [`publication-authority.md`](publication-authority.md), [`release-candidate.md`](release-candidate.md), [`release-train.md`](release-train.md), [`publish-transaction.md`](publish-transaction.md), [`release-tail-contract.md`](release-tail-contract.md), [`publication-rehearsal.md`](publication-rehearsal.md), [`binary-distribution.md`](binary-distribution.md) |
|
|
63
63
|
| Reusable Build and Lifecycle | `workflow-registry.json`, `controller-registry.json`, `release-model.json` | [`reusable-build-surface.md`](reusable-build-surface.md), [`controller-evidence.md`](controller-evidence.md), [`shifu-gate-profiles.md`](shifu-gate-profiles.md), [`lifecycle-protocol.md`](lifecycle-protocol.md) |
|
|
64
64
|
| KFD Trust and Surface Closure | `kfd-claims.json`, `public-surface-audit.json`, `cli-registry.json`, `node-api-registry.json` | [`kfd-support.md`](kfd-support.md), [`release-passport.md`](release-passport.md) |
|
|
65
65
|
| Site Bundle, Web Surfaces, and Propagation | `buildchain-site.json`, `site-manifest.json`, `page-registry.json`, `release-model.json` | [`site-bundle-contract.md`](site-bundle-contract.md), [`web-surface-deployments.md`](web-surface-deployments.md), [`release-propagation.md`](release-propagation.md) |
|
|
@@ -352,13 +352,21 @@ job must exercise the full native lifecycle.
|
|
|
352
352
|
|
|
353
353
|
AWS imposes a 24-hour minimum Dedicated Host allocation. The contract therefore
|
|
354
354
|
keeps the one host for at least 24 hours even if all three jobs finish earlier.
|
|
355
|
-
At the recorded USD 0.
|
|
356
|
-
|
|
355
|
+
At the recorded USD 0.65 hourly rate, the minimum commitment is USD 15.60. A
|
|
356
|
+
30-hour fail-closed ceiling is USD 19.50, below the dedicated
|
|
357
357
|
USD 25 budget. A ten-minute reaper terminates an expired campaign instance and
|
|
358
358
|
retries host release after the minimum allocation and Apple scrub constraints
|
|
359
359
|
allow it. Budget notifications at 80% and 95% invoke the same card-scoped kill
|
|
360
360
|
switch.
|
|
361
361
|
|
|
362
|
+
The launch controller defaults to `us-east-1` and admits only `us-east-2` as a
|
|
363
|
+
capacity fallback. The regions use mutually exclusive control-plane stacks and
|
|
364
|
+
one shared USD 25 Budget covering Virginia `HostUsage:mac2` and the AWS catalog
|
|
365
|
+
identity `USE2-HostUsage:mac2` for Ohio. A requested region, availability zone,
|
|
366
|
+
stack, and Budget must agree before allocation, and the controller checks both
|
|
367
|
+
regions against one global Host and instance ceiling; no other region is
|
|
368
|
+
accepted.
|
|
369
|
+
|
|
362
370
|
Qualification requires three trusted exact-source one-job JIT runs on the one
|
|
363
371
|
host, including at least one full run, plus proof that:
|
|
364
372
|
|
|
@@ -375,9 +383,13 @@ host, including at least one full run, plus proof that:
|
|
|
375
383
|
campaign. It has three explicit mutation modes:
|
|
376
384
|
|
|
377
385
|
- `launch-campaign` binds the exact repository source, AMI, availability zone,
|
|
378
|
-
tagged Dedicated Host, and reusable instance.
|
|
379
|
-
|
|
380
|
-
|
|
386
|
+
tagged Dedicated Host, and reusable instance. Before paid allocation it
|
|
387
|
+
verifies the exact AWS account, disabled GitHub workflow, complete control
|
|
388
|
+
plane stack, AWS-dimension-filtered USD 25 Budget, 80% and 95% SNS
|
|
389
|
+
subscribers, and zero pre-existing Mac capacity. Because AWS does not expose
|
|
390
|
+
a DryRun parameter for `AllocateHosts`, it requires an allowed IAM policy
|
|
391
|
+
simulation for the exact tagged allocation before the real call, then a
|
|
392
|
+
successful `RunInstances` DryRun before launching the instance.
|
|
381
393
|
- `run-job` binds one queued exact-source GitHub job to the existing campaign
|
|
382
394
|
host and instance. It writes the repository JIT configuration through a
|
|
383
395
|
mode-0600 temporary file into a distinct SSM SecureString, sends only the
|
|
@@ -392,8 +404,9 @@ campaign. It has three explicit mutation modes:
|
|
|
392
404
|
|
|
393
405
|
Every execute mode requires the exact source SHA and campaign id to be repeated
|
|
394
406
|
through `--confirm-source-sha` and `--confirm-campaign-id`. `run-job` also
|
|
395
|
-
requires `--confirm-run-id
|
|
396
|
-
|
|
407
|
+
requires `--confirm-run-id`; `launch-campaign` additionally requires the
|
|
408
|
+
expected workload account through `--account-id`. Omitting `--execute` emits a
|
|
409
|
+
deterministic plan without changing AWS or GitHub state.
|
|
397
410
|
|
|
398
411
|
## Provider lifecycle
|
|
399
412
|
|
|
@@ -15,9 +15,16 @@ last_reviewed: 2026-08-10
|
|
|
15
15
|
|
|
16
16
|
Engineering Housekeeper is a reusable GitHub workflow for evidence-backed
|
|
17
17
|
branch and pull-request hygiene. It inventories the complete GitHub branch and
|
|
18
|
-
open pull-request surfaces,
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
open pull-request surfaces, discovers the repository default branch and all
|
|
19
|
+
protected version/release mainlines, and produces a rooted plan. The reusable
|
|
20
|
+
workflow defaults to report-only execution; a repository may opt its scheduled
|
|
21
|
+
callers into unattended apply. It never closes pull requests and never deletes
|
|
22
|
+
a branch from its name alone.
|
|
23
|
+
|
|
24
|
+
Branch deletion uses a positive allowlist. Only `feature/**`, `fix/**`,
|
|
25
|
+
`chore/**`, `docs/**`, `ci/**`, and `refactor/**` are temporary development
|
|
26
|
+
families by default. Unknown families are inventoried and retained, even when
|
|
27
|
+
their heads are already ancestors of a mainline.
|
|
21
28
|
|
|
22
29
|
The reusable entrypoint is:
|
|
23
30
|
|
|
@@ -38,14 +45,28 @@ jobs:
|
|
|
38
45
|
contents: read
|
|
39
46
|
pull-requests: read
|
|
40
47
|
with:
|
|
41
|
-
target-branch: dev/v3/v3.0
|
|
42
48
|
mode: report
|
|
43
49
|
```
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
With no `target-branch`, the plan uses the repository default as its primary
|
|
52
|
+
target and discovers every provider-protected or protected-pattern-matching
|
|
53
|
+
mainline repository-wide. Each eligible temporary branch is bound to the exact
|
|
54
|
+
mainline OID that proves it merged. The plan also records every observed branch
|
|
55
|
+
and open pull request, each retain/delete/report/label decision, and stable
|
|
56
|
+
reason codes. The report receipt records dry-run outcomes and binds them to the
|
|
57
|
+
plan root.
|
|
58
|
+
|
|
59
|
+
To keep complete-repository patrols within normal GitHub API budgets, the
|
|
60
|
+
engine paginates closed pull requests once, indexes merged associations by the
|
|
61
|
+
exact source branch and OID, and then prioritizes the matching base without a
|
|
62
|
+
per-branch association request. Exact ancestry comparisons run with a fixed
|
|
63
|
+
maximum of eight concurrent requests while preserving deterministic branch
|
|
64
|
+
ordering. A temporary branch without an exact same-repository, same-name,
|
|
65
|
+
same-OID merged pull request association is retained and reported without
|
|
66
|
+
ancestry requests. The association is only a candidate selector: the source
|
|
67
|
+
OID must still be an ancestor of the selected mainline OID. This matches the
|
|
68
|
+
protected-mainline delivery contract and keeps ambiguous or direct historical
|
|
69
|
+
refs fail-closed.
|
|
49
70
|
|
|
50
71
|
## Apply mode
|
|
51
72
|
|
|
@@ -54,6 +75,8 @@ and `apply-enabled: true`; either value alone fails closed. Apply jobs consume
|
|
|
54
75
|
the uploaded exact plan, re-read provider state, and revalidate exact branch
|
|
55
76
|
and target OIDs, ancestry, protection, retention, active pull requests, rename
|
|
56
77
|
state, pull-request state, and staleness before each mutation.
|
|
78
|
+
These are reusable-workflow contract inputs, not an interactive approval step.
|
|
79
|
+
An unattended scheduled caller can set both values in committed policy.
|
|
57
80
|
|
|
58
81
|
```yaml
|
|
59
82
|
jobs:
|
|
@@ -63,7 +86,6 @@ jobs:
|
|
|
63
86
|
contents: write
|
|
64
87
|
pull-requests: write
|
|
65
88
|
with:
|
|
66
|
-
target-branch: dev/v3/v3.0
|
|
67
89
|
mode: apply
|
|
68
90
|
apply-enabled: true
|
|
69
91
|
stale-pull-request-label: stale-housekeeping
|
|
@@ -84,20 +106,21 @@ continue.
|
|
|
84
106
|
|
|
85
107
|
## Inputs and outputs
|
|
86
108
|
|
|
87
|
-
| Input
|
|
88
|
-
|
|
|
89
|
-
| `repository`
|
|
90
|
-
| `target-branch`
|
|
91
|
-
| `mode`
|
|
92
|
-
| `apply-enabled`
|
|
93
|
-
| `protected-patterns`
|
|
94
|
-
| `retained-patterns`
|
|
95
|
-
| `
|
|
96
|
-
| `stale-
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
100
|
-
| `buildchain-
|
|
109
|
+
| Input | Type | Default | Contract |
|
|
110
|
+
| --------------------------- | ------- | --------------------------- | --------------------------------------------------------------------------------- |
|
|
111
|
+
| `repository` | string | caller repository | Exact `owner/repo` target. |
|
|
112
|
+
| `target-branch` | string | empty | Optional primary target; empty discovers all protected mainlines repository-wide. |
|
|
113
|
+
| `mode` | string | `report` | `report` or `apply`. Other values fail. |
|
|
114
|
+
| `apply-enabled` | boolean | `false` | Required positive gate for `apply`. Invalid with `report`. |
|
|
115
|
+
| `protected-patterns` | string | version/release families | Comma or newline separated branch globs. |
|
|
116
|
+
| `retained-patterns` | string | train/authority families | Comma or newline separated retention globs. |
|
|
117
|
+
| `temporary-branch-patterns` | string | six development families | Positive allowlist; unmatched branch families are always retained. |
|
|
118
|
+
| `stale-days` | number | `30` | Positive stale pull-request age. |
|
|
119
|
+
| `stale-pull-request-label` | string | empty | Empty keeps pull requests report-only; non-empty permits labeling, never closure. |
|
|
120
|
+
| `max-actions` | number | `20` | Positive global apply limit. |
|
|
121
|
+
| `artifact-retention-days` | number | `30` | Retention for plan, report, and receipts. |
|
|
122
|
+
| `buildchain-repository` | string | `kungfu-systems/buildchain` | Runtime source repository. |
|
|
123
|
+
| `buildchain-ref` | string | `v3` | Runtime ref; trusted manual qualification may pass a train or exact SHA. |
|
|
101
124
|
|
|
102
125
|
Stable outputs are `plan-root`, `report-receipt-root`, optional
|
|
103
126
|
`branch-receipt-root` and `pull-request-receipt-root`, `action-count`,
|
|
@@ -131,8 +154,18 @@ Buildchain dogfoods the reusable contract through three thin callers:
|
|
|
131
154
|
- `engineering-housekeeper-weekly.yml` uses a 45-day window and a 20-action cap;
|
|
132
155
|
- `engineering-housekeeper-monthly.yml` uses a 60-day window and a 50-action cap.
|
|
133
156
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
157
|
+
All three schedules run unattended apply with repository-wide mainline
|
|
158
|
+
discovery. They delete only exact merged heads from the positive temporary
|
|
159
|
+
branch allowlist and automatically add `engineering-housekeeper:stale` to stale
|
|
160
|
+
open pull requests; they never close a pull request. Manual dispatch remains a
|
|
161
|
+
diagnostic interface, not a prerequisite for scheduled execution. Each caller
|
|
162
|
+
uses the exact scheduling commit as its runtime, so activation never waits for a
|
|
163
|
+
floating runtime ref to catch up. The callers contain schedules and policy
|
|
164
|
+
values only; inventory, planning, revalidation, mutation, evidence, and
|
|
165
|
+
authentication stay in the reusable workflow and its runtime.
|
|
166
|
+
|
|
167
|
+
If a deleted merged branch must be restored during artifact retention, use the
|
|
168
|
+
recorded `expectedHeadOid` and branch name from the rooted plan to recreate the
|
|
169
|
+
ref with a normal non-force push. A rejected or provider-error receipt means no
|
|
170
|
+
successful deletion should be inferred; re-run report mode against current
|
|
171
|
+
provider state before taking recovery action.
|