@kungfu-tech/buildchain 4.1.2 → 4.1.3-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 (61) hide show
  1. package/CONTRIBUTING.md +7 -4
  2. package/architecture/action-taxonomy.json +4 -0
  3. package/architecture/agent-change-map.md +40 -0
  4. package/architecture/internal-capabilities.json +49 -0
  5. package/architecture/maintainability-debt.json +2 -1
  6. package/architecture/maintainability-policy.json +4 -4
  7. package/architecture/release-topology.json +11 -1
  8. package/architecture/universal-workflow-bootstrap.json +13 -2
  9. package/architecture/universal-workflow-capability-policy.json +15 -9
  10. package/contracts/promotion-invocation-v1.schema.json +6 -3
  11. package/contracts/promotion-request-v1.schema.json +6 -3
  12. package/contracts/release-discussion-v1.schema.json +140 -0
  13. package/dist/readers/release-discussion.cjs +203 -0
  14. package/dist/site/buildchain-contract.json +15 -11
  15. package/dist/site/buildchain-site.json +57 -6
  16. package/dist/site/capability-registry.json +3 -3
  17. package/dist/site/kfd-claims.json +95 -9
  18. package/dist/site/kfd-upstream-aggregate.json +1 -1
  19. package/dist/site/manual-registry.json +1 -1
  20. package/dist/site/node-api-registry.json +83 -1
  21. package/dist/site/page-registry.json +54 -3
  22. package/dist/site/public-surface-audit.json +53 -7
  23. package/dist/site/publication-registry.json +2 -2
  24. package/dist/site/release-provenance.json +2 -1
  25. package/dist/site/site-manifest.json +3 -3
  26. package/dist/site/workflow-registry.json +79 -7
  27. package/docs/node-api-reference.md +9 -0
  28. package/docs/release-discussions.md +154 -0
  29. package/package.json +10 -6
  30. package/packages/core/providers/github/discussions/materials.js +146 -0
  31. package/packages/core/providers/github/discussions/transport.js +115 -0
  32. package/packages/core/publication/binary/action.js +21 -7
  33. package/packages/core/release/discussion/actions.js +65 -0
  34. package/packages/core/release/discussion/binary.js +92 -0
  35. package/packages/core/release/discussion/checkpoints.js +241 -0
  36. package/packages/core/release/discussion/envelope.js +141 -0
  37. package/packages/core/release/discussion/publication.js +121 -0
  38. package/packages/core/release/discussion/qualification.js +121 -0
  39. package/packages/core/release/discussion/reader-entry.js +11 -0
  40. package/packages/core/release/discussion/reader.js +168 -0
  41. package/packages/core/release/discussion/recovery.js +132 -0
  42. package/packages/core/release/discussion/session.js +113 -0
  43. package/packages/core/release/discussion/store.js +169 -0
  44. package/packages/core/release/github-release.js +3 -1
  45. package/packages/core/release/promote-candidate/action.js +86 -6
  46. package/packages/core/release/promote-candidate/preparation.js +106 -0
  47. package/packages/core/release/promote-candidate/product-provider.js +4 -1
  48. package/packages/core/release/promote-candidate/provider-settlement.js +36 -23
  49. package/packages/core/release/promote-candidate/transaction.js +55 -97
  50. package/packages/core/release/promotion/candidate.js +11 -2
  51. package/packages/core/release/promotion/qualification.js +5 -2
  52. package/packages/core/release/promotion-request.js +8 -4
  53. package/packages/core/workflow/engine/execution.js +5 -1
  54. package/packages/core/workflow/engine/provider-context.js +2 -0
  55. package/packages/core/workflow/engine/release-observation.js +1 -0
  56. package/packages/core/workflow/engine/release-promotion.js +38 -26
  57. package/packages/core/workflow/universal-workflow-bootstrap.js +1 -0
  58. package/scripts/build-release-discussion-reader.mjs +34 -0
  59. package/scripts/inventory/binary.mjs +1 -1
  60. package/scripts/maintainability-metrics.mjs +1 -0
  61. package/scripts/site-capability-metadata.mjs +1 -0
@@ -5,8 +5,8 @@
5
5
  "summary": {
6
6
  "cliCommandCount": 117,
7
7
  "workflowCount": 67,
8
- "actionCount": 265,
9
- "sitePageCount": 93,
8
+ "actionCount": 268,
9
+ "sitePageCount": 94,
10
10
  "docCommandRefCount": 1036,
11
11
  "failureCount": 0
12
12
  },
@@ -864,6 +864,8 @@
864
864
  "controller-receipt-digest",
865
865
  "controller-receipt-json",
866
866
  "controller-receipt-status",
867
+ "discussion-id",
868
+ "discussion-url",
867
869
  "github-artifact-attestation-evidence-root",
868
870
  "github-artifact-attestation-id",
869
871
  "github-artifact-attestation-publication-receipt-digest",
@@ -888,7 +890,7 @@
888
890
  "release-tail-transaction-state",
889
891
  "release-transaction-root"
890
892
  ],
891
- "outputCount": 31
893
+ "outputCount": 33
892
894
  },
893
895
  {
894
896
  "id": "build",
@@ -1740,6 +1742,8 @@
1740
1742
  "controller-receipt-digest",
1741
1743
  "controller-receipt-json",
1742
1744
  "controller-receipt-status",
1745
+ "discussion-id",
1746
+ "discussion-url",
1743
1747
  "github-artifact-attestation-evidence-root",
1744
1748
  "github-artifact-attestation-id",
1745
1749
  "github-artifact-attestation-publication-receipt-digest",
@@ -1775,7 +1779,7 @@
1775
1779
  "release-tail-transaction-state",
1776
1780
  "release-transaction-root"
1777
1781
  ],
