@kungfu-tech/buildchain 3.0.5 → 3.0.6-alpha.0

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.
Files changed (83) hide show
  1. package/README.md +31 -0
  2. package/actions/macos-credential-island/README.md +8 -0
  3. package/bin/buildchain.mjs +1 -1
  4. package/contracts/auditable-demo-media-profiles-v1.json +61 -0
  5. package/contracts/auditable-demo-scenario-v1.schema.json +164 -0
  6. package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +3 -3
  7. package/contracts/evidence/auditable-demo-web-delivery-v1.json +3 -3
  8. package/dist/site/buildchain-contract.json +107 -26
  9. package/dist/site/buildchain-site.json +121 -49
  10. package/dist/site/capability-registry.json +3 -3
  11. package/dist/site/cli-registry.json +9 -3
  12. package/dist/site/controller-registry.json +27 -3
  13. package/dist/site/kfd-claims.json +101 -15
  14. package/dist/site/kfd-upstream-aggregate.json +1 -1
  15. package/dist/site/manual-registry.json +10 -9
  16. package/dist/site/node-api-registry.json +540 -31
  17. package/dist/site/page-registry.json +105 -29
  18. package/dist/site/public-surface-audit.json +184 -11
  19. package/dist/site/publication-authority-registry.json +62 -1
  20. package/dist/site/publication-registry.json +4 -4
  21. package/dist/site/site-manifest.json +13 -13
  22. package/dist/site/workflow-registry.json +118 -4
  23. package/docs/MAP.md +4 -1
  24. package/docs/auditable-demo.md +90 -7
  25. package/docs/aws-us-elastic-runner-burst-plane.md +151 -16
  26. package/docs/cli-reference.md +35 -2
  27. package/docs/dev-alpha-candidate-patrol.md +14 -5
  28. package/docs/dev-qualification-patrol.md +108 -0
  29. package/docs/node-api-reference.md +123 -72
  30. package/docs/publish-transaction.md +7 -5
  31. package/docs/release-flow.md +4 -0
  32. package/docs/release-governance.md +39 -0
  33. package/docs/release-propagation.md +93 -0
  34. package/docs/reusable-build-surface.md +53 -12
  35. package/docs/stable-candidate-patrol.md +5 -2
  36. package/package.json +1 -1
  37. package/packages/core/buildchain-contract.js +36 -1
  38. package/packages/core/buildchain-publication-authority.js +3 -0
  39. package/packages/core/public-surface-audit.js +4 -35
  40. package/packages/core/release-propagation-agent-entry.js +185 -0
  41. package/packages/core/release-propagation-pickup.js +387 -0
  42. package/packages/core/release-propagation-push.js +293 -0
  43. package/packages/core/release-propagation-release.js +61 -18
  44. package/packages/core/release-propagation-stage-evidence.js +36 -0
  45. package/packages/core/release-propagation-work.js +8 -4
  46. package/packages/core/release-propagation.js +27 -2
  47. package/packages/core/workflow-call-contract.js +308 -0
  48. package/packages/core/workflow-yaml-contract.js +272 -0
  49. package/scripts/artifact-signing-controller-core.mjs +525 -0
  50. package/scripts/artifact-signing-controller.mjs +302 -0
  51. package/scripts/artifact-signing-delegation.mjs +51 -3
  52. package/scripts/auditable-demo-platform.mjs +564 -0
  53. package/scripts/auditable-demo-renditions.mjs +7 -2
  54. package/scripts/auditable-demo-transport-smoke.mjs +176 -0
  55. package/scripts/auditable-demo.mjs +27 -21
  56. package/scripts/aws-macos-jit-controller-core.mjs +389 -0
  57. package/scripts/aws-macos-jit-controller-runtime.mjs +82 -0
  58. package/scripts/aws-macos-jit-controller.mjs +558 -0
  59. package/scripts/aws-macos-jit-job-controller.mjs +401 -0
  60. package/scripts/aws-windows-jit-campaign-core.mjs +296 -0
  61. package/scripts/aws-windows-jit-campaign.mjs +202 -0
  62. package/scripts/aws-windows-jit-controller-core.mjs +20 -2
  63. package/scripts/aws-windows-jit-controller.mjs +184 -109
  64. package/scripts/aws-windows-jit-core.mjs +21 -3
  65. package/scripts/aws-windows-jit.mjs +2 -0
  66. package/scripts/build-standalone-binary.mjs +6 -0
  67. package/scripts/buildchain-cli-help.mjs +2 -1
  68. package/scripts/capture-package-release-propagation.mjs +24 -1
  69. package/scripts/check-inventory.mjs +6 -0
  70. package/scripts/compiler-cache-evidence.mjs +90 -7
  71. package/scripts/dev-alpha-candidate-patrol.mjs +80 -5
  72. package/scripts/dev-pr-auto-merge.mjs +4 -4
  73. package/scripts/dev-qualification-patrol.mjs +594 -0
  74. package/scripts/dispatch-artifact-signing-authority.mjs +312 -61
  75. package/scripts/finalize-native-artifact-signing-result.mjs +37 -15
  76. package/scripts/generate-site-bundle.mjs +5 -0
  77. package/scripts/inspect-artifact-signing-requests.mjs +12 -0
  78. package/scripts/locked-source-checkout.mjs +17 -3
  79. package/scripts/release-propagation.mjs +150 -2
  80. package/scripts/run-lifecycle-core.mjs +25 -0
  81. package/scripts/site-capability-metadata.mjs +1 -1
  82. package/scripts/stable-candidate-patrol.mjs +30 -4
  83. package/scripts/workflow-call-contract.mjs +133 -0
