@kungfu-tech/buildchain 4.0.1-alpha.3 → 4.0.1-alpha.5

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 (95) hide show
  1. package/architecture/decisions/0002-next-development-transition.md +101 -0
  2. package/architecture/internal-capabilities.json +52 -3
  3. package/architecture/maintainability-policy.json +22 -10
  4. package/architecture/v3-core-mechanism-inventory.json +89 -0
  5. package/architecture/v4-capability-state-machine-manifest.json +73 -0
  6. package/architecture/v4-compatibility-facts-parity.json +77 -0
  7. package/architecture/v4-delivery-warrant-shadow-fixtures.json +15 -6
  8. package/architecture/v4-next-development-parity.json +192 -0
  9. package/architecture/v4-release-train-parity.json +1 -0
  10. package/architecture/v4-tail-reseal-parity.json +150 -0
  11. package/bin/buildchain.mjs +16 -1
  12. package/bin/internal/command-registry.mjs +2 -0
  13. package/bin/internal/compatibility-facts-cli.mjs +101 -0
  14. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
  15. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
  16. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
  17. package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
  18. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +7 -1
  19. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
  20. package/contracts/next-development-request-v1.schema.json +66 -0
  21. package/contracts/next-development-transition-v1.schema.json +292 -0
  22. package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
  23. package/contracts/v4-tail-reseal-v1.schema.json +276 -0
  24. package/dist/site/agent-index.json +1 -0
  25. package/dist/site/artifact-schemas.json +2 -0
  26. package/dist/site/buildchain-contract.json +1388 -23
  27. package/dist/site/buildchain-site.json +259 -21
  28. package/dist/site/capability-registry.json +10 -8
  29. package/dist/site/cli-registry.json +106 -0
  30. package/dist/site/kfd-claims.json +187 -12
  31. package/dist/site/kfd-upstream-aggregate.json +1 -1
  32. package/dist/site/manual-registry.json +35 -4
  33. package/dist/site/node-api-registry.json +6578 -4492
  34. package/dist/site/page-registry.json +235 -13
  35. package/dist/site/public-surface-audit.json +241 -7
  36. package/dist/site/publication-authority-registry.json +6 -1
  37. package/dist/site/publication-registry.json +4 -4
  38. package/dist/site/release-provenance.json +7 -0
  39. package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
  40. package/dist/site/site-manifest.json +24 -8
  41. package/dist/site/workflow-registry.json +36 -4
  42. package/docs/MAP.md +4 -1
  43. package/docs/cli-reference.md +125 -0
  44. package/docs/dev-alpha-candidate-patrol.md +8 -0
  45. package/docs/dev-delivery-warrant.md +8 -4
  46. package/docs/next-development-transition.md +118 -0
  47. package/docs/node-api-reference.md +256 -123
  48. package/docs/v4-compatibility-facts.md +91 -0
  49. package/docs/v4-tail-reseal.md +73 -0
  50. package/docs/versioning.md +4 -3
  51. package/package.json +14 -5
  52. package/packages/core/buildchain-agent-manuals.js +2 -0
  53. package/packages/core/buildchain-compatibility-authority.js +336 -0
  54. package/packages/core/buildchain-compatibility-fact.js +394 -0
  55. package/packages/core/buildchain-compatibility-facts.json +217 -0
  56. package/packages/core/buildchain-compatibility-proof.js +566 -0
  57. package/packages/core/buildchain-contract.js +93 -141
  58. package/packages/core/channel-candidate.js +8 -0
  59. package/packages/core/channel-promotion-baseline.js +55 -0
  60. package/packages/core/dev-alpha-candidate-selection.js +10 -2
  61. package/packages/core/dev-delivery-execution-transfer.js +21 -1
  62. package/packages/core/dev-delivery-process-boundary.js +19 -7
  63. package/packages/core/dev-delivery-provider-heartbeat.js +18 -6
  64. package/packages/core/dev-delivery-warrant-state.js +4 -5
  65. package/packages/core/dev-delivery-warrant.js +1 -0
  66. package/packages/core/kungfu-temporal-fact.js +557 -0
  67. package/packages/core/next-development-candidate-reservation.js +186 -0
  68. package/packages/core/next-development-controller.js +728 -0
  69. package/packages/core/next-development-projection.js +287 -0
  70. package/packages/core/next-development-transition.js +738 -0
  71. package/packages/core/paper-agent-entry.js +11 -5
  72. package/packages/core/paper.js +16 -5
  73. package/packages/core/v4-canonical-contracts.js +5 -0
  74. package/packages/core/v4-floating-consumer-policy.js +29 -9
  75. package/packages/core/v4-tail-reseal-contract.js +26 -0
  76. package/packages/core/v4-tail-reseal-github.js +178 -0
  77. package/packages/core/v4-tail-reseal-receipt.js +225 -0
  78. package/packages/core/v4-tail-reseal.js +594 -0
  79. package/scripts/buildchain-cli-help.mjs +20 -0
  80. package/scripts/check-inventory.mjs +11 -0
  81. package/scripts/check-v4-floating-consumer-policy-contract.mjs +1 -1
  82. package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
  83. package/scripts/dev-pr-auto-merge.mjs +1 -1
  84. package/scripts/generate-next-development-guidance.mjs +49 -0
  85. package/scripts/generate-site-bundle.mjs +16 -3
  86. package/scripts/init-repo.mjs +22 -4
  87. package/scripts/next-development-self-dogfood-harness.mjs +460 -0
  88. package/scripts/next-development-self-dogfood.mjs +597 -0
  89. package/scripts/next-development-transition.mjs +47 -0
  90. package/scripts/release-train-self-dogfood.mjs +94 -92
  91. package/scripts/site-capability-metadata.mjs +12 -0
  92. package/scripts/v4-consumer-policy.mjs +1 -5
  93. package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
  94. package/scripts/v4-tail-reseal.mjs +416 -0
  95. package/templates/native-dev-delivery.yml +2 -0