1778
- "outputCount": 43
1782
+ "outputCount": 45
1779
1783
  },
1780
1784
  {
1781
1785
  "id": "public-release-propagation",
@@ -4435,6 +4439,7 @@
4435
4439
  "repository",
4436
4440
  "required-artifacts-path",
4437
4441
  "required-status-check",
4442
+ "resume-discussion-id",
4438
4443
  "resume-transaction-id",
4439
4444
  "runtime-commit",
4440
4445
  "runtime-tree",
@@ -4442,12 +4447,13 @@
4442
4447
  "sealed-bundle-root",
4443
4448
  "source-sha",
4444
4449
  "stage-capsules-path",
4450
+ "standalone-binary-distribution",
4445
4451
  "state-path",
4446
4452
  "target-ref",
4447
4453
  "target-sha",
4448
4454
  "token"
4449
4455
  ],
4450
- "inputCount": 32
4456
+ "inputCount": 34
4451
4457
  },
4452
4458
  {
4453
4459
  "id": "release/promotion/classify",
@@ -4837,6 +4843,42 @@
4837
4843
  ],
4838
4844
  "inputCount": 11
4839
4845
  },
4846
+ {
4847
+ "id": "release/transaction/inspect",
4848
+ "path": "actions/release/transaction/inspect/action.yml",
4849
+ "inputs": [
4850
+ "session-json",
4851
+ "token"
4852
+ ],
4853
+ "inputCount": 2
4854
+ },
4855
+ {
4856
+ "id": "release/transaction/open",
4857
+ "path": "actions/release/transaction/open/action.yml",
4858
+ "inputs": [
4859
+ "discussion-id",
4860
+ "dry-run",
4861
+ "expected-nodes-json",
4862
+ "intent-key",
4863
+ "predecessor",
4864
+ "source-json",
4865
+ "token"
4866
+ ],
4867
+ "inputCount": 7
4868
+ },
4869
+ {
4870
+ "id": "release/transaction/record",
4871
+ "path": "actions/release/transaction/record/action.yml",
4872
+ "inputs": [
4873
+ "node",
4874
+ "payload-json",
4875
+ "sequence",
4876
+ "session-json",
4877
+ "status",
4878
+ "token"
4879
+ ],
4880
+ "inputCount": 6
4881
+ },
4840
4882
  {
4841
4883
  "id": "runtime/dependencies/install",
4842
4884
  "path": "actions/runtime/dependencies/install/action.yml",
@@ -5518,6 +5560,10 @@
5518
5560
  "id": "manual:release-candidate",
5519
5561
  "category": "manual"
5520
5562
  },
5563
+ {
5564
+ "id": "manual:release-discussions",
5565
+ "category": "manual"
5566
+ },
5521
5567
  {
5522
5568
  "id": "manual:release-flow",
5523
5569
  "category": "manual"
@@ -10831,8 +10877,8 @@
10831
10877
  "workflowRegistryPath": "dist/site/workflow-registry.json",
10832
10878
  "pageRegistryPath": "dist/site/page-registry.json",
10833
10879
  "cliRegistryDigest": "e43fdb0289df88871f3f0febbe04dcb9311a252a2b1df9b3a83a2d10c9d4a70f",
10834
- "workflowRegistryDigest": "36c67c70f168b8a727bd53c594e93e635c8df370078dc1e8ba537023e99a0fa1",
10835
- "pageRegistryDigest": "db7e6d4ea151259ee3cfc863d9f928d77db783548788771097a94f148d5f9a0a"
10880
+ "workflowRegistryDigest": "cb8d12101109a846a0aeba5c5bf82078df437118e3cccbe9ab0d173112a6f88a",
10881
+ "pageRegistryDigest": "6783dccba5aeb2044b6e2f7c7d78a3e47997a3163f7328a77ebdd0f4fdb087d4"
10836
10882
  },
10837
10883
  "comparison": {
10838
10884
  "missingCliRegistry": [],
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "b76388c9a5a82d956edac123d08a72945424a84e",
22
+ "sourceRevision": "8e1dcc5aba732fd253dbb50dc910a3187c1e688a",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "package": {
34
34
  "name": "@kungfu-tech/buildchain",
35
- "version": "4.1.2",
35
+ "version": "4.1.3-alpha.0",
36
36
  "versionSource": "package.json#version"
37
37
  },
38
38
  "sourceKind": "package-site-bundle",
@@ -119,7 +119,8 @@
119
119
  "./publication-rehearsal": "./packages/core/publication/publication-rehearsal.js",
120
120
  "./publication-qualification": "./packages/core/publication/publication-qualification.js",
121
121
  "./adopter-delivery": "./packages/core/adoption/adopter-delivery.js",
122
- "./cross-platform-adopter-qualification": "./packages/core/adoption/cross-platform-adopter-qualification.js"
122
+ "./cross-platform-adopter-qualification": "./packages/core/adoption/cross-platform-adopter-qualification.js",
123
+ "./release-discussion-reader": "./packages/core/release/discussion/reader.js"
123
124
  }
124
125
  },
125
126
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -19,7 +19,7 @@
19
19
  "declared Buildchain surface manifest contract"
20
20
  ],
21
21
  "sourceDateEpoch": "0",
