@kungfu-tech/buildchain 3.0.7 → 3.0.8-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 (45) hide show
  1. package/contracts/engineering-housekeeper-v1.schema.json +11 -1
  2. package/contracts/fixtures/engineering-housekeeper-v1/cases.json +10 -0
  3. package/contracts/release-cut-v1.schema.json +70 -0
  4. package/contracts/release-train-transition-v1.schema.json +85 -0
  5. package/contracts/release-train-v1.schema.json +82 -0
  6. package/dist/site/buildchain-contract.json +302 -16
  7. package/dist/site/buildchain-site.json +83 -27
  8. package/dist/site/capability-registry.json +4 -3
  9. package/dist/site/kfd-claims.json +45 -8
  10. package/dist/site/kfd-upstream-aggregate.json +1 -1
  11. package/dist/site/manual-registry.json +22 -6
  12. package/dist/site/node-api-registry.json +1218 -489
  13. package/dist/site/page-registry.json +65 -17
  14. package/dist/site/public-surface-audit.json +13 -8
  15. package/dist/site/publication-authority-registry.json +2 -4
  16. package/dist/site/publication-registry.json +4 -4
  17. package/dist/site/release-provenance.json +1 -0
  18. package/dist/site/site-manifest.json +18 -10
  19. package/dist/site/workflow-registry.json +10 -9
  20. package/docs/MAP.md +1 -1
  21. package/docs/aws-us-elastic-runner-burst-plane.md +20 -7
  22. package/docs/engineering-housekeeper.md +61 -28
  23. package/docs/node-api-reference.md +109 -77
  24. package/docs/release-governance.md +13 -10
  25. package/docs/release-train.md +102 -0
  26. package/docs/reusable-build-surface.md +16 -6
  27. package/docs/site-bundle-contract.md +5 -1
  28. package/docs/versioning.md +1 -0
  29. package/package.json +2 -1
  30. package/packages/core/buildchain-agent-manuals.js +1 -0
  31. package/packages/core/buildchain-compatibility-proof.js +577 -0
  32. package/packages/core/buildchain-contract.js +46 -181
  33. package/packages/core/engineering-housekeeper-github-client.js +18 -1
  34. package/packages/core/engineering-housekeeper-github.js +247 -41
  35. package/packages/core/engineering-housekeeper.js +15 -0
  36. package/packages/core/release-train.js +520 -0
  37. package/scripts/aws-macos-jit-controller-core.mjs +33 -11
  38. package/scripts/aws-macos-jit-controller-runtime.mjs +208 -0
  39. package/scripts/aws-macos-jit-controller.mjs +50 -37
  40. package/scripts/aws-macos-jit-core.mjs +41 -3
  41. package/scripts/buildchain-contract-lock.mjs +6 -0
  42. package/scripts/dispatch-artifact-signing-authority.mjs +4 -7
  43. package/scripts/engineering-housekeeper-workflow.mjs +13 -6
  44. package/scripts/generate-site-bundle.mjs +2 -0
  45. package/scripts/site-capability-metadata.mjs +1 -0
@@ -17,7 +17,12 @@
17
17
  },