@@ -42,7 +42,13 @@
42
42
  "id": "stale-selected-lock",
43
43
  "selector": "v4-alpha",
44
44
  "stale": "alpha",
45
- "expectedCode": "selected-lock-runtime-mismatch"
45
+ "expected": "passed"
46
+ },
47
+ {
48
+ "id": "breaking-selected-lock",
49
+ "selector": "v4-alpha",
50
+ "breaking": "alpha",
51
+ "expectedCode": "selected-lock-runtime-incompatible"
46
52
  },
47
53
  {
48
54
  "id": "nested-composite-exact-sha",
@@ -0,0 +1,229 @@
1
+ {
2
+ "schema": "kungfu-buildchain-v4-tail-reseal-request/v1",
3
+ "evaluatedAt": "2026-08-15T04:00:00.000Z",
4
+ "repository": "kungfu-systems/product",
5
+ "source": {
6
+ "runId": 4101,
7
+ "runAttempt": 1,
8
+ "sha": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9
+ "treeSha": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
10
+ "sourceRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
11
+ "workflowFile": "build.yml",
12
+ "workflowName": "Build"
13
+ },
14
+ "target": {
15
+ "channel": "alpha",
16
+ "ref": "alpha/v4/v4.0",
17
+ "baseSha": "cccccccccccccccccccccccccccccccccccccccc",
18
+ "version": "4.0.0-alpha.2"
19
+ },
20
+ "runtime": {
21
+ "repository": "kungfu-systems/buildchain",
22
+ "ref": "v4-alpha",
23
+ "sha": "dddddddddddddddddddddddddddddddddddddddd",
24
+ "contractRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
25
+ "consumerPolicyReceiptRoot": "sha256:2c4a55af9d551eb5116894f2b28e38542fa9d45c904147c374784c8eabc70275"
26
+ },
27
+ "warrant": {
28
+ "candidateId": "candidate-alpha-2",
29
+ "generation": 7,
30
+ "fencingToken": "warrant-generation-7",
31
+ "status": "qualified",
32
+ "lineageRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
33
+ "qualificationRoot": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
34
+ "stateReadbackRoot": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
35
+ },
36
+ "retention": {
37
+ "status": "retained",
38
+ "retainUntil": "2026-08-18T04:00:00.000Z",
39
+ "policyRoot": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
40
+ "readbackRoot": "sha256:8888888888888888888888888888888888888888888888888888888888888888"
41
+ },
42
+ "failure": {
43
+ "platformId": "macos-arm64",
44
+ "stage": "signing-finalization",
45
+ "jobId": 7104,
46
+ "jobName": "build / Finalize signed artifact macOS ARM64",
47
+ "stepName": "Recompute manifest over final signed bytes",
48
+ "code": "macos-pax-finalization",
49
+ "evidenceRoot": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
50
+ },
51
+ "stageResume": {
52
+ "planRoot": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
53
+ "qualificationRoot": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
54
+ "zeroEffectReuse": true,
55
+ "decisions": [
56
+ {
57
+ "stageKey": "linux-arm64:build",
58
+ "decision": "reuse",
59
+ "capsuleRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
60
+ "evidenceRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444"
61
+ },
62
+ {
63
+ "stageKey": "linux-arm64:install",
64
+ "decision": "reuse",
65
+ "capsuleRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
66
+ "evidenceRoot": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
67
+ },
68
+ {
69
+ "stageKey": "linux-arm64:package",
70
+ "decision": "reuse",
71
+ "capsuleRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
72
+ "evidenceRoot": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
73
+ },
74
+ {
75
+ "stageKey": "linux-arm64:verify",
76
+ "decision": "reuse",
77
+ "capsuleRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
78
+ "evidenceRoot": "sha256:7777777777777777777777777777777777777777777777777777777777777777"
79
+ },
80
+ {
81
+ "stageKey": "linux-x64:build",
82
+ "decision": "reuse",
83
+ "capsuleRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
84
+ "evidenceRoot": "sha256:8888888888888888888888888888888888888888888888888888888888888888"
85
+ },
86
+ {
87
+ "stageKey": "linux-x64:install",
88
+ "decision": "reuse",
89
+ "capsuleRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
90
+ "evidenceRoot": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
91
+ },
92
+ {
93
+ "stageKey": "linux-x64:package",
94
+ "decision": "reuse",
95
+ "capsuleRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
96
+ "evidenceRoot": "sha256:0000000000000000000000000000000000000000000000000000000000000000"
97
+ },
98
+ {
99
+ "stageKey": "linux-x64:verify",
100
+ "decision": "reuse",
101
+ "capsuleRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
102
+ "evidenceRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
103
+ },
104
+ {
105
+ "stageKey": "macos-arm64:build",
106
+ "decision": "reuse",
107
+ "capsuleRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
108
+ "evidenceRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222"
109
+ },
110
+ {
111
+ "stageKey": "macos-arm64:install",
112
+ "decision": "reuse",
113
+ "capsuleRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
114
+ "evidenceRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333"
115
+ },
116
+ {
117
+ "stageKey": "macos-arm64:package",
118
+ "decision": "reuse",
119
+ "capsuleRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
120
+ "evidenceRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444"
121
+ },
122
+ {
123
+ "stageKey": "macos-arm64:verify",
124
+ "decision": "reuse",
125
+ "capsuleRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
126
+ "evidenceRoot": "sha256:5555555555555555555555555555555555555555555555555555555555555555"
127
+ },
128
+ {
129
+ "stageKey": "windows-x64:build",
130
+ "decision": "reuse",
131
+ "capsuleRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
132
+ "evidenceRoot": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
133
+ },
134
+ {
135
+ "stageKey": "windows-x64:install",
136
+ "decision": "reuse",
137
+ "capsuleRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
138
+ "evidenceRoot": "sha256:7777777777777777777777777777777777777777777777777777777777777777"
139
+ },
140
+ {
141
+ "stageKey": "windows-x64:package",
142
+ "decision": "reuse",
143
+ "capsuleRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
144
+ "evidenceRoot": "sha256:8888888888888888888888888888888888888888888888888888888888888888"
145
+ },
146
+ {
147
+ "stageKey": "windows-x64:verify",
148
+ "decision": "reuse",
149
+ "capsuleRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
150
+ "evidenceRoot": "sha256:9999999999999999999999999999999999999999999999999999999999999999"
151
+ }
152
+ ]
153
+ },
154
+ "signing": {
155
+ "authorityRepository": "kungfu-systems/buildchain",
156
+ "authorityRunId": 5102,
157
+ "runtimeSha": "dddddddddddddddddddddddddddddddddddddddd",
158
+ "requestRoot": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
159
+ "delegationRoot": "sha256:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
160
+ "resultArtifact": "signed-macos-result",
161
+ "resultArtifactRoot": "sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
162
+ "credentialAuthorityId": "macos-notary-primary",
163
+ "credentialScopeRoot": "sha256:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
164
+ "credentialLeaseRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
165
+ "credentialExpiresAt": "2026-08-16T04:00:00.000Z",
166
+ "providerReadbackRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222"
167
+ },
168
+ "releaseTail": {
169
+ "declarationRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
170
+ "transactionRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
171
+ "operationRoot": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
172
+ "idempotencyKey": "tail-reseal-alpha-2-macos",
173
+ "providerReadbackRoot": "sha256:6666666666666666666666666666666666666666666666666666666666666666"
174
+ },
175
+ "platforms": [
176
+ {
177
+ "id": "linux-arm64",
178
+ "name": "linux-arm64",
179
+ "runner": "[\"ubuntu-24.04-arm\"]",
180
+ "artifactName": "product-linux-arm64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
181
+ "artifactRoot": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
182
+ "artifactArchiveRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
183
+ "manifestArtifactName": "product-manifest-linux-arm64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
184
+ "manifestRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
185
+ "manifestArchiveRoot": "sha256:5555555555555555555555555555555555555555555555555555555555555555",
186
+ "artifactPaths": [".buildchain/artifacts", "product/release/linux-arm64"],
187
+ "capsuleRoot": "sha256:1111111111111111111111111111111111111111111111111111111111111111"
188
+ },
189
+ {
190
+ "id": "linux-x64",
191
+ "name": "linux-x64",
192
+ "runner": "[\"ubuntu-24.04\"]",
193
+ "artifactName": "product-linux-x64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
194
+ "artifactRoot": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
195
+ "artifactArchiveRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
196
+ "manifestArtifactName": "product-manifest-linux-x64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
197
+ "manifestRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
198
+ "manifestArchiveRoot": "sha256:6666666666666666666666666666666666666666666666666666666666666666",
199
+ "artifactPaths": [".buildchain/artifacts", "product/release/linux-x64"],
200
+ "capsuleRoot": "sha256:2222222222222222222222222222222222222222222222222222222222222222"
201
+ },
202
+ {
203
+ "id": "macos-arm64",
204
+ "name": "macos-arm64",
205
+ "runner": "[\"macos-15\"]",
206
+ "artifactName": "product-macos-arm64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
207
+ "artifactRoot": "sha256:9999999999999999999999999999999999999999999999999999999999999999",
208
+ "artifactArchiveRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
209
+ "manifestArtifactName": "product-manifest-macos-arm64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
210
+ "manifestRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
211
+ "manifestArchiveRoot": "sha256:7777777777777777777777777777777777777777777777777777777777777777",
212
+ "artifactPaths": [".buildchain/artifacts", "product/release/macos-arm64"],
213
+ "capsuleRoot": "sha256:3333333333333333333333333333333333333333333333333333333333333333"
214
+ },
215
+ {
216
+ "id": "windows-x64",
217
+ "name": "windows-x64",
218
+ "runner": "[\"windows-2025\"]",
219
+ "artifactName": "product-windows-x64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
220
+ "artifactRoot": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
221
+ "artifactArchiveRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
222
+ "manifestArtifactName": "product-manifest-windows-x64-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
223
+ "manifestRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444",
224
+ "manifestArchiveRoot": "sha256:8888888888888888888888888888888888888888888888888888888888888888",
225
+ "artifactPaths": [".buildchain/artifacts", "product/release/windows-x64"],
226
+ "capsuleRoot": "sha256:4444444444444444444444444444444444444444444444444444444444444444"
227
+ }
228
+ ]
229
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/next-development-request-v1.schema.json",
4
+ "title": "Buildchain Next-development Request v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["contract", "repository", "completedAlpha", "recordedAt"],
8
+ "properties": {
9
+ "contract": {
10
+ "const": "kungfu-buildchain-next-development-request/v1"
11
+ },
12
+ "repository": {
13
+ "type": "string",
14
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
15
+ },
16
+ "completedAlpha": { "$ref": "#/$defs/completedAlpha" },
17
+ "targetVersion": { "$ref": "#/$defs/semver" },
18
+ "anchor": { "$ref": "#/$defs/anchor" },
19
+ "recordedAt": { "type": "string", "format": "date-time" }
20
+ },
21
+ "$defs": {
22
+ "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
23
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
24
+ "semver": {
25
+ "type": "string",
26
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
27
+ },
28
+ "completedAlpha": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "outcome",
33
+ "version",
34
+ "exactTag",
35
+ "releaseSha",
36
+ "treeSha",
37
+ "publicationRoot",
38
+ "completedAt"
39
+ ],
40
+ "properties": {
41
+ "outcome": { "const": "succeeded" },
42
+ "version": {
43
+ "type": "string",
44
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-alpha\\.(0|[1-9][0-9]*)$"
45
+ },
46
+ "exactTag": { "type": "string", "minLength": 1 },
47
+ "releaseSha": { "$ref": "#/$defs/gitSha" },
48
+ "treeSha": { "$ref": "#/$defs/gitSha" },
49
+ "publicationRoot": { "$ref": "#/$defs/root" },
50
+ "completedAt": { "type": "string", "format": "date-time" }
51
+ }
52
+ },
53
+ "anchor": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["manifestPath", "manifestRoot"],
57
+ "properties": {
58
+ "manifestPath": {
59
+ "type": "string",
60
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\s]+$"
61
+ },
62
+ "manifestRoot": { "$ref": "#/$defs/root" }
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,292 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/next-development-transition-v1.schema.json",
4
+ "title": "Buildchain Next-development Transition v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schemaVersion",
9
+ "contract",
10
+ "idempotencyKey",
11
+ "repository",
12
+ "completedAlpha",
13
+ "completedAlphaRoot",
14
+ "alphaOutcome",
15
+ "model",
16
+ "target",
17
+ "declaredPaths",
18
+ "adapter",
19
+ "effectBounds",
20
+ "state",
21
+ "materialization",
22
+ "transitions"
23
+ ],
24
+ "properties": {
25
+ "schemaVersion": { "const": 1 },
26
+ "contract": {
27
+ "const": "kungfu-buildchain-next-development-transition/v1"
28
+ },
29
+ "idempotencyKey": { "$ref": "#/$defs/root" },
30
+ "repository": {
31
+ "type": "string",
32
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
33
+ },
34
+ "completedAlpha": { "$ref": "#/$defs/completedAlpha" },
35
+ "completedAlphaRoot": { "$ref": "#/$defs/root" },
36
+ "alphaOutcome": { "const": "preserved-success" },
37
+ "model": { "$ref": "#/$defs/model" },
38
+ "target": { "$ref": "#/$defs/target" },
39
+ "declaredPaths": {
40
+ "type": "array",
41
+ "minItems": 1,
42
+ "uniqueItems": true,
43
+ "items": { "$ref": "#/$defs/path" }
44
+ },
45
+ "adapter": { "$ref": "#/$defs/adapter" },
46
+ "effectBounds": {
47
+ "type": "object",
48
+ "additionalProperties": false,
49
+ "required": ["allowedPaths", "refUpdates", "forbiddenRefNamespaces"],
50
+ "properties": {
51
+ "allowedPaths": {
52
+ "type": "array",
53
+ "minItems": 1,
54
+ "uniqueItems": true,
55
+ "items": { "$ref": "#/$defs/path" }
56
+ },
57
+ "refUpdates": { "type": "array", "maxItems": 0 },
58
+ "forbiddenRefNamespaces": {
59
+ "const": ["refs/heads/alpha/", "refs/tags/"]
60
+ }
61
+ }
62
+ },
63
+ "state": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["status", "generation", "stateRoot"],
67
+ "properties": {
68
+ "status": { "$ref": "#/$defs/state" },
69
+ "generation": { "type": "integer", "minimum": 1 },
70
+ "stateRoot": { "$ref": "#/$defs/root" }
71
+ }
72
+ },
73
+ "materialization": {
74
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/materialization" }]
75
+ },
76
+ "transitions": {
77
+ "type": "array",
78
+ "items": { "$ref": "#/$defs/transition" }
79
+ }
80
+ },
81
+ "allOf": [
82
+ {
83
+ "if": {
84
+ "properties": {
85
+ "state": {
86
+ "properties": {
87
+ "status": {
88
+ "enum": ["materialized", "pr-pending", "merged", "verified"]
89
+ }
90
+ }
91
+ }
92
+ }
93
+ },
94
+ "then": {
95
+ "properties": {
96
+ "materialization": { "$ref": "#/$defs/materialization" }
97
+ }
98
+ }
99
+ }
100
+ ],
101
+ "$defs": {
102
+ "gitSha": { "type": "string", "pattern": "^[0-9a-f]{40}$" },
103
+ "root": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
104
+ "semver": {
105
+ "type": "string",
106
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"
107
+ },
108
+ "path": {
109
+ "type": "string",
110
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))[^\\s]+$"
111
+ },
112
+ "state": {
113
+ "enum": [
114
+ "planned",
115
+ "waiting-anchor",
116
+ "materialized",
117
+ "pr-pending",
118
+ "merged",
119
+ "verified"
120
+ ]
121
+ },
122
+ "completedAlpha": {
123
+ "type": "object",
124
+ "additionalProperties": false,
125
+ "required": [
126
+ "outcome",
127
+ "version",
128
+ "exactTag",
129
+ "releaseSha",
130
+ "treeSha",
131
+ "publicationRoot",
132
+ "completedAt"
133
+ ],
134
+ "properties": {
135
+ "outcome": { "const": "succeeded" },
136
+ "version": {
137
+ "type": "string",
138
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)-alpha\\.(0|[1-9][0-9]*)$"
139
+ },
140
+ "exactTag": { "type": "string", "minLength": 1 },
141
+ "releaseSha": { "$ref": "#/$defs/gitSha" },
142
+ "treeSha": { "$ref": "#/$defs/gitSha" },
143
+ "publicationRoot": { "$ref": "#/$defs/root" },
144
+ "completedAt": { "type": "string", "format": "date-time" }
145
+ }
146
+ },
147
+ "model": {
148
+ "oneOf": [
149
+ {
150
+ "type": "object",
151
+ "additionalProperties": false,
152
+ "required": ["strategy", "next"],
153
+ "properties": {
154
+ "strategy": { "const": "semver" },
155
+ "next": { "const": "auto" }
156
+ }
157
+ },
158
+ {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": ["strategy", "next"],
162
+ "properties": {
163
+ "strategy": { "const": "anchored" },
164
+ "next": { "const": "manual" }
165
+ }
166
+ }
167
+ ]
168
+ },
169
+ "adapter": {
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "environmentVariable",
174
+ "sourcePaths",
175
+ "derivedPaths",
176
+ "allowedChangePaths",
177
+ "readOnlyPaths",
178
+ "derivationStage",
179
+ "verificationStage"
180
+ ],
181
+ "properties": {
182
+ "environmentVariable": { "const": "BUILDCHAIN_VERSION" },
183
+ "sourcePaths": {
184
+ "type": "array",
185
+ "minItems": 1,
186
+ "uniqueItems": true,
187
+ "items": { "$ref": "#/$defs/path" }
188
+ },
189
+ "derivedPaths": {
190
+ "type": "array",
191
+ "uniqueItems": true,
192
+ "items": { "$ref": "#/$defs/path" }
193
+ },
194
+ "allowedChangePaths": {
195
+ "type": "array",
196
+ "minItems": 1,
197
+ "uniqueItems": true,
198
+ "items": { "$ref": "#/$defs/path" }
199
+ },
200
+ "readOnlyPaths": {
201
+ "type": "array",
202
+ "uniqueItems": true,
203
+ "items": { "$ref": "#/$defs/path" }
204
+ },
205
+ "derivationStage": {
206
+ "oneOf": [{ "type": "null" }, { "const": "lifecycle.version-state" }]
207
+ },
208
+ "verificationStage": { "const": "lifecycle.verify" }
209
+ }
210
+ },
211
+ "target": {
212
+ "type": "object",
213
+ "additionalProperties": false,
214
+ "required": ["version", "anchor"],
215
+ "properties": {
216
+ "version": {
217
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/semver" }]
218
+ },
219
+ "anchor": {
220
+ "oneOf": [
221
+ { "type": "null" },
222
+ {
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": ["manifestPath", "manifestRoot"],
226
+ "properties": {
227
+ "manifestPath": { "$ref": "#/$defs/path" },
228
+ "manifestRoot": { "$ref": "#/$defs/root" }
229
+ }
230
+ }
231
+ ]
232
+ }
233
+ }
234
+ },
235
+ "materialization": {
236
+ "type": "object",
237
+ "additionalProperties": false,
238
+ "required": [
239
+ "targetVersion",
240
+ "anchorRoot",
241
+ "paths",
242
+ "materializationRoot"
243
+ ],
244
+ "properties": {
245
+ "targetVersion": { "$ref": "#/$defs/semver" },
246
+ "anchorRoot": {
247
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/root" }]
248
+ },
249
+ "paths": {
250
+ "type": "array",
251
+ "minItems": 1,
252
+ "items": {
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "required": ["path", "beforeRoot", "afterRoot", "changed"],
256
+ "properties": {
257
+ "path": { "$ref": "#/$defs/path" },
258
+ "beforeRoot": { "$ref": "#/$defs/root" },
259
+ "afterRoot": { "$ref": "#/$defs/root" },
260
+ "changed": { "type": "boolean" }
261
+ }
262
+ }
263
+ },
264
+ "materializationRoot": { "$ref": "#/$defs/root" }
265
+ }
266
+ },
267
+ "transition": {
268
+ "type": "object",
269
+ "additionalProperties": false,
270
+ "required": [
271
+ "expectedStateRoot",
272
+ "from",
273
+ "to",
274
+ "event",
275
+ "evidenceRoot",
276
+ "recordedAt",
277
+ "requestRoot",
278
+ "transitionRoot"
279
+ ],
280
+ "properties": {
281
+ "expectedStateRoot": { "$ref": "#/$defs/root" },
282
+ "from": { "$ref": "#/$defs/state" },
283
+ "to": { "$ref": "#/$defs/state" },
284
+ "event": { "type": "string", "minLength": 1 },
285
+ "evidenceRoot": { "$ref": "#/$defs/root" },
286
+ "recordedAt": { "type": "string", "format": "date-time" },
287
+ "requestRoot": { "$ref": "#/$defs/root" },
288
+ "transitionRoot": { "$ref": "#/$defs/root" }
289
+ }
290
+ }
291
+ }
292
+ }