package/README.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Buildchain
2
2
 
3
+ <!-- buildchain-auditable-demo:start -->
4
+ ## Buildchain beginner bootstrap
5
+
6
+ [![Buildchain beginner bootstrap](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/demo.gif)](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/public-evidence.json)
7
+
8
+ Animation scenario:
9
+
10
+ ```text
11
+ $ buildchain init --cwd ./starter --type package --package-manager npm
12
+ $ buildchain layout --cwd ./starter --json
13
+ $ buildchain version
14
+ ```
15
+
16
+ Native renditions: [1080p MP4](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/demo.mp4) · [1080p WebM](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/demo.webm) · [720p MP4](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/demo-720p.mp4) · [720p WebM](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/demo-720p.webm)
17
+
18
+ [Static poster / reduced-motion fallback](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/poster.png)
19
+
20
+ <details>
21
+ <summary>Evidence and claim boundary</summary>
22
+
23
+ This exact standalone-binary scenario proves deterministic local bootstrap behavior only; it does not grant release, repository, network, or production authority.
24
+
25
+ [Release Passport](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/release-passport.json) · [auditable evidence](docs/evidence/auditable-demo/f0413dc57e2b658fb75e82c4b7736ef87f4a573f6d6cbc1d690b52b723006492/beginner-bootstrap/public-evidence.json)
26
+
27
+ </details>
28
+ <!-- buildchain-auditable-demo:end -->
29
+
3
30
  <!-- buildchain:badges:start -->
4
31
 
5
32
  [![KFD-1: passed](https://buildchain.libkungfu.dev/badges/v1/kfd-1/passed.svg)](https://github.com/kungfu-systems/buildchain/releases/latest/download/buildchain.release.json)
@@ -277,6 +304,10 @@ The active reusable workflow surfaces are:
277
304
  qualification, transcript-bound renderer smoke, optional media rendering
278
305
  from the exact passing Gate bundle, and opt-in content-addressed web-delivery
279
306
  profiles with independently verified rendition roles;
307
+ - `.github/workflows/.declarative-auditable-demo.yml` for standalone binary
308
+ consumers that provide only a versioned multi-demo argv scenario and exact
309
+ same-run binary artifact coordinates; Buildchain owns isolated native
310
+ capture, Gate, Release Passport, materialization, and protected README PRs;
280
311
  - `.github/workflows/.build.yml` for deterministic multi-platform build and
281
312
  artifact contracts;
282
313
  - `.github/workflows/build.yml` for the single-config channel router that uses
@@ -7,6 +7,14 @@ exact Developer ID Application identity into a temporary keychain, signs the
7
7
  application, submits Apple notarization, staples the application and DMG,
8
8
  verifies Gatekeeper, and writes bounded JSON evidence.
9
9
 
10
+ DMG assembly uses a unique execution- and attempt-bound image path and volume
11
+ name. Only the exact `hdiutil: create failed - Resource busy` failure is retried,
12
+ with three attempts and a total retry delay of seven seconds. Certificate,
13
+ entitlement, signature, notarization, provenance, and policy failures remain
14
+ terminal. Attempt artifacts stay below the owned temporary root, and successful
15
+ evidence binds the request, unsigned archive, runtime, runner attempt, toolchain,
16
+ retry history, cleanup result, and signed output digests.
17
+
10
18
  The reusable Buildchain workflow invokes this action from a job bound to the
11
19
  caller's protected GitHub Environment. The job downloads the exact sealed
12
20
  Buildchain input and immutable action runtime, then uploads the signed payload
@@ -1623,7 +1623,7 @@ async function handlePaperCommand(args) {
1623
1623
  }
1624
1624
 
1625
1625
  async function handleReleasePropagationCommand(args) {
1626
- runReleasePropagationCli(args);
1626
+ await runReleasePropagationCli(args);
1627
1627
  return;
1628
1628
 
1629
1629
  }
@@ -246,6 +246,67 @@
246
246
  "responsive-alternate-video"
247
247
  ]
248
248
  },
