@kungfu-tech/buildchain 3.0.5 → 3.0.6-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/actions/macos-credential-island/README.md +8 -0
- package/bin/buildchain.mjs +1 -1
- package/contracts/auditable-demo-media-profiles-v1.json +61 -0
- package/contracts/auditable-demo-scenario-v1.schema.json +164 -0
- package/contracts/evidence/auditable-demo-responsive-web-delivery-v1.json +3 -3
- package/contracts/evidence/auditable-demo-web-delivery-v1.json +3 -3
- package/dist/site/buildchain-contract.json +107 -26
- package/dist/site/buildchain-site.json +121 -49
- package/dist/site/capability-registry.json +3 -3
- package/dist/site/cli-registry.json +9 -3
- package/dist/site/controller-registry.json +27 -3
- package/dist/site/kfd-claims.json +101 -15
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +10 -9
- package/dist/site/node-api-registry.json +540 -31
- package/dist/site/page-registry.json +105 -29
- package/dist/site/public-surface-audit.json +184 -11
- package/dist/site/publication-authority-registry.json +62 -1
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/site-manifest.json +13 -13
- package/dist/site/workflow-registry.json +118 -4
- package/docs/MAP.md +4 -1
- package/docs/auditable-demo.md +90 -7
- package/docs/aws-us-elastic-runner-burst-plane.md +151 -16
- package/docs/cli-reference.md +35 -2
- package/docs/dev-alpha-candidate-patrol.md +14 -5
- package/docs/dev-qualification-patrol.md +108 -0
- package/docs/node-api-reference.md +123 -72
- package/docs/publish-transaction.md +7 -5
- package/docs/release-flow.md +4 -0
- package/docs/release-governance.md +39 -0
- package/docs/release-propagation.md +93 -0
- package/docs/reusable-build-surface.md +53 -12
- package/docs/stable-candidate-patrol.md +5 -2
- package/package.json +1 -1
- package/packages/core/buildchain-contract.js +36 -1
- package/packages/core/buildchain-publication-authority.js +3 -0
- package/packages/core/public-surface-audit.js +4 -35
- package/packages/core/release-propagation-agent-entry.js +185 -0
- package/packages/core/release-propagation-pickup.js +387 -0
- package/packages/core/release-propagation-push.js +293 -0
- package/packages/core/release-propagation-release.js +61 -18
- package/packages/core/release-propagation-stage-evidence.js +36 -0
- package/packages/core/release-propagation-work.js +8 -4
- package/packages/core/release-propagation.js +27 -2
- package/packages/core/workflow-call-contract.js +308 -0
- package/packages/core/workflow-yaml-contract.js +272 -0
- package/scripts/artifact-signing-controller-core.mjs +525 -0
- package/scripts/artifact-signing-controller.mjs +302 -0
- package/scripts/artifact-signing-delegation.mjs +51 -3
- package/scripts/auditable-demo-platform.mjs +564 -0
- package/scripts/auditable-demo-renditions.mjs +7 -2
- package/scripts/auditable-demo-transport-smoke.mjs +176 -0
- package/scripts/auditable-demo.mjs +27 -21
- package/scripts/aws-macos-jit-controller-core.mjs +389 -0
- package/scripts/aws-macos-jit-controller-runtime.mjs +82 -0
- package/scripts/aws-macos-jit-controller.mjs +558 -0
- package/scripts/aws-macos-jit-job-controller.mjs +401 -0
- package/scripts/aws-windows-jit-campaign-core.mjs +296 -0
- package/scripts/aws-windows-jit-campaign.mjs +202 -0
- package/scripts/aws-windows-jit-controller-core.mjs +20 -2
- package/scripts/aws-windows-jit-controller.mjs +184 -109
- package/scripts/aws-windows-jit-core.mjs +21 -3
- package/scripts/aws-windows-jit.mjs +2 -0
- package/scripts/build-standalone-binary.mjs +6 -0
- package/scripts/buildchain-cli-help.mjs +2 -1
- package/scripts/capture-package-release-propagation.mjs +24 -1
- package/scripts/check-inventory.mjs +6 -0
- package/scripts/compiler-cache-evidence.mjs +90 -7
- package/scripts/dev-alpha-candidate-patrol.mjs +80 -5
- package/scripts/dev-pr-auto-merge.mjs +4 -4
- package/scripts/dev-qualification-patrol.mjs +594 -0
- package/scripts/dispatch-artifact-signing-authority.mjs +312 -61
- package/scripts/finalize-native-artifact-signing-result.mjs +37 -15
- package/scripts/generate-site-bundle.mjs +5 -0
- package/scripts/inspect-artifact-signing-requests.mjs +12 -0
- package/scripts/locked-source-checkout.mjs +17 -3
- package/scripts/release-propagation.mjs +150 -2
- package/scripts/run-lifecycle-core.mjs +25 -0
- package/scripts/site-capability-metadata.mjs +1 -1
- package/scripts/stable-candidate-patrol.mjs +30 -4
- package/scripts/workflow-call-contract.mjs +133 -0
|
@@ -8,12 +8,12 @@ confidence: high
|
|
|
8
8
|
sensitivity: public
|
|
9
9
|
evidence_grade: A
|
|
10
10
|
review_state: self-reviewed
|
|
11
|
-
last_reviewed: 2026-
|
|
11
|
+
last_reviewed: 2026-08-03
|
|
12
12
|
ai_provenance:
|
|
13
13
|
model_family: GPT-5
|
|
14
14
|
product: Codex
|
|
15
15
|
generated_at: 2026-07-29
|
|
16
|
-
visible_context: Existing Buildchain source locks, Kungfu exact-source Alpha preflight, Dev Patrol, repository release governance, and the consumer-owned settlement renderer threat model.
|
|
16
|
+
visible_context: Existing Buildchain source locks, Kungfu exact-source Alpha preflight, Dev Patrol, protected auto-merge policy, repository release governance, and the consumer-owned settlement renderer threat model.
|
|
17
17
|
invisible_context_boundary: No credentials, private logs, or private configuration were used.
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -114,12 +114,21 @@ service. Once the active PR settles or is abandoned, the next execution
|
|
|
114
114
|
recomputes current exact-SHA qualification and creates only the newest still
|
|
115
115
|
fresh candidate. It never trusts a `workflow_run` trigger SHA as evidence.
|
|
116
116
|
|
|
117
|
+
The caller may additionally set `auto-merge: true` and choose `merge-method`
|
|
118
|
+
from `merge`, `squash`, or `rebase`. Buildchain only arms GitHub auto-merge for
|
|
119
|
+
the single managed, open, exact-source candidate after the write-permission
|
|
120
|
+
settlement has revalidated the observation. GitHub still owns every required
|
|
121
|
+
review, required check, branch-protection, and merge-queue gate; Buildchain does
|
|
122
|
+
not approve or directly merge the PR. Invalid merge methods and GraphQL
|
|
123
|
+
refusals fail the patrol run.
|
|
124
|
+
|
|
117
125
|
Consumers should invoke this workflow after relevant qualification workflow
|
|
118
126
|
completion and from an offset periodic fallback. GitHub may delay scheduled
|
|
119
127
|
runs, so the event path supplies low latency while the fallback supplies
|
|
120
128
|
recovery. Workflow concurrency plus the server-side open-PR reconciliation
|
|
121
129
|
makes duplicate or delayed events idempotent.
|
|
122
130
|
|
|
123
|
-
The workflow never moves the Alpha ref directly,
|
|
124
|
-
request, publishes npm, creates a Git tag or GitHub Release, or
|
|
125
|
-
protection.
|
|
131
|
+
The workflow never moves the Alpha ref directly, directly merges the pull
|
|
132
|
+
request, approves it, publishes npm, creates a Git tag or GitHub Release, or
|
|
133
|
+
changes branch protection. Optional auto-merge only registers repository-owned
|
|
134
|
+
intent with GitHub; protected settlement remains authoritative.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: preview
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: dev-qualification-patrol
|
|
5
|
+
doc_type: architecture-and-usage
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: self-reviewed
|
|
11
|
+
last_reviewed: 2026-08-03
|
|
12
|
+
ai_provenance:
|
|
13
|
+
model_family: GPT-5
|
|
14
|
+
product: Codex
|
|
15
|
+
generated_at: 2026-08-03
|
|
16
|
+
visible_context: Existing Buildchain Shifu Gate receipts, Kungfu Dev Patrol, Alpha preflight, candidate patrol, and GitHub failed-job rerun semantics.
|
|
17
|
+
invisible_context_boundary: No credentials, private logs, or private configuration were used.
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Dev Qualification Patrol
|
|
21
|
+
|
|
22
|
+
Buildchain provides a reusable controller for repositories whose development
|
|
23
|
+
branch advances faster than a heavy cross-platform qualification workflow can
|
|
24
|
+
settle. The controller keeps no external queue. On every wakeup it derives the
|
|
25
|
+
only pending item from the current source-branch head and maintains these
|
|
26
|
+
states:
|
|
27
|
+
|
|
28
|
+
- `qualified`: the current source SHA already has a successful Dev run;
|
|
29
|
+
- `running`: one Dev run is active, with a different current SHA retained as
|
|
30
|
+
the implicit latest pending item;
|
|
31
|
+
- `waiting-preflight`: the current SHA has not passed its lightweight exact-SHA
|
|
32
|
+
preflight;
|
|
33
|
+
- `waiting-priority`: a declared Alpha or release workflow is queued or active;
|
|
34
|
+
- `dispatch-ready`: the latest SHA is preflight-qualified and no Dev or
|
|
35
|
+
priority run is active;
|
|
36
|
+
- `retry-ready`: the latest exact-SHA Dev run failed only at a classified
|
|
37
|
+
external boundary and remains inside the attempt limit; or
|
|
38
|
+
- `blocked`: the failure was deterministic, unknown, or exhausted its bounded
|
|
39
|
+
retry policy.
|
|
40
|
+
|
|
41
|
+
This is an event-driven, coalescing controller rather than a FIFO build queue.
|
|
42
|
+
If ten commits arrive during one slow Dev run, the next reconciliation observes
|
|
43
|
+
only the newest branch head. Intermediate unqualified SHAs are superseded
|
|
44
|
+
without consuming the shared native runners.
|
|
45
|
+
|
|
46
|
+
## Exact-source and priority contract
|
|
47
|
+
|
|
48
|
+
Call `.github/workflows/dev-qualification-patrol.yml` from a thin consumer
|
|
49
|
+
workflow after the lightweight preflight, Dev Patrol, and declared priority
|
|
50
|
+
workflows complete. Add an offset schedule as recovery for delayed or missed
|
|
51
|
+
GitHub events. Repeated wakeups are idempotent.
|
|
52
|
+
|
|
53
|
+
The controller requires a successful preflight whose `head_sha` equals the
|
|
54
|
+
current source head. It dispatches the heavy workflow on the source branch and
|
|
55
|
+
adds a controller-owned `source-sha` input. The consumer must reject the run
|
|
56
|
+
before qualification if that input differs from the workflow event SHA. This
|
|
57
|
+
closes the race where the branch advances between observation and workflow
|
|
58
|
+
startup. The heavy reusable Gate workflow then receives the exact SHA as its
|
|
59
|
+
`source-ref`, so every platform receipt remains source-bound.
|
|
60
|
+
|
|
61
|
+
`priority-workflows-json` is a JSON array of workflow paths. Any queued,
|
|
62
|
+
waiting, pending, requested, or in-progress run in those workflows prevents a
|
|
63
|
+
new Dev dispatch or automatic retry. This lets Alpha and release work keep
|
|
64
|
+
priority on shared self-hosted runners. A successful current Dev result remains
|
|
65
|
+
qualified even when priority work is active; priority only governs new heavy
|
|
66
|
+
work.
|
|
67
|
+
|
|
68
|
+
## Bounded local retry
|
|
69
|
+
|
|
70
|
+
The controller uses GitHub's failed-jobs rerun endpoint, not a fresh workflow
|
|
71
|
+
dispatch, for classified transient failures. Successful matrix jobs and their
|
|
72
|
+
exact-source receipts remain in the same workflow-run transaction. Failed jobs
|
|
73
|
+
and dependent aggregation run again. The Shifu Gate profile uploads platform,
|
|
74
|
+
diagnostic, aggregate, and controller artifacts with overwrite enabled so a
|
|
75
|
+
later attempt can replace only the same-run artifact names.
|
|
76
|
+
|
|
77
|
+
Automatic retry is deliberately narrow:
|
|
78
|
+
|
|
79
|
+
- whole-run `cancelled`, `timed_out`, or `startup_failure` conclusions qualify;
|
|
80
|
+
- checkout, setup, toolchain, download, upload, environment exposure, and
|
|
81
|
+
runner-workspace reset steps qualify;
|
|
82
|
+
- Gate execution, Gate enforcement, aggregation, and controller-receipt
|
|
83
|
+
failures never qualify; and
|
|
84
|
+
- an unknown failing step fails closed.
|
|
85
|
+
|
|
86
|
+
`max-attempts` counts the original attempt. The default `2` therefore permits
|
|
87
|
+
at most one automatic failed-jobs rerun. This policy reduces retry friction for
|
|
88
|
+
network, runner, and provider failures without laundering a product or Gate
|
|
89
|
+
failure into an infrastructure retry.
|
|
90
|
+
|
|
91
|
+
## Permission and mutation boundary
|
|
92
|
+
|
|
93
|
+
The reusable workflow always performs `observe` with Actions and contents read
|
|
94
|
+
permissions. The separate `mutate` job runs only when the observation proposes
|
|
95
|
+
`dispatch` or `rerun-failed-jobs`, `mutation-authorized` is true, and `dry-run`
|
|
96
|
+
is false. Before writing, it re-resolves the branch and all workflow state and
|
|
97
|
+
requires the action and source SHA to match the read-only observation. A race
|
|
98
|
+
fails closed and the next event recomputes from current truth.
|
|
99
|
+
|
|
100
|
+
Start a consumer in dry-run mode. Its observation and mutation decisions are
|
|
101
|
+
retained as exact-source artifacts with a canonical decision root. Enabling
|
|
102
|
+
mutation requires a repository token that can write Actions; no contents,
|
|
103
|
+
pull-request, tag, release, package, or publication permission is used.
|
|
104
|
+
|
|
105
|
+
The controller does not merge a PR, publish an Alpha, create a tag, create a
|
|
106
|
+
release, or settle a Release Passport. Once Dev and Alpha preflight evidence
|
|
107
|
+
both succeed for one SHA, the separate
|
|
108
|
+
[Dev to Alpha Candidate Patrol](dev-alpha-candidate-patrol.md) may select it.
|