22
- "sourceRevision": "b76388c9a5a82d956edac123d08a72945424a84e",
22
+ "sourceRevision": "8e1dcc5aba732fd253dbb50dc910a3187c1e688a",
23
23
  "timestampPolicyDetails": {
24
24
  "contract": "kungfu-buildchain-surface-timestamp-policy",
25
25
  "timestampFields": [
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "package": {
39
39
  "name": "@kungfu-tech/buildchain",
40
- "version": "4.1.2",
40
+ "version": "4.1.3-alpha.0",
41
41
  "versionSource": "package.json#version"
42
42
  },
43
43
  "entrypoint": "buildchain-site.json",
@@ -253,7 +253,7 @@
253
253
  "path": "docs/node-api-reference.md",
254
254
  "plane": "use",
255
255
  "exists": true,
256
- "digest": "sha256:ba1b9db61750646d507f086f0f267965a94b6c1276ab6d9f958ca4645b2a5073"
256
+ "digest": "sha256:b37478c7c5f6a4c09a89bb7f4dfe70c3ebcfa4cae21f25e09d16f499bf526afb"
257
257
  },
258
258
  {
259
259
  "id": "build-facts",
@@ -382,6 +382,8 @@
382
382
  "controller-receipt-digest",
383
383
  "controller-receipt-json",
384
384
  "controller-receipt-status",
385
+ "discussion-id",
386
+ "discussion-url",
385
387
  "github-artifact-attestation-evidence-root",
386
388
  "github-artifact-attestation-id",
387
389
  "github-artifact-attestation-publication-receipt-digest",
@@ -406,7 +408,7 @@
406
408
  "release-tail-transaction-state",
407
409
  "release-transaction-root"
408
410
  ],
409
- "outputCount": 31,
411
+ "outputCount": 33,
410
412
  "taxonomy": {
411
413
  "id": ".release-candidate-promote",
412
414
  "role": "component",
@@ -1044,7 +1046,7 @@
1044
1046
  "status": "preview",
1045
1047
  "owner": "buildchain-workflows",
1046
1048
  "maturity": "preview",
1047
- "introducedVersion": "4.1.2",
1049
+ "introducedVersion": "4.1.3-alpha.0",
1048
1050
  "compatibilityPromise": "current-contract-only",
1049
1051
  "deprecationReplacement": "",
1050
1052
  "sunsetCondition": "explicit-contract-change-review",
@@ -1733,6 +1735,8 @@
1733
1735
  "controller-receipt-digest",
1734
1736
  "controller-receipt-json",
1735
1737
  "controller-receipt-status",
1738
+ "discussion-id",
1739
+ "discussion-url",
1736
1740
  "github-artifact-attestation-evidence-root",
1737
1741
  "github-artifact-attestation-id",
1738
1742
  "github-artifact-attestation-publication-receipt-digest",
@@ -1768,7 +1772,7 @@
1768
1772
  "release-tail-transaction-state",
1769
1773
  "release-transaction-root"
1770
1774
  ],
1771
- "outputCount": 43,
1775
+ "outputCount": 45,
1772
1776
  "taxonomy": {
1773
1777
  "id": "release-candidate-promote",
1774
1778
  "role": "public",
@@ -2475,7 +2479,7 @@
2475
2479
  "status": "preview",
2476
2480
  "owner": "buildchain-workflows",
2477
2481
  "maturity": "preview",
2478
- "introducedVersion": "4.1.2",
2482
+ "introducedVersion": "4.1.3-alpha.0",
2479
2483
  "compatibilityPromise": "current-contract-only",
2480
2484
  "deprecationReplacement": "",
2481
2485
  "sunsetCondition": "explicit-contract-change-review",
@@ -2505,7 +2509,7 @@
2505
2509
  "status": "preview",
2506
2510
  "owner": "buildchain-workflows",
2507
2511
  "maturity": "preview",
2508
- "introducedVersion": "4.1.2",
2512
+ "introducedVersion": "4.1.3-alpha.0",
2509
2513
  "compatibilityPromise": "current-contract-only",
2510
2514
  "deprecationReplacement": "",
2511
2515
  "sunsetCondition": "explicit-contract-change-review",
@@ -2535,7 +2539,7 @@
2535
2539
  "status": "preview",
2536
2540
  "owner": "buildchain-workflows",
2537
2541
  "maturity": "preview",
2538
- "introducedVersion": "4.1.2",
2542
+ "introducedVersion": "4.1.3-alpha.0",
2539
2543
  "compatibilityPromise": "current-contract-only",
2540
2544
  "deprecationReplacement": "",
2541
2545
  "sunsetCondition": "explicit-contract-change-review",
@@ -7044,6 +7048,7 @@
7044
7048
  "repository",
7045
7049
  "required-artifacts-path",
7046
7050
  "required-status-check",
7051
+ "resume-discussion-id",
7047
7052
  "resume-transaction-id",
7048
7053
  "runtime-commit",
7049
7054
  "runtime-tree",
@@ -7051,12 +7056,13 @@
7051
7056
  "sealed-bundle-root",
7052
7057
  "source-sha",
7053
7058
  "stage-capsules-path",
7059
+ "standalone-binary-distribution",
7054
7060
  "state-path",
7055
7061
  "target-ref",
7056
7062
  "target-sha",
7057
7063
  "token"
7058
7064
  ],
7059
- "inputCount": 32,
7065
+ "inputCount": 34,
7060
7066
  "capabilityGroup": "release-passport-trust",
7061
7067
  "status": "active",
7062
7068
  "owner": "buildchain-actions",
@@ -7735,6 +7741,72 @@
7735
7741
  "sunsetCondition": "explicit-contract-change-review",
7736
7742
  "nonDuplicationRationale": "One capability node owns the composite or JavaScript adapter boundary."
7737
7743
  },
