@kungfu-tech/buildchain 4.0.1-alpha.2 → 4.0.1-alpha.21

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 (203) hide show
  1. package/actions/release-tail/README.md +8 -0
  2. package/architecture/ci-lane-change-budget.json +187 -0
  3. package/architecture/decisions/0002-next-development-transition.md +101 -0
  4. package/architecture/decisions/0003-two-phase-delivery-warrant.md +152 -0
  5. package/architecture/internal-capabilities.json +211 -8
  6. package/architecture/maintainability-policy.json +113 -28
  7. package/architecture/release-tail-contract-inventory.json +5 -2
  8. package/architecture/v3-core-mechanism-inventory.json +91 -0
  9. package/architecture/v4-adopter-delivery-parity.json +32 -5
  10. package/architecture/v4-capability-state-machine-manifest.json +73 -0
  11. package/architecture/v4-compatibility-facts-parity.json +77 -0
  12. package/architecture/v4-delivery-authority-parity.json +250 -0
  13. package/architecture/v4-delivery-warrant-shadow-fixtures.json +41 -9
  14. package/architecture/v4-floating-consumer-policy.json +6 -0
  15. package/architecture/v4-next-development-parity.json +192 -0
  16. package/architecture/v4-publication-rehearsal-parity.json +84 -0
  17. package/architecture/v4-release-train-parity.json +1 -0
  18. package/architecture/v4-tail-reseal-parity.json +150 -0
  19. package/bin/buildchain.mjs +32 -3
  20. package/bin/internal/adopter-delivery-cli.mjs +70 -0
  21. package/bin/internal/command-registry.mjs +3 -0
  22. package/bin/internal/compatibility-facts-cli.mjs +101 -0
  23. package/contracts/dev-delivery-authority-v2.schema.json +662 -0
  24. package/contracts/fixtures/next-development-transition-v1/anchored-manual-waiting.json +47 -0
  25. package/contracts/fixtures/next-development-transition-v1/semver-auto-planned.json +47 -0
  26. package/contracts/fixtures/next-development-transition-v1/version-model-cases.json +40 -0
  27. package/contracts/fixtures/v4-adopter-delivery-v1/archive-template.json +19 -0
  28. package/contracts/fixtures/v4-adopter-delivery-v1/bootstrap-positive.json +93 -0
  29. package/contracts/fixtures/v4-adopter-delivery-v1/gate-positive.json +29 -0
  30. package/contracts/fixtures/v4-adopter-delivery-v1/gate-unknown-selector.json +26 -0
  31. package/contracts/fixtures/v4-adopter-delivery-v1/offline-vectors.json +50 -0
  32. package/contracts/fixtures/v4-compatibility-facts-v1/shared.json +1129 -0
  33. package/contracts/fixtures/v4-floating-consumer-policy-v1/cases.json +7 -1
  34. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/artifacts/product.bin +1 -0
  35. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/config/buildchain.toml +5 -0
  36. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/release-activation.json +1 -0
  37. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/documents/signed-channel.json +1 -0
  38. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/evidence/qualification.json +1 -0
  39. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/candidate.json +5 -0
  40. package/contracts/fixtures/v4-publication-rehearsal-v1/candidate/manifests/release-passport.json +1 -0
  41. package/contracts/fixtures/v4-publication-rehearsal-v1/capsule.json +707 -0
  42. package/contracts/fixtures/v4-publication-rehearsal-v1/offline-vectors.json +27 -0
  43. package/contracts/fixtures/v4-tail-reseal-v1/valid.json +229 -0
  44. package/contracts/next-development-request-v1.schema.json +66 -0
  45. package/contracts/next-development-transition-v1.schema.json +292 -0
  46. package/contracts/v4-adopter-delivery-v1.schema.json +81 -0
  47. package/contracts/v4-compatibility-facts-v1.schema.json +230 -0
  48. package/contracts/v4-floating-consumer-policy-receipt-v1.schema.json +4 -2
  49. package/contracts/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  50. package/contracts/v4-tail-reseal-v1.schema.json +276 -0
  51. package/dist/site/agent-index.json +5 -0
  52. package/dist/site/artifact-schemas.json +10 -0
  53. package/dist/site/buildchain-contract.json +1475 -27
  54. package/dist/site/buildchain-site.json +627 -31
  55. package/dist/site/capability-registry.json +17 -14
  56. package/dist/site/cli-registry.json +205 -3
  57. package/dist/site/kfd-claims.json +490 -16
  58. package/dist/site/kfd-upstream-aggregate.json +1 -1
  59. package/dist/site/manual-registry.json +52 -6
  60. package/dist/site/node-api-registry.json +14736 -8851
  61. package/dist/site/page-registry.json +593 -21
  62. package/dist/site/public-surface-audit.json +837 -48
  63. package/dist/site/publication-authority-registry.json +44 -8
  64. package/dist/site/publication-registry.json +4 -4
  65. package/dist/site/release-provenance.json +24 -0
  66. package/dist/site/schemas/dev-delivery-authority-v2.schema.json +662 -0
  67. package/dist/site/schemas/release-tail-capabilities-v1.schema.json +199 -0
  68. package/dist/site/schemas/v4-adopter-delivery-v1.schema.json +81 -0
  69. package/dist/site/schemas/v4-compatibility-facts-v1.schema.json +230 -0
  70. package/dist/site/schemas/v4-publication-rehearsal-capsule-v1.schema.json +233 -0
  71. package/dist/site/site-manifest.json +34 -10
  72. package/dist/site/workflow-registry.json +160 -10
  73. package/docs/MAP.md +8 -2
  74. package/docs/cli-reference.md +404 -13
  75. package/docs/cli.md +8 -0
  76. package/docs/dev-alpha-candidate-patrol.md +8 -0
  77. package/docs/dev-delivery-qualification-landing-adr.md +251 -0
  78. package/docs/dev-delivery-warrant.md +351 -38
  79. package/docs/next-development-transition.md +118 -0
  80. package/docs/node-api-reference.md +646 -293
  81. package/docs/release-tail-provider-plane.md +30 -0
  82. package/docs/v4-adopter-delivery.md +133 -0
  83. package/docs/v4-compatibility-facts.md +91 -0
  84. package/docs/v4-publication-rehearsal.md +130 -0
  85. package/docs/v4-tail-reseal.md +73 -0
  86. package/docs/versioning.md +4 -3
  87. package/package.json +34 -6
  88. package/packages/core/adopter-delivery-passport.js +259 -0
  89. package/packages/core/adopter-delivery-vectors.js +158 -0
  90. package/packages/core/adopter-delivery-vectors.json +77 -0
  91. package/packages/core/buildchain-agent-manuals.js +3 -0
  92. package/packages/core/buildchain-compatibility-authority.js +336 -0
  93. package/packages/core/buildchain-compatibility-fact.js +394 -0
  94. package/packages/core/buildchain-compatibility-facts.json +217 -0
  95. package/packages/core/buildchain-compatibility-proof.js +566 -0
  96. package/packages/core/buildchain-config.js +84 -0
  97. package/packages/core/buildchain-contract.js +96 -143
  98. package/packages/core/buildchain-delivery-bootstrap.js +240 -0
  99. package/packages/core/buildchain-delivery-infrastructure.js +164 -0
  100. package/packages/core/buildchain-delivery-self-dogfood.js +395 -0
  101. package/packages/core/buildchain-publication-authority.js +1 -0
  102. package/packages/core/channel-candidate.js +8 -0
  103. package/packages/core/channel-promotion-baseline.js +55 -0
  104. package/packages/core/ci-lane-change-budget.js +247 -0
  105. package/packages/core/dev-alpha-candidate-selection.js +10 -2
  106. package/packages/core/dev-delivery-authority-candidate.js +270 -0
  107. package/packages/core/dev-delivery-authority-evidence.js +146 -0
  108. package/packages/core/dev-delivery-authority-landing.js +461 -0
  109. package/packages/core/dev-delivery-authority-observation.js +48 -0
  110. package/packages/core/dev-delivery-authority-qualification.js +591 -0
  111. package/packages/core/dev-delivery-authority-settlement.js +213 -0
  112. package/packages/core/dev-delivery-authority-state.js +583 -0
  113. package/packages/core/dev-delivery-candidate-identity.js +13 -0
  114. package/packages/core/dev-delivery-contract-surface.js +76 -0
  115. package/packages/core/dev-delivery-execution-failure.js +133 -0
  116. package/packages/core/dev-delivery-execution-transfer.js +592 -0
  117. package/packages/core/dev-delivery-landing-admission-core.js +119 -0
  118. package/packages/core/dev-delivery-landing-readback.js +598 -0
  119. package/packages/core/dev-delivery-landing-terminal-evidence.js +271 -0
  120. package/packages/core/dev-delivery-landing-testing-port.js +6 -0
  121. package/packages/core/dev-delivery-native-execution.js +110 -0
  122. package/packages/core/dev-delivery-native-proof.js +562 -0
  123. package/packages/core/dev-delivery-process-boundary.js +563 -0
  124. package/packages/core/dev-delivery-provider-attempt.js +127 -0
  125. package/packages/core/dev-delivery-provider-heartbeat.js +382 -0
  126. package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
  127. package/packages/core/dev-delivery-warrant-qualification.js +145 -0
  128. package/packages/core/dev-delivery-warrant-settlement.js +237 -36
  129. package/packages/core/dev-delivery-warrant-state.js +587 -0
  130. package/packages/core/dev-delivery-warrant.js +328 -370
  131. package/packages/core/github-governance-authority.js +1 -0
  132. package/packages/core/index.js +5 -0
  133. package/packages/core/kungfu-temporal-fact.js +557 -0
  134. package/packages/core/legacy-kfd-adopter-driver.js +167 -0
  135. package/packages/core/next-development-candidate-reservation.js +186 -0
  136. package/packages/core/next-development-controller.js +728 -0
  137. package/packages/core/next-development-projection.js +287 -0
  138. package/packages/core/next-development-transition.js +738 -0
  139. package/packages/core/paper-agent-entry.js +11 -5
  140. package/packages/core/paper.js +16 -5
  141. package/packages/core/published-delivery-authority.js +266 -0
  142. package/packages/core/release-candidate-recovery.js +70 -15
  143. package/packages/core/release-candidate.js +2 -2
  144. package/packages/core/release-passport.js +36 -9
  145. package/packages/core/v4-adopter-delivery-parity.js +3 -3
  146. package/packages/core/v4-adopter-delivery.js +359 -0
  147. package/packages/core/v4-canonical-contracts.js +5 -0
  148. package/packages/core/v4-delivery-warrant-read-candidate.js +10 -3
  149. package/packages/core/v4-floating-consumer-evidence.js +18 -4
  150. package/packages/core/v4-floating-consumer-policy.js +143 -20
  151. package/packages/core/v4-floating-consumer-release-passport.js +32 -5
  152. package/packages/core/v4-publication-rehearsal-capsule.js +468 -0
  153. package/packages/core/v4-publication-rehearsal-provider-bindings.js +212 -0
  154. package/packages/core/v4-publication-rehearsal.js +481 -0
  155. package/packages/core/v4-tail-reseal-contract.js +26 -0
  156. package/packages/core/v4-tail-reseal-github.js +178 -0
  157. package/packages/core/v4-tail-reseal-receipt.js +225 -0
  158. package/packages/core/v4-tail-reseal.js +594 -0
  159. package/packages/core/workflow-yaml-contract.js +24 -2
  160. package/scripts/buildchain-cli-help.mjs +41 -2
  161. package/scripts/check-ci-lane-change-budget.mjs +100 -0
  162. package/scripts/check-inventory.mjs +14 -3
  163. package/scripts/check-v4-floating-consumer-policy-contract.mjs +23 -4
  164. package/scripts/dev-alpha-candidate-patrol.mjs +22 -1
  165. package/scripts/dev-delivery-authority-command-adapters.mjs +206 -0
  166. package/scripts/dev-delivery-authority-provider.mjs +28 -0
  167. package/scripts/dev-delivery-authority.mjs +490 -0
  168. package/scripts/dev-delivery-native-run.mjs +177 -0
  169. package/scripts/dev-delivery-process-boundary.mjs +260 -0
  170. package/scripts/dev-delivery-proof.mjs +67 -2
  171. package/scripts/dev-delivery-provider-heartbeat.mjs +215 -0
  172. package/scripts/dev-delivery-source-proof-replay.mjs +153 -0
  173. package/scripts/dev-delivery-source-proof-reuse.mjs +13 -97
  174. package/scripts/dev-delivery-two-phase-resume.mjs +345 -0
  175. package/scripts/dev-delivery-two-phase.mjs +573 -0
  176. package/scripts/dev-delivery-warrant-options.mjs +266 -0
  177. package/scripts/dev-delivery-warrant-store.mjs +231 -0
  178. package/scripts/dev-delivery-warrant.mjs +232 -194
  179. package/scripts/dev-pr-auto-merge.mjs +1 -1
  180. package/scripts/dev-pr-delivery-warrant.mjs +11 -0
  181. package/scripts/dev-qualification-patrol.mjs +9 -9
  182. package/scripts/dispatch-artifact-signing-authority.mjs +1 -1
  183. package/scripts/generate-channel-promotion-workflow.mjs +2 -2
  184. package/scripts/generate-next-development-guidance.mjs +49 -0
  185. package/scripts/generate-release-candidate-passport.mjs +152 -0
  186. package/scripts/generate-site-bundle.mjs +69 -4
  187. package/scripts/init-repo.mjs +22 -4
  188. package/scripts/next-development-self-dogfood-harness.mjs +460 -0
  189. package/scripts/next-development-self-dogfood.mjs +597 -0
  190. package/scripts/next-development-transition.mjs +47 -0
  191. package/scripts/npm-publish-transaction.mjs +2 -2
  192. package/scripts/promotion-channel-router.mjs +4 -4
  193. package/scripts/release-candidate-anchor-provenance.mjs +99 -0
  194. package/scripts/release-tail.mjs +51 -3
  195. package/scripts/release-train-self-dogfood.mjs +94 -92
  196. package/scripts/resume-from-candidate-run.mjs +557 -30
  197. package/scripts/site-capability-metadata.mjs +41 -0
  198. package/scripts/stable-candidate-qualification.mjs +9 -10
  199. package/scripts/v4-consumer-policy.mjs +5 -5
  200. package/scripts/v4-publication-rehearsal-fixture.mjs +144 -0
  201. package/scripts/v4-tail-reseal-macos-rehearsal.mjs +134 -0
  202. package/scripts/v4-tail-reseal.mjs +416 -0
  203. package/templates/native-dev-delivery.yml +143 -0