249
+ "responsive-long-form-web-delivery-v1": {
250
+ "extends": "responsive-web-delivery-v1",
251
+ "mode": "web-delivery",
252
+ "renditions": [
253
+ {
254
+ "path": "demo.gif",
255
+ "maximumBytes": 8388608,
256
+ "budgetBasis": {
257
+ "evidence": "contracts/evidence/auditable-demo-web-delivery-v1.json",
258
+ "observedPath": "demo.gif",
259
+ "observedBytes": 40826,
260
+ "multiplier": 128,
261
+ "rounding": "next-power-of-two"
262
+ }
263
+ },
264
+ {
265
+ "path": "demo.mp4",
266
+ "maximumBytes": 4194304,
267
+ "budgetBasis": {
268
+ "evidence": "contracts/evidence/auditable-demo-web-delivery-v1.json",
269
+ "observedPath": "demo.mp4",
270
+ "observedBytes": 27038,
271
+ "multiplier": 128,
272
+ "rounding": "next-power-of-two"
273
+ }
274
+ },
275
+ {
276
+ "path": "demo.webm",
277
+ "maximumBytes": 4194304,
278
+ "budgetBasis": {
279
+ "evidence": "contracts/evidence/auditable-demo-web-delivery-v1.json",
280
+ "observedPath": "demo.webm",
281
+ "observedBytes": 23383,
282
+ "multiplier": 128,
283
+ "rounding": "next-power-of-two"
284
+ }
285
+ },
286
+ {
287
+ "path": "demo-720p.mp4",
288
+ "maximumBytes": 4194304,
289
+ "budgetBasis": {
290
+ "evidence": "contracts/evidence/auditable-demo-web-delivery-v1.json",
291
+ "observedPath": "demo.mp4",
292
+ "observedBytes": 27038,
293
+ "multiplier": 128,
294
+ "rounding": "next-power-of-two"
295
+ }
296
+ },
297
+ {
298
+ "path": "demo-720p.webm",
299
+ "maximumBytes": 4194304,
300
+ "budgetBasis": {
301
+ "evidence": "contracts/evidence/auditable-demo-web-delivery-v1.json",
302
+ "observedPath": "demo.webm",
303
+ "observedBytes": 23383,
304
+ "multiplier": 128,
305
+ "rounding": "next-power-of-two"
306
+ }
307
+ }
308
+ ]
309
+ },
249
310
  "site-hero-v1": {
250
311
  "extends": "web-delivery-v1",
251
312
  "mode": "web-delivery",
@@ -0,0 +1,164 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/contracts/auditable-demo-scenario-v1.schema.json",
4
+ "title": "Buildchain declarative binary auditable demo",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema", "product", "artifact", "execution", "renditions", "demos", "publication", "authority"],
8
+ "properties": {
9
+ "schema": {"const": "buildchain.declarative-binary-demo/v1"},
10
+ "product": {
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["id", "displayName", "binaryName"],
14
+ "properties": {
15
+ "id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"},
16
+ "displayName": {"type": "string", "minLength": 1, "maxLength": 80},
17
+ "binaryName": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"}
18
+ }
19
+ },
20
+ "artifact": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["platformId", "binaryPath", "metadataPath", "metadataContract", "runtimeDependencies"],
24
+ "properties": {
25
+ "platformId": {"const": "linux-x64"},
26
+ "binaryPath": {"type": "string", "minLength": 1},
27
+ "metadataPath": {"type": "string", "minLength": 1},
28
+ "metadataContract": {"type": "string", "minLength": 1},
29
+ "runtimeDependencies": {"type": "array", "maxItems": 0}
30
+ }
31
+ },
32
+ "execution": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "required": ["deterministic", "network", "secrets", "totalTimeoutSeconds", "environment"],
36
+ "properties": {
37
+ "deterministic": {"const": true},
38
+ "network": {"const": "none"},
39
+ "secrets": {"const": "none"},
40
+ "durationClass": {"type": "string", "enum": ["standard", "long-form"]},
41
+ "totalTimeoutSeconds": {"type": "integer", "minimum": 1},
42
+ "environment": {
43
+ "type": "object",
44
+ "propertyNames": {"pattern": "^[A-Z][A-Z0-9_]{0,63}$"},
45
+ "additionalProperties": {"type": "string", "maxLength": 256}
46
+ }
47
+ }
48
+ },
49
+ "transportSmoke": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["argv", "timeoutSeconds", "expectedExitCodes", "stdoutIncludes"],
53
+ "properties": {
54
+ "argv": {"type": "array", "minItems": 1, "maxItems": 64, "items": {"type": "string", "maxLength": 512}},
55
+ "timeoutSeconds": {"type": "integer", "minimum": 1, "maximum": 60},
56
+ "expectedExitCodes": {"type": "array", "minItems": 1, "maxItems": 4, "items": {"type": "integer", "minimum": 0, "maximum": 255}},
57
+ "stdoutIncludes": {"type": "array", "maxItems": 32, "items": {"type": "string", "minLength": 1, "maxLength": 256}}
58
+ }
59
+ },
60
+ "renditions": {
61
+ "const": [
62
+ {"id": "1080p", "role": "primary", "columns": 150, "rows": 36, "width": 1920, "height": 1080},
63
+ {"id": "720p", "role": "responsive", "columns": 100, "rows": 28, "width": 1280, "height": 720}
64
+ ]
65
+ },
66
+ "demos": {
67
+ "type": "array",
68
+ "minItems": 1,
69
+ "maxItems": 8,
70
+ "items": {
71
+ "type": "object",
72
+ "additionalProperties": false,
73
+ "required": ["id", "title", "claimBoundary", "steps"],
74
+ "properties": {
75
+ "id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"},
76
+ "title": {"type": "string", "minLength": 1, "maxLength": 120},
77
+ "claimBoundary": {"type": "string", "minLength": 1, "maxLength": 500},
78
+ "steps": {
79
+ "type": "array",
80
+ "minItems": 1,
81
+ "maxItems": 12,
82
+ "items": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["id", "argv", "timeoutSeconds", "expectedExitCodes", "stdoutIncludes", "fileAssertions"],
86
+ "properties": {
87
+ "id": {"type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$"},
88
+ "argv": {"type": "array", "minItems": 1, "maxItems": 64, "items": {"type": "string", "maxLength": 512}},
89
+ "timeoutSeconds": {"type": "integer", "minimum": 1, "maximum": 180},
90
+ "expectedExitCodes": {"type": "array", "minItems": 1, "maxItems": 4, "items": {"type": "integer", "minimum": 0, "maximum": 255}},
91
+ "stdoutIncludes": {"type": "array", "maxItems": 32, "items": {"type": "string", "minLength": 1, "maxLength": 256}},
92
+ "fileAssertions": {
93
+ "type": "array",
94
+ "maxItems": 32,
95
+ "items": {
96
+ "type": "object",
97
+ "additionalProperties": false,
98
+ "required": ["path", "jsonEquals"],
99
+ "properties": {
100
+ "path": {"type": "string", "minLength": 1},
101
+ "jsonEquals": {"type": "object"}
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "publication": {
112
+ "type": "object",
113
+ "additionalProperties": false,
114
+ "required": ["evidencePath", "readmePath", "marker"],
115
+ "properties": {
116
+ "evidencePath": {"type": "string", "minLength": 1},
117
+ "readmePath": {"type": "string", "minLength": 1},
118
+ "marker": {"type": "string", "pattern": "^[a-z0-9][a-z0-9._:-]{0,79}$"}
119
+ }
120
+ },
121
+ "authority": {
122
+ "type": "object",
123
+ "additionalProperties": false,
124
+ "required": ["grants", "nonAuthorities"],
125
+ "properties": {
126
+ "grants": {"type": "array", "maxItems": 0},
127
+ "nonAuthorities": {"type": "array", "minItems": 8, "uniqueItems": true, "items": {"type": "string"}}
128
+ }
129
+ }
130
+ },
131
+ "allOf": [
132
+ {
133
+ "if": {
134
+ "properties": {
135
+ "execution": {
136
+ "required": ["durationClass"],
137
+ "properties": {"durationClass": {"const": "long-form"}}
138
+ }
139
+ }
140
+ },
141
+ "then": {
142
+ "properties": {
143
+ "execution": {"properties": {"totalTimeoutSeconds": {"maximum": 180}}}
144
+ }
145
+ },
146
+ "else": {
147
+ "properties": {
148
+ "execution": {"properties": {"totalTimeoutSeconds": {"maximum": 60}}},
149
+ "demos": {
150
+ "items": {
151
+ "properties": {
152
+ "steps": {
153
+ "items": {
154
+ "properties": {"timeoutSeconds": {"maximum": 60}}
155
+ }
156
+ }
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ }
163
+ ]
164
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "evidenceRoot": "sha256:5bebb7ca41b7b509d63293c3c363fbff917d188fe1d6ae19a73d33424ea623ed",
2
+ "evidenceRoot": "sha256:30417309facd1092631fd1bd3a104c3ec1f607c3310a61814b27d2145448ec36",
3
3
  "inputs": {
4
4
  "complete-transcript.txt": "sha256:3cc1fc8a46d47fad052143b54ab261f08d007403c4ec00eba37b0a733f7cc615",
5
5
  "public-projection.json": "sha256:c5d5ec702189d2e6eed17419f2fd9a659c1b4cbcf7ee1a58ac8507ec2a748180",
@@ -14,12 +14,12 @@
14
14
  "production-site-deployment"
15
15
  ],
16
16
  "profile": {
17
- "catalogRoot": "sha256:cf885ac31104a36aa051fb62f47dd79b68bd671f7dfeeb1a458ea7d0cbf0c479",
17
+ "catalogRoot": "sha256:87578237079330ac2843113af2baff63031dc1363dba43cf3a59127ed2d255a2",
18
18
  "id": "responsive-web-delivery-v1",
19
19
  "mode": "web-delivery",
20
20
  "profileRoot": "sha256:fdbda001970304af935f58af11ccfdb7c32ec466c9dd487cbb81ee1b19dc4556"
21
21
  },
22
- "qualificationRoot": "sha256:1c588662db5abcc6776a43b3210f43555161b55ddf8aa4aa4530371bc1d26ec8",
22
+ "qualificationRoot": "sha256:b18547f31c6b00da9215021b6d54197cbda5fbb5dcb30a633161624b8d8d8af1",
23
23
  "renditions": [
24
24
  {
25
25
  "audioStreams": 0,
@@ -1,5 +1,5 @@
1
1
  {
2
- "evidenceRoot": "sha256:5a4fced32999b3007628dfaee32206b0f7512032e65fd57be455e59df2f5d877",
2
+ "evidenceRoot": "sha256:6875cf065ccafda0127c57a17bc81f0f999fb543341e82072bc9b89f0c7a6f0a",
3
3
  "inputs": {
4
4
  "complete-transcript.txt": "sha256:f3723a3eda614134ab724ce9fbe1e0e5f916d809a8a3096f5e37c1458cb3656c",
5
5
  "public-projection.json": "sha256:127f9877f9750a85eada4338f088bee5460c5c71a83302652d3321667002c3c7",
@@ -14,12 +14,12 @@
14
14
  "production-site-deployment"
15
15
  ],
16
16
  "profile": {
17
- "catalogRoot": "sha256:cf885ac31104a36aa051fb62f47dd79b68bd671f7dfeeb1a458ea7d0cbf0c479",
17
+ "catalogRoot": "sha256:87578237079330ac2843113af2baff63031dc1363dba43cf3a59127ed2d255a2",
18
18
  "id": "web-delivery-v1",
19
19
  "mode": "web-delivery",
20
20
  "profileRoot": "sha256:b6fb0a83414d03a7222fc50429e60ed68b6d47758b86ceaa316ecc659a01ae2b"
21
21
  },
22
- "qualificationRoot": "sha256:a8509982ce43c133ef50bbb651bdba07b5b37bed06841ebb165f23b81e3b9fc1",
22
+ "qualificationRoot": "sha256:d8b30192c848ba1c7f6e9a59b5dd1c9f38aae835bb94ad05ad55cdad4b6a8a2f",
23
23
  "renditions": [
24
24
  {
25
25
  "audioStreams": 0,