7744
+ {
7745
+ "apiRole": "implementation",
7746
+ "id": "release/transaction/inspect",
7747
+ "path": "actions/release/transaction/inspect/action.yml",
7748
+ "inputs": [
7749
+ "session-json",
7750
+ "token"
7751
+ ],
7752
+ "inputCount": 2,
7753
+ "capabilityGroup": "release-passport-trust",
7754
+ "status": "active",
7755
+ "owner": "buildchain-actions",
7756
+ "maturity": "stable",
7757
+ "introducedVersion": "4.1.0-alpha.0",
7758
+ "compatibilityPromise": "current-contract-only",
7759
+ "deprecationReplacement": "",
7760
+ "sunsetCondition": "explicit-contract-change-review",
7761
+ "nonDuplicationRationale": "One capability node owns the composite or JavaScript adapter boundary."
7762
+ },
7763
+ {
7764
+ "apiRole": "implementation",
7765
+ "id": "release/transaction/open",
7766
+ "path": "actions/release/transaction/open/action.yml",
7767
+ "inputs": [
7768
+ "discussion-id",
7769
+ "dry-run",
7770
+ "expected-nodes-json",
7771
+ "intent-key",
7772
+ "predecessor",
7773
+ "source-json",
7774
+ "token"
7775
+ ],
7776
+ "inputCount": 7,
7777
+ "capabilityGroup": "release-passport-trust",
7778
+ "status": "active",
7779
+ "owner": "buildchain-actions",
7780
+ "maturity": "stable",
7781
+ "introducedVersion": "4.1.0-alpha.0",
7782
+ "compatibilityPromise": "current-contract-only",
7783
+ "deprecationReplacement": "",
7784
+ "sunsetCondition": "explicit-contract-change-review",
7785
+ "nonDuplicationRationale": "One capability node owns the composite or JavaScript adapter boundary."
7786
+ },
7787
+ {
7788
+ "apiRole": "implementation",
7789
+ "id": "release/transaction/record",
7790
+ "path": "actions/release/transaction/record/action.yml",
7791
+ "inputs": [
7792
+ "node",
7793
+ "payload-json",
7794
+ "sequence",
7795
+ "session-json",
7796
+ "status",
7797
+ "token"
7798
+ ],
7799
+ "inputCount": 6,
7800
+ "capabilityGroup": "release-passport-trust",
7801
+ "status": "active",
7802
+ "owner": "buildchain-actions",
7803
+ "maturity": "stable",
7804
+ "introducedVersion": "4.1.0-alpha.0",
7805
+ "compatibilityPromise": "current-contract-only",
7806
+ "deprecationReplacement": "",
7807
+ "sunsetCondition": "explicit-contract-change-review",
7808
+ "nonDuplicationRationale": "One capability node owns the composite or JavaScript adapter boundary."
7809
+ },
7738
7810
  {
7739
7811
  "apiRole": "implementation",
7740
7812
  "id": "runtime/dependencies/install",
@@ -2707,3 +2707,12 @@ Target: `./packages/core/adoption/cross-platform-adopter-qualification.js`. Publ
2707
2707
  | `CROSS_PLATFORM_NEUTRAL_DRIVER` | constant: const CROSS_PLATFORM_NEUTRAL_DRIVER | none | value | Import does not declare a throw contract. | none-on-import | `import { CROSS_PLATFORM_NEUTRAL_DRIVER } from "@kungfu-tech/buildchain/cross-platform-adopter-qualification";` | `packages/core/adoption/cross-platform-adopter-qualification.js:12` |
2708
2708
  | `qualifyCrossPlatformAdopters` | function: function qualifyCrossPlatformAdopters({ reports, consumers }) | { reports, consumers } | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | may-write-or-invoke-external-actions | `import { qualifyCrossPlatformAdopters } from "@kungfu-tech/buildchain/cross-platform-adopter-qualification";` | `packages/core/adoption/cross-platform-adopter-qualification.js:143` |
2709
2709
  | `validateCrossPlatformAdopterReport` | function: function validateCrossPlatformAdopterReport(report) | report | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { validateCrossPlatformAdopterReport } from "@kungfu-tech/buildchain/cross-platform-adopter-qualification";` | `packages/core/adoption/cross-platform-adopter-qualification.js:97` |
2710
+
2711
+ ## `@kungfu-tech/buildchain/release-discussion-reader`
2712
+
2713
+ Target: `./packages/core/release/discussion/reader.js`. Public symbols: 2.
2714
+
2715
+ | Symbol | Kind and signature | Parameters | Return | Errors | Side effects | Example | Source |
2716
+ | --- | --- | --- | --- | --- | --- | --- | --- |
2717
+ | `discussionStatus` | function: function discussionStatus(state) | state | unknown | Errors from called operations may propagate; no narrower throw contract is declared in source. | none-detected-by-static-source-scan | `import { discussionStatus } from "@kungfu-tech/buildchain/release-discussion-reader";` | `packages/core/release/discussion/reader.js:151` |
2718
+ | `readReleaseDiscussion` | function: function readReleaseDiscussion({ body, records }) | { body, records } | unknown | May throw an Error on rejected input or failed operations; follow the linked source contract. | none-detected-by-static-source-scan | `import { readReleaseDiscussion } from "@kungfu-tech/buildchain/release-discussion-reader";` | `packages/core/release/discussion/reader.js:11` |
@@ -0,0 +1,154 @@
1
+ ---
2
+ status: draft
3
+ period: ongoing
4
+ theme: release-discussion-transactions
5
+ doc_type: implementation-contract
6
+ source_level: user-consensus
7
+ confidence: medium
8
+ sensitivity: public
9
+ evidence_grade: B
10
+ review_state: unreviewed
11
+ last_reviewed: 2026-09-12
12
+ ai_provenance:
13
+ model_family: GPT-6
14
+ product: Codex
15
+ generated_at: 2026-09-12
16
+ visible_context: Release workflow implementation and agreed consumer Discussion transaction model.
17
+ invisible_context_boundary: Hosted token qualification and alpha publication are not claimed by this document.
18
+ ---
19
+
20
+ # Release Discussion transactions
21
+
22
+ One release intent owns one Discussion in the consumer repository. Its immutable
23
+ body declares the intent and the complete expected semantic node list. The
24
+ Announcements category is resolved by the initialization service; subsequent
25
+ operations receive the exact Discussion ID. Categories have repository-specific
26
+ IDs. Enable Discussions and retain the Announcements category before executing a
27
+ release. A preview performs no Discussion reads or writes.
28
+
29
+ The caller grants `discussions: write` to the reusable workflow job alongside its
30
+ existing release permissions. The called workflow uses the consumer's automatic
31
+ `GITHUB_TOKEN`. Checking out Buildchain does not change that repository or token.
32
+ A reusable workflow cannot elevate the permissions granted by its caller.
33
+
34
+ ```yaml
35
+ jobs:
36
+ release:
37
+ permissions:
38
+ contents: write
39
+ discussions: write
40
+ actions: write
41
+ id-token: write
42
+ uses: kungfu-systems/buildchain/.github/workflows/public-release-promote.yml@v4
43
+ with:
44
+ request-json: ${{ inputs.request-json }}
45
+ runtime-ref: ${{ inputs.runtime-ref || '' }}
46
+ ```
47
+
48
+ This fragment illustrates the additional Discussion permission; retain other
49
+ permissions required by the consumer's publication provider. The platform
50
+ contracts are documented in GitHub's [reusable workflow reference](https://docs.github.com/en/actions/reference/workflows-and-actions/reusing-workflow-configurations)
51
+ and [Discussions API guide](https://docs.github.com/en/graphql/guides/using-the-graphql-api-for-discussions).
52
+
53
+ ## Records and concurrency
54
+
55
+ The body is not a mutable global status document. Workflows append bounded JSON
56
+ envelopes in comments. Each record contains an intent ID, workflow attempt,
57
+ predecessor, semantic node, sequence, status, payload schema, and the selected
58
+ runtime's exact repository and revision. These are provenance; downstream nodes
59
+ do not compare the runtime revision with the workflow entry revision.
60
+
61
+ Node owners serialize their own sequences. Different node owners append
62
+ independent comments. Recovery explicitly selects the predecessor in the same
63
+ Discussion. A late result from an older attempt remains history; it cannot
64
+ complete or overwrite the recovering attempt. Success requires every declared
65
+ node, including nodes whose records have not appeared. Reusing completed work
66
+ requires explicit qualification by the recovering runtime.
67
+
68
+ The release controller must serialize initialization for one intent. GitHub does
69
+ not supply a unique constraint, compare-and-swap or exactly-once mutation API.
70
+ Initialization scans complete repository category pages, reuses the matching
71
+ intent, and refuses duplicate owners. A mutation whose response was lost is read
72
+ back before another write. If its outcome remains unknown, execution stops with
73
+ an explicit diagnosis. `clientMutationId` is not used as an idempotency guarantee.
74
+ Exact IDs carry the transaction through execution; search indexing is not an
75
+ execution dependency. Pagination limits fail closed instead of silently hiding
76
+ records. Only records from the original workflow writer are authoritative;
77
+ ordinary community replies are excluded and edited transaction records are
78
+ reported as integrity failures.
79
+
80
+ ## Recovery bytes and historical readers
81
+
82
+ Large sealed inputs and provider checkpoints are retained as immutable,
83
+ content-addressed assets in a draft material archive associated with the intent.
84
+ The archive is storage, not publication state. A Discussion checkpoint commits
85
+ the exact material manifest after upload and byte readback. Failed uploads can
86
+ leave unreferenced material but cannot commit an incomplete checkpoint. No
87
+ transaction-log history is added to the consumer's source Git object database.
88
+ Actual version-code commits and publication refs retain their existing roles.
89
+
90
+ Each runtime distributes the standalone `dist/readers/release-discussion.cjs`.
91
+ The same pure reader is available as the versioned Node API
92
+ `@kungfu-tech/buildchain/release-discussion-reader`. Records carry the standalone
93
+ reader byte digest. The recovery archive retains the exact reader bytes and the public
94
+ release includes the first retained reader asset. Recovery preserves those public
95
+ bytes while retaining each later writer's decoder in the archive. The standalone reader accepts captured JSON
96
+ on standard input and emits a projection and a small
97
+ `buildchain.release-handoff/v1` document. It performs no provider effects.
98
+
99
+ ```sh
100
+ node --permission --allow-fs-read=/absolute/path/release-discussion.cjs \
101
+ /absolute/path/release-discussion.cjs < captured-discussion.json
102
+ ```
103
+
104
+ A payload with a different schema belongs to its recorded historical reader.
105
+ The current runtime does not silently reinterpret it. Historical decoding and
106
+ new execution are separate: the recovering runtime consumes a supported handoff,
107
+ qualifies original source and material, and reads providers before issuing any
108
+ remaining effects. Switching runtime X to Y creates new attempt records in the
109
+ same Discussion. It neither rewrites X's records nor changes the release intent.
110
+
111
+ ## Ownership
112
+
113
+ `actions/release/transaction/{open,record,inspect}` are reusable Node adapters.
114
+ `packages/core/release/discussion` owns envelopes, projections, sessions and
115
+ recovery contracts. `packages/core/providers/github/discussions` owns GitHub
116
+ transport and immutable material IO. The existing public promotion workflow
117
+ owns job boundaries; the Rust publication state machine still owns publication
118
+ decisions and provider-effect ordering.
119
+
120
+ The public Bootstrap API also exposes the `release-discussion` capability for
121
+ consumer transport qualification and read-only diagnosis. Buildchain's existing
122
+ Bootstrap dogfood caller accepts this request through its manual
123
+ `request-json` input, preserving the same public entry and central
124
+ runtime preparation as other consumers.
125
+
126
+ ## First publication with a selected runtime
127
+
128
+ For Buildchain self-publication, dispatch `self-release-promote.yml` with the exact
129
+ protected alpha `sha`, its `target-ref`, `dry-run: "false"`, and the desired
130
+ `runtime-ref`. Leave recovery selectors empty for a first publication. The public
131
+ publisher still verifies the protected source and obtains fresh hosted admission.
132
+ `recover-durable-transaction` is reserved for an existing partial publication;
133
+ it is not required merely because the selected runtime differs from the entry.
134
+
135
+ ## Resume by Discussion
136
+
137
+ Pass `resume-discussion-id` in the public promotion request and select the repaired
138
+ train through `runtime-ref`. Keep the protected target ref and source coordinates.
139
+ The qualifier restores content-addressed candidate material, verifies original
140
+ qualification, then re-observes providers before any remaining publication effect.
141
+ Do not combine this selector with candidate-run or transaction-id recovery.
142
+
143
+ When standalone binary distribution is requested, the intent also requires the
144
+ `binary-distribution` node. Its separate workflow resolves the immutable locator
145
+ from the public release, captures the active attempt, and appends provider readback
146
+ to that attempt. A result arriving after recovery stays on the older attempt.
147
+ The terminal publication receipt remains independently verifiable even while
148
+ next-development or binary distribution is incomplete.
149
+
150
+ The manual Bootstrap caller inherits the declared repository workflow permissions;
151
+ the typed capability request must declare its own subset. `verifyMaterials: true`
152
+ on a qualification request additionally tests draft Release asset retention using
153
+ `contents: write`. The initial injected failure is intentional and leaves durable
154
+ records for a subsequent runtime recovery probe.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kungfu-tech/buildchain",
3
- "version": "4.1.2",
3
+ "version": "4.1.3-alpha.0",
4
4
  "private": false,
5
5
  "description": "Buildchain Release Passport, release governance, CLI toolkit, and site facts.",
6
6
  "repository": "https://github.com/kungfu-systems/buildchain",
@@ -122,7 +122,8 @@
122
122
  "./publication-rehearsal": "./packages/core/publication/publication-rehearsal.js",
123
123
  "./publication-qualification": "./packages/core/publication/publication-qualification.js",
124
124
  "./adopter-delivery": "./packages/core/adoption/adopter-delivery.js",
125
- "./cross-platform-adopter-qualification": "./packages/core/adoption/cross-platform-adopter-qualification.js"
125
+ "./cross-platform-adopter-qualification": "./packages/core/adoption/cross-platform-adopter-qualification.js",
126
+ "./release-discussion-reader": "./packages/core/release/discussion/reader.js"
126
127
  },
127
128
  "files": [
128
129
  "AGENTS.md",
@@ -142,7 +143,8 @@
142
143
  "docs/*.md",
143
144
  "fixtures/*/README.md",
144
145
  "scripts/",
145
- "actions/*/*/*/README.md"
146
+ "actions/*/*/*/README.md",
147
+ "dist/readers/"
146
148
  ],
147
149
  "engines": {
148
150
  "node": ">=22.14.0"
@@ -155,7 +157,7 @@
155
157
  "scripts": {
156
158
  "precheck:static": "prettier --check architecture/decisions/0003-two-phase-delivery-warrant.md architecture/delivery-authority-parity.json contracts/dev-delivery-authority-v2.schema.json dist/site/schemas/dev-delivery-authority-v2.schema.json docs/dev-delivery-qualification-landing-adr.md packages/core/dev-delivery/dev-delivery-authority-candidate.js packages/core/dev-delivery/dev-delivery-authority-evidence.js packages/core/dev-delivery/dev-delivery-authority-landing.js packages/core/dev-delivery/dev-delivery-authority-observation.js packages/core/dev-delivery/dev-delivery-authority-qualification.js packages/core/dev-delivery/dev-delivery-authority-settlement.js packages/core/dev-delivery/dev-delivery-authority-state.js packages/core/dev-delivery/dev-delivery-execution-failure.js packages/core/dev-delivery/dev-delivery-execution-transfer.js packages/core/dev-delivery/dev-delivery-landing-readback.js packages/core/dev-delivery/dev-delivery-landing-terminal-evidence.js packages/core/dev-delivery/dev-delivery-landing-testing-port.js packages/core/dev-delivery/dev-delivery-native-execution.js packages/core/dev-delivery/dev-delivery-native-proof.js packages/core/dev-delivery/dev-delivery-process-boundary.js packages/core/dev-delivery/dev-delivery-warrant-qualification.js packages/core/dev-delivery/dev-delivery-warrant-state.js packages/core/dev-delivery/commands/dev-delivery-authority-command-adapters.mjs packages/core/dev-delivery/commands/dev-delivery-authority-provider.mjs packages/core/dev-delivery/commands/dev-delivery-authority.mjs packages/core/dev-delivery/native/execution.js packages/core/dev-delivery/commands/dev-delivery-process-boundary.mjs packages/core/dev-delivery/native/transactions.js packages/core/dev-delivery/commands/dev-delivery-two-phase.mjs packages/core/dev-delivery/commands/dev-delivery-warrant-options.mjs packages/core/dev-delivery/warrant/persistence.js templates/native-dev-delivery.yml",
157
159
  "operator:windows-jit": "bash packages/core/providers/commands/aws-windows-jit-operator.sh",
158
- "check": "pnpm run check:layout && node scripts/check-runtime-entry.mjs && pnpm run check:implementation-naming && pnpm run check:static && node scripts/check-ci-lane-change-budget.mjs && node scripts/check-public-dogfood-contract.mjs && node scripts/check-floating-consumer-policy-contract.mjs && node scripts/check-release-topology.mjs && node scripts/check-universal-workflow-bootstrap.mjs && pnpm run check:bridge && pnpm run check:contracts:rust && pnpm run check:wasm && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/generate-agent-change-map.mjs && node scripts/check-inventory.mjs && node scripts/check-core-mechanism-inventory.mjs && node scripts/check-runtime-semantic-closure.mjs && node scripts/check-capability-parity-inventory.mjs && node scripts/check-release-tail-contract.mjs && node scripts/publication-rehearsal-fixture.mjs --check && node packages/core/governance/commands/architecture.mjs validate && node scripts/warrant-shadow-plan.mjs validate && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && pnpm run check:golden-path && node scripts/check-action-bundles.mjs",
160
+ "check": "pnpm run check:discussion-reader && pnpm run check:layout && node scripts/check-runtime-entry.mjs && pnpm run check:implementation-naming && pnpm run check:static && node scripts/check-ci-lane-change-budget.mjs && node scripts/check-public-dogfood-contract.mjs && node scripts/check-floating-consumer-policy-contract.mjs && node scripts/check-release-topology.mjs && node scripts/check-universal-workflow-bootstrap.mjs && pnpm run check:bridge && pnpm run check:contracts:rust && pnpm run check:wasm && node scripts/check-maintainability.mjs && node scripts/check-internal-architecture.mjs && node scripts/generate-agent-change-map.mjs && node scripts/check-inventory.mjs && node scripts/check-core-mechanism-inventory.mjs && node scripts/check-runtime-semantic-closure.mjs && node scripts/check-capability-parity-inventory.mjs && node scripts/check-release-tail-contract.mjs && node scripts/publication-rehearsal-fixture.mjs --check && node packages/core/governance/commands/architecture.mjs validate && node scripts/warrant-shadow-plan.mjs validate && pnpm run check:site && pnpm run check:workflows && pnpm run test:unit && pnpm run check:golden-path && node scripts/check-action-bundles.mjs",
159
161
  "check:static": "node scripts/check-javascript-syntax.mjs && node scripts/check-source-bindings.mjs && prettier --check architecture/*.json contracts/release-tail-provider-bindings-v1.schema.json contracts/v4-canonical-contracts-v1.schema.json contracts/v4-compatibility-facts-v1.schema.json contracts/v4-delivery-warrant-semantic-diff-report-v1.schema.json contracts/v4-delivery-warrant-trace-v1.schema.json contracts/v4-floating-consumer-policy-receipt-v1.schema.json contracts/runtime-resume-lineage-v2.schema.json contracts/v4-tail-reseal-v1.schema.json contracts/v4-host-contract-v1.schema.json contracts/v4-provider-operation-journal-v1.schema.json contracts/v4-release-activation-shadow-v1.schema.json contracts/v4-stable-publication-fence-v1.schema.json contracts/v4-partial-mutation-recovery-v1.schema.json contracts/v4-stage-capsule-v1.schema.json contracts/v4-stage-capsule-store-v1.schema.json contracts/v4-stage-capsule-resume-v1.schema.json contracts/release-tail-capabilities-v1.schema.json contracts/fixtures/release-tail-capabilities-v1/*.json contracts/fixtures/v4-delivery-warrant-trace-v1/*.json contracts/fixtures/v4-floating-consumer-policy-v1/*.json contracts/fixtures/runtime-resume-lineage-v2/*.json contracts/fixtures/v4-tail-reseal-v1/*.json contracts/fixtures/v4-compatibility-facts-v1/*.json contracts/fixtures/v4-provider-operation-journal-v1/*.json contracts/fixtures/v4-provider-readback-idempotency-v1/*.json contracts/fixtures/v4-release-activation-shadow-v1/*.json contracts/fixtures/v4-stable-publication-fence-v1/*.json contracts/fixtures/v4-partial-mutation-recovery-v1/*.json contracts/fixtures/v4-stage-capsule-v1/*.json contracts/fixtures/v4-stage-capsule-store-v1/*.json contracts/fixtures/v4-stage-capsule-resume-v1/*.json packages/core/contracts/command-registry.mjs packages/core/governance/cli/compatibility-facts.mjs packages/core/contracts/canonical-contracts.js packages/core/contracts/kungfu-temporal-fact.js packages/core/governance/buildchain-compatibility-fact.js packages/core/governance/buildchain-compatibility-authority.js packages/core/governance/buildchain-compatibility-proof.js packages/core/consumer/floating-consumer-evidence.js packages/core/consumer/floating-consumer-policy.js packages/core/consumer/floating-consumer-release-passport.js packages/core/release/recovery/lineage.js packages/core/release/tail-reseal-contract.js packages/core/release/tail-reseal-github.js packages/core/release/tail-reseal-receipt.js packages/core/release/tail-reseal.js packages/core/consumer/runtime-selector-persistence.js packages/core/release/provider-operation-journal.js packages/core/release/provider-readback-idempotency.js packages/core/release/release-activation-shadow.js packages/core/release/stable-publication-fence.js packages/core/release/partial-mutation-recovery-qualification.js packages/core/build/stage-capsule.js packages/core/build/stage-capsule-store.js packages/core/build/stage-capsule-local-store.js packages/core/build/platform-stage-checkpoints.js packages/core/build/stage-capsule-resume-planner.js packages/core/build/stage-capsule-qualification.js packages/core/build/stage-capsule-qualification-campaign.js packages/core/dev-delivery/delivery-warrant-fixture-runner.js packages/core/dev-delivery/delivery-warrant-read-candidate.js packages/core/dev-delivery/delivery-warrant-semantic-diff-gate.js packages/core/dev-delivery/delivery-warrant-shadow-adapter.js scripts/check-core-mechanism-inventory.mjs scripts/check-runtime-semantic-closure.mjs scripts/check-release-tail-contract.mjs scripts/check-javascript-syntax.mjs scripts/check-maintainability.mjs packages/core/dev-delivery/commands/dev-pr-prequeue-guard.mjs scripts/check-public-dogfood-contract.mjs scripts/maintainability-metrics.mjs scripts/maintainability-domain-metrics.mjs scripts/maintainability-governance.mjs scripts/generate-agent-change-map.mjs scripts/public-reference.mjs scripts/site-reference-registry.mjs scripts/generate-public-reference.mjs packages/core/governance/commands/architecture.mjs packages/core/runtime/commands/bridge-bootstrap.mjs scripts/bridge-evidence.mjs packages/core/consumer/commands/consumer-policy.mjs packages/core/runtime/commands/host-adapter.mjs scripts/platform-stage-checkpoint-rehearsal.mjs scripts/stage-capsule-resume-rehearsal.mjs packages/core/build/commands/stage-capsule-qualification.mjs scripts/tail-reseal-macos-rehearsal.mjs packages/core/release/commands/tail-reseal.mjs scripts/warrant-shadow-plan.mjs scripts/verify-golden-path.mjs tests/runtime-entry-provider.test.mjs tests/command-registry.test.mjs tests/core-mechanism-inventory.test.mjs tests/release-tail-contract.test.mjs tests/maintainability.test.mjs tests/maintainability-governance.test.mjs tests/promotion-responsibilities.test.mjs tests/public-reference.test.mjs tests/architecture.test.mjs tests/bridge.test.mjs tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-resume-lineage.test.mjs tests/runtime-semantic-closure.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs tests/warrant-shadow-plan.test.mjs",
160
162
  "check:bridge": "cargo fmt --manifest-path crates/buildchain-host-bridge/Cargo.toml -- --check && cargo clippy --locked --manifest-path crates/buildchain-host-bridge/Cargo.toml -- -D warnings && cargo test --locked --manifest-path crates/buildchain-host-bridge/Cargo.toml",
161
163
  "check:contracts": "pnpm run check:contracts:rust && node --test tests/canonical-contracts.test.mjs tests/delivery-warrant-fixture-runner.test.mjs tests/delivery-warrant-read-candidate.test.mjs tests/domain-wasm.test.mjs tests/floating-consumer-policy-contract.test.mjs tests/floating-consumer-policy.test.mjs tests/runtime-resume-lineage.test.mjs tests/tail-reseal.test.mjs tests/tail-reseal-parity.test.mjs tests/compatibility-facts.test.mjs tests/publication-rehearsal.test.mjs tests/platform-stage-checkpoints.test.mjs tests/provider-operation-journal.test.mjs tests/provider-readback-idempotency.test.mjs tests/public-dogfood-contract.test.mjs tests/release-activation-shadow.test.mjs tests/stable-publication-fence.test.mjs tests/partial-mutation-recovery-qualification.test.mjs tests/stage-capsule.test.mjs tests/stage-capsule-store.test.mjs tests/stage-capsule-resume-planner.test.mjs tests/stage-capsule-qualification.test.mjs",
@@ -170,7 +172,7 @@
170
172
  "check:site": "pnpm run check:next-development && pnpm run check:reference && node scripts/generate-site-bundle.mjs --check",
171
173
  "check:golden-path": "node scripts/verify-golden-path.mjs",
172
174
  "test:unit": "node --test tests/*.test.mjs",
173
- "build": "pnpm -r --filter \"./actions/**\" build",
175
+ "build": "pnpm run build:discussion-reader && pnpm -r --filter \"./actions/**\" build",
174
176
  "binary:build": "node scripts/build-standalone-binary.mjs",
175
177
  "package": "npm pack --dry-run --json --registry=https://registry.npmjs.org/",
176
178
  "pack:check": "npm pack --dry-run --json --registry=https://registry.npmjs.org/",
@@ -180,7 +182,9 @@
180
182
  "check:contracts:rust": "cargo fmt --manifest-path crates/buildchain-domain-contracts/Cargo.toml -- --check && cargo clippy --locked --manifest-path crates/buildchain-domain-contracts/Cargo.toml -- -D warnings && cargo test --locked --manifest-path crates/buildchain-domain-contracts/Cargo.toml",
181
183
  "generate:workflows": "node scripts/generate-workflow-taxonomy.mjs && node scripts/generate-bootstrap-admission.mjs",
182
184
  "check:implementation-naming": "node scripts/check-implementation-naming.mjs",
183
- "check:layout": "node scripts/check-code-layout.mjs"
185
+ "check:layout": "node scripts/check-code-layout.mjs",
186
+ "build:discussion-reader": "node scripts/build-release-discussion-reader.mjs",
187
+ "check:discussion-reader": "node scripts/build-release-discussion-reader.mjs --check"
184
188
  },
185
189
  "devDependencies": {
186
190
  "@actions/expressions": "0.3.61",