@kungfu-tech/buildchain 3.0.6 → 3.0.7-alpha.1
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 +4 -2
- package/actions/promote-buildchain-ref/README.md +10 -0
- package/actions/release-tail/README.md +17 -0
- package/bin/buildchain.mjs +11 -0
- package/bin/internal/command-registry.mjs +2 -0
- package/contracts/auditable-demo-scenario-v1.schema.json +1 -1
- package/contracts/engineering-housekeeper-v1.schema.json +143 -0
- package/contracts/fixtures/engineering-housekeeper-v1/cases.json +68 -0
- package/contracts/fixtures/release-tail-capabilities-v1/kungfu-alpha.json +273 -0
- package/contracts/publication-rehearsal-capsule-v1.schema.json +173 -0
- package/contracts/release-tail-capabilities-v1.schema.json +199 -0
- package/contracts/release-tail-provider-bindings-v1.schema.json +56 -0
- package/dist/site/agent-index.json +3 -0
- package/dist/site/artifact-schemas.json +6 -0
- package/dist/site/buildchain-contract.json +42 -27
- package/dist/site/buildchain-site.json +384 -33
- package/dist/site/capability-registry.json +15 -12
- package/dist/site/cli-registry.json +102 -0
- package/dist/site/controller-registry.json +19 -3
- package/dist/site/kfd-claims.json +359 -17
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +53 -7
- package/dist/site/node-api-registry.json +5882 -3605
- package/dist/site/page-registry.json +348 -21
- package/dist/site/public-surface-audit.json +396 -16
- package/dist/site/publication-authority-registry.json +106 -1
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +7 -0
- package/dist/site/schemas/publication-rehearsal-capsule-v1.schema.json +269 -0
- package/dist/site/schemas/release-tail-capabilities-v1.schema.json +353 -0
- package/dist/site/schemas/release-tail-provider-bindings-v1.schema.json +94 -0
- package/dist/site/site-manifest.json +35 -11
- package/dist/site/workflow-registry.json +204 -10
- package/docs/MAP.md +6 -2
- package/docs/auditable-demo.md +2 -2
- package/docs/cli-reference.md +136 -0
- package/docs/dev-delivery-warrant.md +49 -4
- package/docs/engineering-housekeeper.md +138 -0
- package/docs/lifecycle-protocol.md +4 -2
- package/docs/node-api-reference.md +495 -281
- package/docs/publication-rehearsal.md +94 -0
- package/docs/release-governance.md +17 -2
- package/docs/release-tail-contract.md +160 -0
- package/docs/release-tail-provider-plane.md +120 -0
- package/docs/reusable-build-surface.md +11 -0
- package/package.json +11 -3
- package/packages/core/artifact-signing.js +61 -0
- package/packages/core/buildchain-agent-manuals.js +3 -0
- package/packages/core/buildchain-config.js +66 -6
- package/packages/core/buildchain-kfd-claims.js +1 -1
- package/packages/core/buildchain-publication-authority.js +5 -0
- package/packages/core/controller-evidence.js +2 -1
- package/packages/core/dev-delivery-warrant-cancellation.js +1 -0
- package/packages/core/dev-delivery-warrant-shadow.js +502 -0
- package/packages/core/dev-delivery-warrant.js +15 -6
- package/packages/core/diagnostics.js +8 -3
- package/packages/core/engineering-housekeeper-github-client.js +222 -0
- package/packages/core/engineering-housekeeper-github.js +501 -0
- package/packages/core/engineering-housekeeper.js +259 -0
- package/packages/core/index.js +42 -0
- package/packages/core/kfd-gate.js +45 -15
- package/packages/core/paper-agent-entry.js +11 -5
- package/packages/core/paper-repository.js +1 -0
- package/packages/core/paper-scaffold-content.js +21 -0
- package/packages/core/paper.js +28 -2
- package/packages/core/publication-rehearsal-projection.js +173 -0
- package/packages/core/publication-rehearsal-runtime.js +921 -0
- package/packages/core/release-passport.js +130 -20
- package/packages/core/release-tail-compatibility.js +60 -0
- package/packages/core/release-tail-provider-adapters.js +461 -0
- package/packages/core/release-tail-provider-plane.js +1228 -0
- package/scripts/assemble-publication-artifact-admission.mjs +1 -1
- package/scripts/assemble-self-publication-admission.mjs +2 -2
- package/scripts/audit-publication-control-plane.mjs +1 -1
- package/scripts/auditable-demo-bundle-verification.mjs +2 -3
- package/scripts/auditable-demo-platform.mjs +2 -2
- package/scripts/auditable-demo-renditions.mjs +1 -1
- package/scripts/auditable-demo.mjs +2 -2
- package/scripts/build-contract-core.mjs +8 -3
- package/scripts/build-standalone-binary.mjs +14 -3
- package/scripts/buildchain-cli-help.mjs +13 -0
- package/scripts/check-core-mechanism-inventory.mjs +347 -0
- package/scripts/check-inventory.mjs +10 -8
- package/scripts/check-maintainability.mjs +9 -2
- package/scripts/check-release-tail-contract.mjs +435 -0
- package/scripts/dev-delivery-warrant.mjs +31 -4
- package/scripts/dev-pr-auto-merge.mjs +30 -4
- package/scripts/dev-pr-delivery-warrant.mjs +50 -0
- package/scripts/engineering-housekeeper-workflow.mjs +394 -0
- package/scripts/generate-channel-promotion-workflow.mjs +10 -8
- package/scripts/generate-site-bundle.mjs +47 -4
- package/scripts/init-repo.mjs +26 -2
- package/scripts/inspect-artifact-signing-requests.mjs +6 -0
- package/scripts/materialize-self-release-candidate-version.mjs +137 -0
- package/scripts/publication-commit-evidence.mjs +69 -23
- package/scripts/release-candidate-resolver.mjs +16 -10
- package/scripts/release-tail.mjs +159 -0
- package/scripts/resume-from-candidate-run.mjs +123 -9
- package/scripts/seal-artifact-signing-requests.mjs +6 -0
- package/scripts/site-capability-metadata.mjs +13 -0
- package/scripts/v4-architecture.mjs +600 -0
- package/scripts/web-surface-core.mjs +8 -2
- package/scripts/workflow-call-contract.mjs +184 -5
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: preview
|
|
3
|
+
period: ongoing
|
|
4
|
+
theme: engineering-housekeeper
|
|
5
|
+
doc_type: operational-contract
|
|
6
|
+
source_level: local-files
|
|
7
|
+
confidence: high
|
|
8
|
+
sensitivity: public
|
|
9
|
+
evidence_grade: A
|
|
10
|
+
review_state: reviewed
|
|
11
|
+
last_reviewed: 2026-08-10
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Engineering Housekeeper
|
|
15
|
+
|
|
16
|
+
Engineering Housekeeper is a reusable GitHub workflow for evidence-backed
|
|
17
|
+
branch and pull-request hygiene. It inventories the complete GitHub branch and
|
|
18
|
+
open pull-request surfaces, produces a rooted plan, and defaults to report-only
|
|
19
|
+
execution. It never closes pull requests and never deletes a branch from its
|
|
20
|
+
name alone.
|
|
21
|
+
|
|
22
|
+
The reusable entrypoint is:
|
|
23
|
+
|
|
24
|
+
```yaml
|
|
25
|
+
uses: kungfu-systems/buildchain/.github/workflows/engineering-housekeeper.yml@v3
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Report mode
|
|
29
|
+
|
|
30
|
+
`report` is the default. The caller grants only read permissions and receives
|
|
31
|
+
separate plan, Markdown report, and dry-run receipt artifacts:
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
jobs:
|
|
35
|
+
housekeeper:
|
|
36
|
+
uses: kungfu-systems/buildchain/.github/workflows/engineering-housekeeper.yml@v3
|
|
37
|
+
permissions:
|
|
38
|
+
contents: read
|
|
39
|
+
pull-requests: read
|
|
40
|
+
with:
|
|
41
|
+
target-branch: dev/v3/v3.0
|
|
42
|
+
mode: report
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The plan records the exact repository, target branch and target OID, every
|
|
46
|
+
observed branch and open pull request, each retain/delete/report/label decision,
|
|
47
|
+
and stable reason codes. The report receipt records dry-run outcomes and binds
|
|
48
|
+
them to the plan root.
|
|
49
|
+
|
|
50
|
+
## Apply mode
|
|
51
|
+
|
|
52
|
+
Mutation has a two-part positive gate. The caller must set both `mode: apply`
|
|
53
|
+
and `apply-enabled: true`; either value alone fails closed. Apply jobs consume
|
|
54
|
+
the uploaded exact plan, re-read provider state, and revalidate exact branch
|
|
55
|
+
and target OIDs, ancestry, protection, retention, active pull requests, rename
|
|
56
|
+
state, pull-request state, and staleness before each mutation.
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
jobs:
|
|
60
|
+
housekeeper:
|
|
61
|
+
uses: kungfu-systems/buildchain/.github/workflows/engineering-housekeeper.yml@v3
|
|
62
|
+
permissions:
|
|
63
|
+
contents: write
|
|
64
|
+
pull-requests: write
|
|
65
|
+
with:
|
|
66
|
+
target-branch: dev/v3/v3.0
|
|
67
|
+
mode: apply
|
|
68
|
+
apply-enabled: true
|
|
69
|
+
stale-pull-request-label: stale-housekeeping
|
|
70
|
+
max-actions: 10
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Branch deletion and pull-request labeling run in separate jobs. The branch job
|
|
74
|
+
has `contents: write` plus `pull-requests: read` for the final active-PR fence.
|
|
75
|
+
The labeling job has `contents: read` and `pull-requests: write`. Inventory is a
|
|
76
|
+
separate read-only job. The reusable workflow declares no workflow-level write
|
|
77
|
+
permission.
|
|
78
|
+
|
|
79
|
+
The action limit applies to the globally ordered plan before actions are split
|
|
80
|
+
by permission surface. A race, missing branch, advanced head, target movement,
|
|
81
|
+
new pull request, new protection, ambiguous ancestry, provider error, or stale
|
|
82
|
+
plan/input mismatch is an explicit receipt outcome rather than permission to
|
|
83
|
+
continue.
|
|
84
|
+
|
|
85
|
+
## Inputs and outputs
|
|
86
|
+
|
|
87
|
+
| Input | Type | Default | Contract |
|
|
88
|
+
| -------------------------- | ------- | --------------------------- | --------------------------------------------------------------------------------- |
|
|
89
|
+
| `repository` | string | caller repository | Exact `owner/repo` target. |
|
|
90
|
+
| `target-branch` | string | required | Exact ancestry target; the observed OID is recorded in the plan. |
|
|
91
|
+
| `mode` | string | `report` | `report` or `apply`. Other values fail. |
|
|
92
|
+
| `apply-enabled` | boolean | `false` | Required positive gate for `apply`. Invalid with `report`. |
|
|
93
|
+
| `protected-patterns` | string | version/release families | Comma or newline separated branch globs. |
|
|
94
|
+
| `retained-patterns` | string | train/authority families | Comma or newline separated retention globs. |
|
|
95
|
+
| `stale-days` | number | `30` | Positive stale pull-request age. |
|
|
96
|
+
| `stale-pull-request-label` | string | empty | Empty keeps pull requests report-only; non-empty permits labeling, never closure. |
|
|
97
|
+
| `max-actions` | number | `20` | Positive global apply limit. |
|
|
98
|
+
| `artifact-retention-days` | number | `30` | Retention for plan, report, and receipts. |
|
|
99
|
+
| `buildchain-repository` | string | `kungfu-systems/buildchain` | Runtime source repository. |
|
|
100
|
+
| `buildchain-ref` | string | `v3` | Runtime ref; trusted manual qualification may pass a train or exact SHA. |
|
|
101
|
+
|
|
102
|
+
Stable outputs are `plan-root`, `report-receipt-root`, optional
|
|
103
|
+
`branch-receipt-root` and `pull-request-receipt-root`, `action-count`,
|
|
104
|
+
`outcome`, and the plan/report/default-receipt artifact names. Apply receipts
|
|
105
|
+
are uploaded under the same caller-selected artifact prefix with branch and
|
|
106
|
+
pull-request scope names.
|
|
107
|
+
|
|
108
|
+
Artifacts and job summaries contain exact repository coordinates, observed
|
|
109
|
+
refs, decisions, reason codes, outcomes, and semantic roots. They never contain
|
|
110
|
+
tokens, application private keys, or authorization headers.
|
|
111
|
+
|
|
112
|
+
## Caller-owned authentication
|
|
113
|
+
|
|
114
|
+
The default credential is the caller-scoped `github.token`. A caller may pass
|
|
115
|
+
an alternative token as `github_token`, or pass the paired `github_app_id` and
|
|
116
|
+
`github_app_private_key` secrets to mint an installation token for the exact
|
|
117
|
+
target repository. The workflow contains no repository-specific personal
|
|
118
|
+
credential name or value.
|
|
119
|
+
|
|
120
|
+
GitHub App credentials must be supplied as a pair. The caller owns App
|
|
121
|
+
installation and permission policy and should grant only repository contents
|
|
122
|
+
read/write and pull-request read/write scopes required by its selected mode.
|
|
123
|
+
Secrets are used only as step environment or action inputs and are not written
|
|
124
|
+
to plans, reports, receipts, summaries, or artifacts.
|
|
125
|
+
|
|
126
|
+
## Scheduled callers
|
|
127
|
+
|
|
128
|
+
Buildchain dogfoods the reusable contract through three thin callers:
|
|
129
|
+
|
|
130
|
+
- `engineering-housekeeper-daily.yml` uses a 30-day window and a 10-action cap;
|
|
131
|
+
- `engineering-housekeeper-weekly.yml` uses a 45-day window and a 20-action cap;
|
|
132
|
+
- `engineering-housekeeper-monthly.yml` uses a 60-day window and a 50-action cap.
|
|
133
|
+
|
|
134
|
+
Schedules are report-only and read-only. Apply is available only through a
|
|
135
|
+
manual dispatch that selects `apply` and positively enables the apply gate.
|
|
136
|
+
The callers contain schedules and policy values only; inventory, planning,
|
|
137
|
+
revalidation, mutation, evidence, and authentication stay in the reusable
|
|
138
|
+
workflow and its runtime.
|
|
@@ -301,8 +301,10 @@ and optionally `lifecycle.publish`.
|
|
|
301
301
|
The verify stage runs after Buildchain has applied the generated version-state
|
|
302
302
|
changes to the local checkout, and before it creates release commits or moves
|
|
303
303
|
refs. After the command finishes, Buildchain checks that only declared
|
|
304
|
-
version
|
|
305
|
-
|
|
304
|
+
`version.files` and `version.derived_files` changed. The latter declares tracked
|
|
305
|
+
outputs regenerated by `lifecycle.version-state` that do not directly contain a
|
|
306
|
+
version field. This prevents verification from quietly adding extra source
|
|
307
|
+
changes to the release commit while keeping generated evidence explicit.
|
|
306
308
|
|
|
307
309
|
Buildchain-owned untracked runtime evidence is excluded only through an exact
|
|
308
310
|
internal allowlist. This includes contract-drift issue material under
|