18
18
  "policy": {
19
19
  "type": "object",
20
- "required": ["protectedPatterns", "retainedPatterns", "pullRequests"],
20
+ "required": [
21
+ "protectedPatterns",
22
+ "retainedPatterns",
23
+ "temporaryBranchPatterns",
24
+ "pullRequests"
25
+ ],
21
26
  "properties": {
22
27
  "protectedPatterns": {
23
28
  "type": "array",
@@ -29,6 +34,11 @@
29
34
  "items": { "type": "string" },
30
35
  "uniqueItems": true
31
36
  },
37
+ "temporaryBranchPatterns": {
38
+ "type": "array",
39
+ "items": { "type": "string" },
40
+ "uniqueItems": true
41
+ },
32
42
  "pullRequests": {
33
43
  "type": "object",
34
44
  "required": ["reportStale", "label", "autoClose"],
@@ -31,6 +31,16 @@
31
31
  "eligible": false,
32
32
  "reason": "branch.not-merged"
33
33
  },
34
+ {
35
+ "id": "unknown-family",
36
+ "branch": {
37
+ "name": "experiment/merged",
38
+ "ancestry": "ancestor",
39
+ "openPullRequestNumbers": []
40
+ },
41
+ "eligible": false,
42
+ "reason": "branch.not-temporary-development"
43
+ },
34
44
  {
35
45
  "id": "advanced",
36
46
  "revalidation": "head",
@@ -0,0 +1,70 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/release-cut-v1.schema.json",
4
+ "title": "Buildchain Release Cut v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "contract",
10
+ "repository",
11
+ "sourceBranch",
12
+ "targetBranch",
13
+ "originDevSha",
14
+ "candidateSha",
15
+ "candidateTreeSha",
16
+ "alphaBaseSha",
17
+ "buildchainRuntimeSha",
18
+ "generation",
19
+ "authorityRoots",
20
+ "supersession",
21
+ "createdAt",
22
+ "cutRoot"
23
+ ],
24
+ "properties": {
25
+ "schemaVersion": { "const": 1 },
26
+ "contract": { "const": "kungfu-buildchain-release-cut/v1" },
27
+ "repository": { "type": "string", "pattern": "^[^/\\s]+/[^/\\s]+$" },
28
+ "sourceBranch": { "type": "string", "minLength": 1 },
29
+ "targetBranch": { "type": "string", "minLength": 1 },
30
+ "originDevSha": { "$ref": "#/$defs/gitSha" },
31
+ "candidateSha": { "$ref": "#/$defs/gitSha" },
32
+ "candidateTreeSha": { "$ref": "#/$defs/gitSha" },
33
+ "alphaBaseSha": { "$ref": "#/$defs/gitSha" },
34
+ "buildchainRuntimeSha": { "$ref": "#/$defs/gitSha" },
35
+ "generation": { "type": "integer", "minimum": 1 },
36
+ "authorityRoots": {
37
+ "type": "array",
38
+ "minItems": 1,
39
+ "uniqueItems": true,
40
+ "items": { "$ref": "#/$defs/root" }
41
+ },
42
+ "supersession": {
43
+ "oneOf": [
44
+ { "type": "null" },
45
+ {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": ["cause", "priorCutRoot"],
49
+ "properties": {
50
+ "cause": {
51
+ "enum": [
52
+ "incompatible-semantics",
53
+ "alpha-base-incompatibility",
54
+ "invalid-authority",
55
+ "severe-security"
56
+ ]
57
+ },
58
+ "priorCutRoot": { "$ref": "#/$defs/root" }
59
+ }
60
+ }
61
+ ]
62
+ },
63
+ "createdAt": { "type": "string", "format": "date-time" },
64
+ "cutRoot": { "$ref": "#/$defs/root" }
65
+ },
66
+ "$defs": {
67
+ "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
68
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
69
+ }
70
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/release-train-transition-v1.schema.json",
4
+ "title": "Buildchain Release Train Transition v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "contract",
9
+ "trainRoot",
10
+ "expectedStateRoot",
11
+ "from",
12
+ "to",
13
+ "event",
14
+ "reason",
15
+ "authorityRoots",
16
+ "recordedAt",
17
+ "requestRoot",
18
+ "transitionRoot"
19
+ ],
20
+ "properties": {
21
+ "contract": { "const": "kungfu-buildchain-release-train-transition/v1" },
22
+ "trainRoot": { "$ref": "#/$defs/root" },
23
+ "expectedStateRoot": { "$ref": "#/$defs/root" },
24
+ "from": { "$ref": "#/$defs/state" },
25
+ "to": { "$ref": "#/$defs/state" },
26
+ "event": { "type": "string", "minLength": 1 },
27
+ "reason": { "type": "string", "minLength": 1 },
28
+ "authorityRoots": {
29
+ "type": "array",
30
+ "minItems": 1,
31
+ "uniqueItems": true,
32
+ "items": { "$ref": "#/$defs/root" }
33
+ },
34
+ "supersessionCause": { "$ref": "#/$defs/supersessionCause" },
35
+ "replacementCutRoot": { "$ref": "#/$defs/root" },
36
+ "replacementCandidateSha": { "$ref": "#/$defs/gitSha" },
37
+ "recordedAt": { "type": "string", "format": "date-time" },
38
+ "requestRoot": { "$ref": "#/$defs/root" },
39
+ "transitionRoot": { "$ref": "#/$defs/root" }
40
+ },
41
+ "allOf": [
42
+ {
43
+ "if": { "properties": { "to": { "const": "superseded" } } },
44
+ "then": {
45
+ "required": [
46
+ "supersessionCause",
47
+ "replacementCutRoot",
48
+ "replacementCandidateSha"
49
+ ]
50
+ },
51
+ "else": {
52
+ "not": {
53
+ "anyOf": [
54
+ { "required": ["supersessionCause"] },
55
+ { "required": ["replacementCutRoot"] },
56
+ { "required": ["replacementCandidateSha"] }
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ ],
62
+ "$defs": {
63
+ "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
64
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
65
+ "state": {
66
+ "enum": [
67
+ "preparing",
68
+ "building",
69
+ "repair-required",
70
+ "publication-blocked",
71
+ "publishable",
72
+ "superseded",
73
+ "terminal"
74
+ ]
75
+ },
76
+ "supersessionCause": {
77
+ "enum": [
78
+ "incompatible-semantics",
79
+ "alpha-base-incompatibility",
80
+ "invalid-authority",
81
+ "severe-security"
82
+ ]
83
+ }
84
+ }
85
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/release-train-v1.schema.json",
4
+ "title": "Buildchain Release Train v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "contract",
10
+ "releaseCut",
11
+ "trainRoot",
12
+ "state",
13
+ "transitions",
14
+ "observations"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": { "const": 1 },
18
+ "contract": { "const": "kungfu-buildchain-release-train/v1" },
19
+ "releaseCut": { "$ref": "release-cut-v1.schema.json" },
20
+ "trainRoot": { "$ref": "#/$defs/root" },
21
+ "state": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "required": [
25
+ "status",
26
+ "generation",
27
+ "priorStateRoot",
28
+ "transitionRoot",
29
+ "stateRoot"
30
+ ],
31
+ "properties": {
32
+ "status": { "$ref": "#/$defs/state" },
33
+ "generation": { "type": "integer", "minimum": 1 },
34
+ "priorStateRoot": { "$ref": "#/$defs/root" },
35
+ "transitionRoot": { "$ref": "#/$defs/root" },
36
+ "stateRoot": { "$ref": "#/$defs/root" }
37
+ }
38
+ },
39
+ "transitions": {
40
+ "type": "array",
41
+ "items": { "$ref": "release-train-transition-v1.schema.json" }
42
+ },
43
+ "observations": {
44
+ "type": "array",
45
+ "items": {
46
+ "type": "object",
47
+ "additionalProperties": false,
48
+ "required": [
49
+ "contract",
50
+ "trainRoot",
51
+ "observedDevSha",
52
+ "observedAt",
53
+ "observationRoot"
54
+ ],
55
+ "properties": {
56
+ "contract": {
57
+ "const": "kungfu-buildchain-release-train-observation/v1"
58
+ },
59
+ "trainRoot": { "$ref": "#/$defs/root" },
60
+ "observedDevSha": { "$ref": "#/$defs/gitSha" },
61
+ "observedAt": { "type": "string", "format": "date-time" },
62
+ "observationRoot": { "$ref": "#/$defs/root" }
63
+ }
64
+ }
65
+ }
66
+ },
67
+ "$defs": {
68
+ "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
69
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
70
+ "state": {
71
+ "enum": [
72
+ "preparing",
73
+ "building",
74
+ "repair-required",
75
+ "publication-blocked",
76
+ "publishable",
77
+ "superseded",
78
+ "terminal"
79
+ ]
80
+ }
81
+ }
82
+ }