@@ -0,0 +1,662 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://buildchain.libkungfu.dev/schemas/dev-delivery-authority-v2.schema.json",
4
+ "title": "Buildchain Dev Delivery Authority State v2",
5
+ "description": "Opt-in durable state separating bounded qualification-only leases from one exclusive merge_group Landing Warrant.",
6
+ "$comment": "Cross-job authority also requires dedicated exact staging, two recursive regular-file-only membership snapshots, canonical transfer and failure JSON bytes, and the rooted failure-transfer-provider-boundary-job-state-fence settlement chain; those filesystem and provider checks are enforced by the delivery boundary verifier.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": [
10
+ "schemaVersion",
11
+ "contract",
12
+ "authorityMode",
13
+ "repository",
14
+ "protectedBase",
15
+ "generation",
16
+ "qualificationCounter",
17
+ "landingCounter",
18
+ "policy",
19
+ "qualificationLeases",
20
+ "landingWarrant",
21
+ "candidates",
22
+ "migration",
23
+ "updatedAt",
24
+ "stateRoot"
25
+ ],
26
+ "properties": {
27
+ "schemaVersion": { "const": 2 },
28
+ "contract": { "const": "kungfu-buildchain-dev-delivery-authority" },
29
+ "authorityMode": { "const": "bounded-qualification-landing" },
30
+ "repository": {
31
+ "type": "string",
32
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
33
+ },
34
+ "protectedBase": {
35
+ "type": "string",
36
+ "pattern": "^dev/v[0-9]+/v[0-9]+\\.[0-9]+$"
37
+ },
38
+ "generation": { "type": "integer", "minimum": 0 },
39
+ "qualificationCounter": { "type": "integer", "minimum": 0 },
40
+ "landingCounter": { "type": "integer", "minimum": 0 },
41
+ "policy": {
42
+ "type": "object",
43
+ "additionalProperties": false,
44
+ "required": [
45
+ "maxQualificationLeases",
46
+ "qualificationLeaseSeconds",
47
+ "landingLeaseSeconds"
48
+ ],
49
+ "properties": {
50
+ "maxQualificationLeases": { "type": "integer", "minimum": 1 },
51
+ "qualificationLeaseSeconds": { "type": "integer", "minimum": 1 },
52
+ "landingLeaseSeconds": { "type": "integer", "minimum": 1 },
53
+ "maxLandingOvertakes": { "type": "integer", "minimum": 0 },
54
+ "maxQualificationAttempts": { "type": "integer", "minimum": 1 }
55
+ }
56
+ },
57
+ "qualificationLeases": {
58
+ "type": "array",
59
+ "items": { "$ref": "#/$defs/qualificationLease" }
60
+ },
61
+ "landingWarrant": {
62
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/landingWarrant" }]
63
+ },
64
+ "candidates": {
65
+ "type": "array",
66
+ "items": { "$ref": "#/$defs/candidate" }
67
+ },
68
+ "migration": {
69
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/migration" }]
70
+ },
71
+ "updatedAt": { "type": "string", "format": "date-time" },
72
+ "stateRoot": { "$ref": "#/$defs/root" }
73
+ },
74
+ "$defs": {
75
+ "root": {
76
+ "type": "string",
77
+ "pattern": "^sha256:[0-9a-f]{64}$"
78
+ },
79
+ "sha": {
80
+ "type": "string",
81
+ "pattern": "^[0-9a-f]{40}$"
82
+ },
83
+ "nativeFailureEvidence": {
84
+ "description": "Canonical credentialless-native failure JSON bytes whose exact body and evidenceRoot are recomputed before provider settlement.",
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "schema",
89
+ "pullRequestNumber",
90
+ "expectedHead",
91
+ "fencingToken",
92
+ "leaseGeneration",
93
+ "nativeAttempts",
94
+ "reason",
95
+ "workerTerminationProven",
96
+ "evidenceRoot"
97
+ ],
98
+ "properties": {
99
+ "schema": {
100
+ "const": "kungfu.buildchain.two-phase-delivery-failure/v1"
101
+ },
102
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
103
+ "expectedHead": { "$ref": "#/$defs/sha" },
104
+ "fencingToken": { "$ref": "#/$defs/root" },
105
+ "leaseGeneration": { "type": "integer", "minimum": 1 },
106
+ "nativeAttempts": { "type": "integer", "minimum": 0 },
107
+ "reason": { "type": "string", "minLength": 1 },
108
+ "workerTerminationProven": { "type": "boolean" },
109
+ "evidenceRoot": { "$ref": "#/$defs/root" }
110
+ }
111
+ },
112
+ "providerFailureSettlement": {
113
+ "description": "Finalizer settlement coordinates bound to the exact failure, transfer, provider boundary, native job, and live Warrant state.",
114
+ "type": "object",
115
+ "additionalProperties": false,
116
+ "required": [
117
+ "schema",
118
+ "outcome",
119
+ "evidenceRoot",
120
+ "reason",
121
+ "warrantStateRoot",
122
+ "candidateId",
123
+ "fencingToken",
124
+ "leaseGeneration",
125
+ "pullRequestNumber",
126
+ "sourceHead",
127
+ "transferRoot",
128
+ "nativeJobId",
129
+ "sealJobId",
130
+ "nativeJobConclusion",
131
+ "finalizerBoundaryRoot"
132
+ ],
133
+ "properties": {
134
+ "schema": {
135
+ "const": "kungfu.buildchain.provider-failure-settlement/v1"
136
+ },
137
+ "outcome": { "const": "terminal-failure" },
138
+ "evidenceRoot": { "$ref": "#/$defs/root" },
139
+ "reason": { "type": "string", "minLength": 1 },
140
+ "warrantStateRoot": { "$ref": "#/$defs/root" },
141
+ "candidateId": { "$ref": "#/$defs/root" },
142
+ "fencingToken": { "$ref": "#/$defs/root" },
143
+ "leaseGeneration": { "type": "integer", "minimum": 1 },
144
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
145
+ "sourceHead": { "$ref": "#/$defs/sha" },
146
+ "transferRoot": { "$ref": "#/$defs/root" },
147
+ "nativeJobId": { "type": "integer", "minimum": 1 },
148
+ "sealJobId": { "type": "integer", "minimum": 1 },
149
+ "nativeJobConclusion": { "const": "failure" },
150
+ "finalizerBoundaryRoot": { "$ref": "#/$defs/root" }
151
+ }
152
+ },
153
+ "providerAttempt": {
154
+ "description": "Exact GitHub merge_group workflow job and hosted runner that atomically received Landing authority.",
155
+ "type": "object",
156
+ "additionalProperties": false,
157
+ "required": [
158
+ "schema",
159
+ "repository",
160
+ "workflowId",
161
+ "workflowPath",
162
+ "workflowRef",
163
+ "workflowSha",
164
+ "event",
165
+ "runId",
166
+ "runAttempt",
167
+ "jobId",
168
+ "jobName",
169
+ "jobRole",
170
+ "runnerId",
171
+ "runnerName",
172
+ "runnerGroupId",
173
+ "runnerGroupName",
174
+ "runnerLabels",
175
+ "sourceHead",
176
+ "mergeGroupHead",
177
+ "protectedBase"
178
+ ],
179
+ "properties": {
180
+ "schema": {
181
+ "const": "kungfu.buildchain.github-landing-provider-attempt/v1"
182
+ },
183
+ "repository": {
184
+ "type": "string",
185
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
186
+ },
187
+ "workflowId": { "type": "integer", "minimum": 1 },
188
+ "workflowPath": {
189
+ "type": "string",
190
+ "pattern": "^\\.github/workflows/[^/]+\\.ya?ml$"
191
+ },
192
+ "workflowRef": {
193
+ "type": "string",
194
+ "pattern": "^[^/\\s]+/[^/\\s]+/\\.github/workflows/[^/]+\\.ya?ml@refs/(heads|tags)/[^\\s]+$"
195
+ },
196
+ "workflowSha": { "$ref": "#/$defs/sha" },
197
+ "event": { "const": "merge_group" },
198
+ "runId": { "type": "integer", "minimum": 1 },
199
+ "runAttempt": { "type": "integer", "minimum": 1 },
200
+ "jobId": { "type": "integer", "minimum": 1 },
201
+ "jobName": { "type": "string", "minLength": 1 },
202
+ "jobRole": { "const": "landing-authority" },
203
+ "runnerId": { "type": "integer", "minimum": 1 },
204
+ "runnerName": { "type": "string", "minLength": 1 },
205
+ "runnerGroupId": { "type": "integer", "minimum": 1 },
206
+ "runnerGroupName": { "type": "string", "minLength": 1 },
207
+ "runnerLabels": {
208
+ "type": "array",
209
+ "minItems": 1,
210
+ "uniqueItems": true,
211
+ "items": { "type": "string", "minLength": 1 }
212
+ },
213
+ "sourceHead": { "$ref": "#/$defs/sha" },
214
+ "mergeGroupHead": { "$ref": "#/$defs/sha" },
215
+ "protectedBase": {
216
+ "type": "string",
217
+ "pattern": "^dev/v[0-9]+/v[0-9]+\\.[0-9]+$"
218
+ }
219
+ }
220
+ },
221
+ "landingTerminalReadback": {
222
+ "description": "Independent provider terminal evidence required to settle an expired Landing Warrant. The verifier must bind every exact coordinate and enforce observedAt freshness for the Warrant generation.",
223
+ "type": "object",
224
+ "additionalProperties": false,
225
+ "required": [
226
+ "schema",
227
+ "verifier",
228
+ "terminal",
229
+ "repository",
230
+ "protectedBase",
231
+ "stateRoot",
232
+ "candidateId",
233
+ "pullRequestNumber",
234
+ "sourceHead",
235
+ "landingWarrantToken",
236
+ "landingWarrantGeneration",
237
+ "providerRunId",
238
+ "providerRunAttempt",
239
+ "providerRunState",
240
+ "providerRunConclusion",
241
+ "providerRunHead",
242
+ "providerJobId",
243
+ "providerJobState",
244
+ "providerJobConclusion",
245
+ "providerJobStartedAt",
246
+ "providerJobCompletedAt",
247
+ "providerAttempt",
248
+ "admissionRoot",
249
+ "pullRequestState",
250
+ "pullRequestMerged",
251
+ "protectedBaseHead",
252
+ "providerRunHeadInProtectedBase",
253
+ "outcome",
254
+ "evidenceRoot",
255
+ "reason",
256
+ "observedAt",
257
+ "readbackRoot"
258
+ ],
259
+ "properties": {
260
+ "schema": {
261
+ "const": "kungfu.buildchain.github-landing-terminal-readback/v2"
262
+ },
263
+ "verifier": {
264
+ "const": "buildchain-github-provider-live-readback"
265
+ },
266
+ "terminal": { "const": true },
267
+ "repository": {
268
+ "type": "string",
269
+ "pattern": "^[^/\\s]+/[^/\\s]+$"
270
+ },
271
+ "protectedBase": {
272
+ "type": "string",
273
+ "pattern": "^dev/v[0-9]+/v[0-9]+\\.[0-9]+$"
274
+ },
275
+ "stateRoot": { "$ref": "#/$defs/root" },
276
+ "candidateId": { "$ref": "#/$defs/root" },
277
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
278
+ "sourceHead": { "$ref": "#/$defs/sha" },
279
+ "landingWarrantToken": { "$ref": "#/$defs/root" },
280
+ "landingWarrantGeneration": { "type": "integer", "minimum": 1 },
281
+ "providerRunId": { "type": "integer", "minimum": 1 },
282
+ "providerRunAttempt": { "type": "integer", "minimum": 1 },
283
+ "providerRunState": { "const": "completed" },
284
+ "providerRunConclusion": { "type": "string", "minLength": 1 },
285
+ "providerRunHead": { "$ref": "#/$defs/sha" },
286
+ "providerJobId": { "type": "integer", "minimum": 1 },
287
+ "providerJobState": { "const": "completed" },
288
+ "providerJobConclusion": {
289
+ "enum": [
290
+ "cancelled",
291
+ "failure",
292
+ "action_required",
293
+ "skipped",
294
+ "stale",
295
+ "startup_failure",
296
+ "success",
297
+ "timed_out"
298
+ ]
299
+ },
300
+ "providerJobStartedAt": {
301
+ "type": "string",
302
+ "format": "date-time"
303
+ },
304
+ "providerJobCompletedAt": {
305
+ "type": "string",
306
+ "format": "date-time"
307
+ },
308
+ "providerAttempt": { "$ref": "#/$defs/providerAttempt" },
309
+ "admissionRoot": { "$ref": "#/$defs/root" },
310
+ "pullRequestState": { "enum": ["open", "closed"] },
311
+ "pullRequestMerged": { "type": "boolean" },
312
+ "protectedBaseHead": { "$ref": "#/$defs/sha" },
313
+ "providerRunHeadInProtectedBase": { "type": "boolean" },
314
+ "outcome": {
315
+ "enum": ["merged", "terminal-failure", "dequeued", "cancelled"]
316
+ },
317
+ "evidenceRoot": { "$ref": "#/$defs/root" },
318
+ "reason": { "type": "string" },
319
+ "observedAt": { "type": "string", "format": "date-time" },
320
+ "readbackRoot": { "$ref": "#/$defs/root" }
321
+ }
322
+ },
323
+ "qualificationLease": {
324
+ "type": "object",
325
+ "additionalProperties": false,
326
+ "required": [
327
+ "schema",
328
+ "authority",
329
+ "mergeGroupAdmission",
330
+ "candidateId",
331
+ "token",
332
+ "generation",
333
+ "issuedAt",
334
+ "expiresAt"
335
+ ],
336
+ "properties": {
337
+ "schema": {
338
+ "const": "kungfu.buildchain.dev-delivery-qualification-lease/v1"
339
+ },
340
+ "authority": { "const": "qualification-only" },
341
+ "mergeGroupAdmission": { "const": false },
342
+ "candidateId": { "$ref": "#/$defs/root" },
343
+ "token": { "$ref": "#/$defs/root" },
344
+ "generation": { "type": "integer", "minimum": 1 },
345
+ "issuedAt": { "type": "string", "format": "date-time" },
346
+ "heartbeatAt": { "type": "string", "format": "date-time" },
347
+ "expiresAt": { "type": "string", "format": "date-time" }
348
+ }
349
+ },
350
+ "landingWarrant": {
351
+ "type": "object",
352
+ "additionalProperties": false,
353
+ "required": [
354
+ "schema",
355
+ "authority",
356
+ "mergeGroupAdmission",
357
+ "candidateId",
358
+ "token",
359
+ "generation",
360
+ "issuedAt",
361
+ "expiresAt"
362
+ ],
363
+ "properties": {
364
+ "schema": {
365
+ "const": "kungfu.buildchain.dev-delivery-landing-warrant/v1"
366
+ },
367
+ "authority": { "const": "merge-group-admission" },
368
+ "mergeGroupAdmission": { "const": true },
369
+ "candidateId": { "$ref": "#/$defs/root" },
370
+ "token": { "$ref": "#/$defs/root" },
371
+ "generation": { "type": "integer", "minimum": 1 },
372
+ "issuedAt": { "type": "string", "format": "date-time" },
373
+ "heartbeatAt": { "type": "string", "format": "date-time" },
374
+ "expiresAt": { "type": "string", "format": "date-time" },
375
+ "mergeGroupHead": { "$ref": "#/$defs/sha" },
376
+ "mergeGroupAdmissionRoot": { "$ref": "#/$defs/root" },
377
+ "expectedAdmissionStateRoot": { "$ref": "#/$defs/root" },
378
+ "admittedAt": { "type": "string", "format": "date-time" },
379
+ "providerAttempt": { "$ref": "#/$defs/providerAttempt" }
380
+ },
381
+ "dependentRequired": {
382
+ "mergeGroupHead": [
383
+ "mergeGroupAdmissionRoot",
384
+ "expectedAdmissionStateRoot",
385
+ "admittedAt",
386
+ "providerAttempt"
387
+ ],
388
+ "mergeGroupAdmissionRoot": [
389
+ "mergeGroupHead",
390
+ "expectedAdmissionStateRoot",
391
+ "admittedAt",
392
+ "providerAttempt"
393
+ ],
394
+ "expectedAdmissionStateRoot": [
395
+ "mergeGroupHead",
396
+ "mergeGroupAdmissionRoot",
397
+ "admittedAt",
398
+ "providerAttempt"
399
+ ],
400
+ "admittedAt": [
401
+ "mergeGroupHead",
402
+ "mergeGroupAdmissionRoot",
403
+ "expectedAdmissionStateRoot",
404
+ "providerAttempt"
405
+ ],
406
+ "providerAttempt": [
407
+ "mergeGroupHead",
408
+ "mergeGroupAdmissionRoot",
409
+ "expectedAdmissionStateRoot",
410
+ "admittedAt"
411
+ ]
412
+ }
413
+ },
414
+ "nativeQualification": {
415
+ "type": "object",
416
+ "additionalProperties": false,
417
+ "required": [
418
+ "schema",
419
+ "authority",
420
+ "nativeProofAuthority",
421
+ "qualificationReceiptRoot",
422
+ "sourceProofRoot",
423
+ "nativeProofRoot",
424
+ "nativeExecutionBindingRoot",
425
+ "nativeExecutionReceiptRoot",
426
+ "nativeCommandRoot",
427
+ "qualificationContractRoot",
428
+ "qualifiedAt"
429
+ ],
430
+ "properties": {
431
+ "schema": {
432
+ "const": "kungfu.buildchain.dev-delivery-native-qualification/v1"
433
+ },
434
+ "authority": { "const": "verified-native-qualification" },
435
+ "nativeProofAuthority": { "const": true },
436
+ "evidenceRoot": { "$ref": "#/$defs/root" },
437
+ "qualificationReceiptRoot": { "$ref": "#/$defs/root" },
438
+ "sourceProofRoot": { "$ref": "#/$defs/root" },
439
+ "nativeProofRoot": { "$ref": "#/$defs/root" },
440
+ "nativeExecutionBindingRoot": { "$ref": "#/$defs/root" },
441
+ "nativeExecutionReceiptRoot": { "$ref": "#/$defs/root" },
442
+ "nativeCommandRoot": { "$ref": "#/$defs/root" },
443
+ "qualificationContractRoot": { "$ref": "#/$defs/root" },
444
+ "qualifiedAt": { "type": "string", "format": "date-time" }
445
+ }
446
+ },
447
+ "compatibilityQualification": {
448
+ "type": "object",
449
+ "additionalProperties": false,
450
+ "required": [
451
+ "schema",
452
+ "authority",
453
+ "nativeProofAuthority",
454
+ "legacyStateRoot",
455
+ "legacyWarrantPhase",
456
+ "legacyFencingToken",
457
+ "legacyGeneration",
458
+ "qualificationReceiptRoot",
459
+ "sourceProofRoot",
460
+ "nativeProofRoot",
461
+ "nativeExecutionBindingRoot",
462
+ "nativeExecutionReceiptRoot",
463
+ "nativeCommandRoot",
464
+ "qualificationContractRoot",
465
+ "qualifiedAt"
466
+ ],
467
+ "properties": {
468
+ "schema": {
469
+ "const": "kungfu.buildchain.dev-delivery-compatibility-qualification/v1"
470
+ },
471
+ "authority": { "const": "legacy-compatibility-only" },
472
+ "nativeProofAuthority": { "const": false },
473
+ "legacyStateRoot": { "$ref": "#/$defs/root" },
474
+ "legacyWarrantPhase": { "enum": ["phase-less", "qualified"] },
475
+ "legacyFencingToken": { "$ref": "#/$defs/root" },
476
+ "legacyGeneration": { "type": "integer", "minimum": 1 },
477
+ "qualificationReceiptRoot": {
478
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/root" }]
479
+ },
480
+ "sourceProofRoot": { "$ref": "#/$defs/root" },
481
+ "nativeProofRoot": {
482
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/root" }]
483
+ },
484
+ "nativeExecutionBindingRoot": { "type": "null" },
485
+ "nativeExecutionReceiptRoot": {
486
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/root" }]
487
+ },
488
+ "nativeCommandRoot": {
489
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/root" }]
490
+ },
491
+ "qualificationContractRoot": { "type": "null" },
492
+ "qualifiedAt": {
493
+ "oneOf": [
494
+ { "type": "null" },
495
+ { "type": "string", "format": "date-time" }
496
+ ]
497
+ }
498
+ }
499
+ },
500
+ "terminal": {
501
+ "type": "object",
502
+ "additionalProperties": false,
503
+ "required": ["outcome", "evidenceRoot", "reason", "settledAt"],
504
+ "properties": {
505
+ "outcome": {
506
+ "enum": ["merged", "terminal-failure", "dequeued", "cancelled"]
507
+ },
508
+ "evidenceRoot": { "$ref": "#/$defs/root" },
509
+ "reason": { "type": "string" },
510
+ "settledAt": { "type": "string", "format": "date-time" },
511
+ "transferRoot": { "$ref": "#/$defs/root" },
512
+ "finalizerBoundaryRoot": { "$ref": "#/$defs/root" },
513
+ "nativeJobId": { "type": "integer", "minimum": 1 },
514
+ "sealJobId": { "type": "integer", "minimum": 1 },
515
+ "providerAttempt": { "$ref": "#/$defs/providerAttempt" },
516
+ "providerTerminalReadbackRoot": { "$ref": "#/$defs/root" }
517
+ },
518
+ "allOf": [
519
+ {
520
+ "if": {
521
+ "anyOf": [
522
+ { "required": ["transferRoot"] },
523
+ { "required": ["finalizerBoundaryRoot"] },
524
+ { "required": ["nativeJobId"] },
525
+ { "required": ["sealJobId"] }
526
+ ]
527
+ },
528
+ "then": {
529
+ "required": [
530
+ "transferRoot",
531
+ "finalizerBoundaryRoot",
532
+ "nativeJobId",
533
+ "sealJobId"
534
+ ]
535
+ }
536
+ }
537
+ ]
538
+ },
539
+ "migration": {
540
+ "type": "object",
541
+ "additionalProperties": false,
542
+ "required": ["schema", "legacyContract", "legacyStateRoot", "migratedAt"],
543
+ "properties": {
544
+ "schema": {
545
+ "const": "kungfu.buildchain.dev-delivery-authority-migration/v1"
546
+ },
547
+ "legacyContract": {
548
+ "const": "kungfu-buildchain-dev-delivery-warrant-queue"
549
+ },
550
+ "legacyStateRoot": { "$ref": "#/$defs/root" },
551
+ "migratedAt": { "type": "string", "format": "date-time" }
552
+ }
553
+ },
554
+ "candidate": {
555
+ "type": "object",
556
+ "additionalProperties": false,
557
+ "required": [
558
+ "repository",
559
+ "protectedBase",
560
+ "pullRequestNumber",
561
+ "assignmentRoot",
562
+ "initiativeRoot",
563
+ "sourceIdentityRoot",
564
+ "deliveryClass",
565
+ "candidateId",
566
+ "sourceHead",
567
+ "sourcePatchRoot",
568
+ "sourceProofRoot",
569
+ "planRoot",
570
+ "closureRoot",
571
+ "dependencyRoot",
572
+ "toolchainRoot",
573
+ "enqueuedAt",
574
+ "updatedAt",
575
+ "status",
576
+ "qualification",
577
+ "terminal"
578
+ ],
579
+ "properties": {
580
+ "repository": { "type": "string" },
581
+ "protectedBase": { "type": "string" },
582
+ "pullRequestNumber": { "type": "integer", "minimum": 1 },
583
+ "assignmentRoot": { "$ref": "#/$defs/root" },
584
+ "initiativeRoot": { "$ref": "#/$defs/root" },
585
+ "sourceIdentityRoot": { "$ref": "#/$defs/root" },
586
+ "deliveryClass": {
587
+ "enum": [
588
+ "non-native-fast",
589
+ "native-proof-required",
590
+ "cross-platform",
591
+ "release"
592
+ ]
593
+ },
594
+ "identitySemantics": { "const": "chained-attempt-v2" },
595
+ "predecessorCandidateId": { "$ref": "#/$defs/root" },
596
+ "candidateId": { "$ref": "#/$defs/root" },
597
+ "sourceHead": { "$ref": "#/$defs/sha" },
598
+ "sourcePatchRoot": { "$ref": "#/$defs/root" },
599
+ "sourceProofRoot": { "$ref": "#/$defs/root" },
600
+ "planRoot": { "$ref": "#/$defs/root" },
601
+ "closureRoot": { "$ref": "#/$defs/root" },
602
+ "dependencyRoot": { "$ref": "#/$defs/root" },
603
+ "toolchainRoot": { "$ref": "#/$defs/root" },
604
+ "environmentRoot": { "$ref": "#/$defs/root" },
605
+ "nativeCommandContract": {
606
+ "type": "object",
607
+ "additionalProperties": false,
608
+ "required": ["schema", "runner", "command", "commandRoot"],
609
+ "properties": {
610
+ "schema": {
611
+ "const": "kungfu.buildchain.native-command-contract/v1"
612
+ },
613
+ "runner": { "const": "bash-lc" },
614
+ "command": { "type": "string", "minLength": 1 },
615
+ "commandRoot": { "$ref": "#/$defs/root" }
616
+ }
617
+ },
618
+ "affectedPaths": {
619
+ "type": "array",
620
+ "uniqueItems": true,
621
+ "items": { "type": "string", "minLength": 1 }
622
+ },
623
+ "shardEvidenceRoots": {
624
+ "type": "array",
625
+ "uniqueItems": true,
626
+ "items": { "$ref": "#/$defs/root" }
627
+ },
628
+ "qualificationDomains": {
629
+ "type": "array",
630
+ "uniqueItems": true,
631
+ "items": { "$ref": "#/$defs/root" }
632
+ },
633
+ "qualificationAttempts": { "type": "integer", "minimum": 0 },
634
+ "landingOvertakes": { "type": "integer", "minimum": 0 },
635
+ "enqueuedAt": { "type": "string", "format": "date-time" },
636
+ "updatedAt": { "type": "string", "format": "date-time" },
637
+ "status": {
638
+ "enum": [
639
+ "queued",
640
+ "qualifying",
641
+ "qualified",
642
+ "landing",
643
+ "merged",
644
+ "terminal-failure",
645
+ "dequeued",
646
+ "cancelled"
647
+ ]
648
+ },
649
+ "qualification": {
650
+ "oneOf": [
651
+ { "type": "null" },
652
+ { "$ref": "#/$defs/nativeQualification" },
653
+ { "$ref": "#/$defs/compatibilityQualification" }
654
+ ]
655
+ },
656
+ "terminal": {
657
+ "oneOf": [{ "type": "null" }, { "$ref": "#/$defs/terminal" }]
658
+ }
659
+ }
660
+ }
661
+ }
662
+ }