code-foundry 1.18.0 → 1.19.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/CHANGELOG.md +7 -0
- package/docs/PERFORMANCE.md +8 -12
- package/docs/fleet-release-eligibility.md +80 -0
- package/docs/fleet-rollouts.md +4 -3
- package/package.json +1 -1
- package/src/cli.mjs +19 -6
- package/src/commands/fleet-core.mjs +567 -0
- package/src/commands/fleet.mjs +9 -562
- package/src/lib/fleet-eligibility.mjs +245 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.19.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.18.0...v1.19.0) (2026-09-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **fleet:** gate upgrades on verified release qualification ([#548](https://github.com/0xPlayerOne/code-foundry/issues/548)) ([3247cc6](https://github.com/0xPlayerOne/code-foundry/commit/3247cc6f2295c65c42bb43e4ec8f87a08f3dd02d))
|
|
9
|
+
|
|
3
10
|
## [1.18.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.17.0...v1.18.0) (2026-09-09)
|
|
4
11
|
|
|
5
12
|
|
package/docs/PERFORMANCE.md
CHANGED
|
@@ -23,17 +23,11 @@ The performance workflow disables build-cache reads and writes for this task.
|
|
|
23
23
|
That makes timing comparisons independent of a warm protected-branch cache and
|
|
24
24
|
prevents benchmark code from populating shared cache entries.
|
|
25
25
|
|
|
26
|
-
The
|
|
27
|
-
|
|
28
|
-
packed bytes,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
packed bytes, 890,418 unpacked bytes, and 103 files on Node 24.18.0, so the
|
|
32
|
-
limits remain intentionally bounded while covering both opt-in feature sets.
|
|
33
|
-
The qualified-publication workflow adds the release staging and publication
|
|
34
|
-
contract to the distributable. This candidate measured 238,816 packed bytes,
|
|
35
|
-
915,957 unpacked bytes, and 106 files on Node 24.18.0; the 250 kB and 930 kB
|
|
36
|
-
limits retain a measured margin while covering the required release path.
|
|
26
|
+
The merged candidate includes the release-integrity verifier, fleet eligibility,
|
|
27
|
+
consumer qualification harness, product-quality profiles, and qualified
|
|
28
|
+
publication workflow. It measured 243,466 packed bytes, 930,389 unpacked bytes,
|
|
29
|
+
and 109 files on Node 24.18.0; the 250 kB, 945 kB, and 110-file limits retain a
|
|
30
|
+
small margin while continuing to bound package growth.
|
|
37
31
|
|
|
38
32
|
## v1.6.1 baseline
|
|
39
33
|
|
|
@@ -67,4 +61,6 @@ pull request, run the complete validation gate, and merge only when the new
|
|
|
67
61
|
result artifact is available. A Release Please PR then carries the change into
|
|
68
62
|
the next version. Never raise a budget solely to clear CI; include before/after
|
|
69
63
|
measurements and the expected effect on local feedback, hosted runner time,
|
|
70
|
-
package transfer, or installed footprint.
|
|
64
|
+
package transfer, or installed footprint. The current budget covers the measured
|
|
65
|
+
combined release-integrity, fleet, consumer-qualification, and product-quality
|
|
66
|
+
package footprint described above.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Fleet Release Eligibility
|
|
2
|
+
|
|
3
|
+
Require a verified, qualified runtime before any fleet upgrade mutates repositories.
|
|
4
|
+
|
|
5
|
+
**Dependency:** Installed release-integrity verifier (#537).
|
|
6
|
+
**Activation:** Consumer-owned `.code-foundry-release-policy.json` at the fleet root.
|
|
7
|
+
|
|
8
|
+
The public `upgradeFleet` entrypoint now applies an optional release eligibility
|
|
9
|
+
guard before delegating to the unchanged legacy/manifest rollout implementation.
|
|
10
|
+
The implementation was moved verbatim to `fleet-core.mjs`; discovery exports and
|
|
11
|
+
existing callers retain their interface. No policy file means existing behavior.
|
|
12
|
+
A malformed or symlinked policy is an error, not an opt-out. Dry runs use the same
|
|
13
|
+
guard, and `--force` cannot bypass source identity or qualification.
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"schema_version": 1,
|
|
18
|
+
"repository": "owner/code-foundry",
|
|
19
|
+
"workflow": ".github/workflows/release_self-ci.yml",
|
|
20
|
+
"branch": "main",
|
|
21
|
+
"required_jobs": [
|
|
22
|
+
"Qualify consumers / Node 20",
|
|
23
|
+
"Qualify consumers / Node 22",
|
|
24
|
+
"Qualify consumers / Node 24"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
This is a shape example, not a completed fleet policy. Populate canonical repository
|
|
30
|
+
identity, actual workflow path, and exact job names from the qualified release
|
|
31
|
+
caller's Actions API results. Include the publication job when successful registry
|
|
32
|
+
publication is required before adoption. Require every relevant job: a workflow's
|
|
33
|
+
aggregate success alone can conceal skipped jobs. The qualification gate in #544
|
|
34
|
+
and verified publisher in #547 provide the producer side of this policy.
|
|
35
|
+
|
|
36
|
+
Keep the policy alongside the **consumer workspace's** fleet inventory. Do not put
|
|
37
|
+
private repository names, local layouts, or deployment credentials into this
|
|
38
|
+
reusable baseline. Commit policy changes for review; the guard does not secretly
|
|
39
|
+
change branch protection, environments, rollout cohorts, or required capabilities.
|
|
40
|
+
|
|
41
|
+
## What is verified
|
|
42
|
+
|
|
43
|
+
The proposed runtime must be a clean Git source checkout. Its exact HEAD must
|
|
44
|
+
match the cryptographically verified immutable release tag. An installed npm
|
|
45
|
+
package without Git metadata cannot substitute for a verifiable source checkout;
|
|
46
|
+
use the existing `--source` option with the checked-out release. The verifier comes
|
|
47
|
+
from the trusted running Foundry installation, not the unverified candidate.
|
|
48
|
+
|
|
49
|
+
The guard resolves the configured workflow's identity, retrieves every page of
|
|
50
|
+
runs for the exact source, and selects the latest matching protected-branch push
|
|
51
|
+
or manual run. It rejects pending/failed/cancelled runs, fork provenance, disabled
|
|
52
|
+
workflows, missing/ambiguous/skipped jobs, and incomplete pagination. An older
|
|
53
|
+
success does not override a newer failed run. Job evidence comes from the precise
|
|
54
|
+
run attempt; that attempt is rechecked before proceeding. Source HEAD, cleanliness,
|
|
55
|
+
and the policy's bytes are rechecked before the upgrade callback executes.
|
|
56
|
+
|
|
57
|
+
Successful eligibility emits JSON to stderr with source SHA, policy digest,
|
|
58
|
+
workflow/run/attempt identifiers, and required job names. It does not write an
|
|
59
|
+
approval into the source or silently make PRs ready. Existing resumable rollouts,
|
|
60
|
+
canary validation, draft creation, and provenance markers stay in the original
|
|
61
|
+
fleet engine. The guard is policy enforcement in the supported public entrypoint,
|
|
62
|
+
not a sandbox against someone intentionally importing private implementation files
|
|
63
|
+
or using Git directly. Normal credentials still determine what remote mutations
|
|
64
|
+
are possible after eligibility passes.
|
|
65
|
+
|
|
66
|
+
## Activation and validation
|
|
67
|
+
|
|
68
|
+
First release and validate the qualification/verification producer and confirm
|
|
69
|
+
real workflow/job identities. Then opt a consumer workspace into this policy and
|
|
70
|
+
exercise `fleet upgrade --dry-run --root <fleet-root> --source <clean-release-checkout>`.
|
|
71
|
+
When `--source` is omitted, the installed package is used and an enabled policy
|
|
72
|
+
will reject it unless that installation is itself a clean Git checkout. Older mutable
|
|
73
|
+
releases or unavailable permissions should fail; do not weaken the policy just to
|
|
74
|
+
make an old release eligible. No real fleet inventory is fabricated by this PR.
|
|
75
|
+
|
|
76
|
+
The focused suite verifies guard ordering and failure propagation with GitHub/CLI
|
|
77
|
+
fixtures. Live authenticated verification, exact production job naming, and the
|
|
78
|
+
full existing fleet-engine suite must pass before activation. The original fleet
|
|
79
|
+
engine's Git blob is retained byte-for-byte; the source move still needs full
|
|
80
|
+
repository import/type-check/packaging validation in CI.
|
package/docs/fleet-rollouts.md
CHANGED
|
@@ -55,11 +55,12 @@ Adopt those requirements in consumer repositories before requiring them here.
|
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
57
|
code-foundry fleet status --root /path/to/fleet
|
|
58
|
-
code-foundry fleet upgrade --root /path/to/fleet --dry-run
|
|
59
|
-
code-foundry fleet upgrade --root /path/to/fleet --create-pr
|
|
58
|
+
code-foundry fleet upgrade --root /path/to/fleet --source /path/to/release-checkout --dry-run
|
|
59
|
+
code-foundry fleet upgrade --root /path/to/fleet --source /path/to/release-checkout --create-pr
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Use `--source` to provide the clean Code Foundry release checkout used for the
|
|
63
|
+
upgrade; when omitted, the installed Code Foundry package is used. The existing
|
|
63
64
|
source-version guard still rejects mismatched `--version` requests. Manifest mode
|
|
64
65
|
requires `--create-pr` or `--dry-run` and never syncs original checkouts in place.
|
|
65
66
|
`--force` does not bypass dirty-tree safety in manifest mode. Dry-run reports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-foundry",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
|
|
5
5
|
"homepage": "https://github.com/0xPlayerOne/code-foundry#readme",
|
|
6
6
|
"bugs": {
|
package/src/cli.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from 'node:url'
|
|
|
7
7
|
|
|
8
8
|
const packageRoot = resolve(fileURLToPath(new URL('..', import.meta.url)))
|
|
9
9
|
|
|
10
|
-
/** @typedef {{ target: string, root: string, dryRun: boolean, force: boolean, github: boolean, createPr: boolean, exclude: string[], base: string, head: string, tag: string, workflow: string, mode: string, version: string, repository: string, expectedSha: string, assets: string[], rootProvided: boolean, releaseSubcommand?: string, fleetSubcommand?: string, integritySubcommand?: 'settings'|'release'|'manifest', ciSubcommand?: 'pause'|'resume'|'status' }} Options */
|
|
10
|
+
/** @typedef {{ target: string, root: string, source: string, dryRun: boolean, force: boolean, github: boolean, createPr: boolean, exclude: string[], base: string, head: string, tag: string, workflow: string, mode: string, version: string, versionExplicit: boolean, repository: string, expectedSha: string, assets: string[], rootProvided: boolean, releaseSubcommand?: string, fleetSubcommand?: string, integritySubcommand?: 'settings'|'release'|'manifest', ciSubcommand?: 'pause'|'resume'|'status' }} Options */
|
|
11
11
|
/** @typedef {{ command: string, options: Options }} ParsedArgs */
|
|
12
12
|
|
|
13
13
|
const usage = `code-foundry — initialize and maintain agent-ready repositories
|
|
@@ -25,7 +25,7 @@ Usage:
|
|
|
25
25
|
npx code-foundry release-integrity release --repo OWNER/REPO --tag TAG
|
|
26
26
|
npx code-foundry release-integrity manifest --asset PATH [--root PATH]
|
|
27
27
|
npx code-foundry fleet status [--root PATH]
|
|
28
|
-
npx code-foundry fleet upgrade [--root PATH] [--dry-run] [--create-pr]
|
|
28
|
+
npx code-foundry fleet upgrade [--root PATH] [--source PATH] [--dry-run] [--create-pr]
|
|
29
29
|
|
|
30
30
|
The repository configuration lives in .github/code-foundry.yml.
|
|
31
31
|
init detects the repository, creates that file, and renders the baseline.
|
|
@@ -45,6 +45,7 @@ Options:
|
|
|
45
45
|
--expected-sha SHA Expected source commit for release-integrity verification
|
|
46
46
|
--asset PATH Selected release-integrity artifact (repeatable)
|
|
47
47
|
--root PATH Fleet root containing repositories (default: current directory)
|
|
48
|
+
--source PATH Clean Code Foundry release checkout used for fleet upgrades
|
|
48
49
|
--create-pr Create isolated upgrade branches and pull requests
|
|
49
50
|
--version TAG Runtime tag to report in fleet upgrade branches
|
|
50
51
|
--exclude NAME Skip a repository path or owner/name in fleet operations
|
|
@@ -66,6 +67,7 @@ function parseArgs(argv) {
|
|
|
66
67
|
const options = {
|
|
67
68
|
target: process.cwd(),
|
|
68
69
|
root: process.cwd(),
|
|
70
|
+
source: packageRoot,
|
|
69
71
|
dryRun: false,
|
|
70
72
|
force: false,
|
|
71
73
|
github: false,
|
|
@@ -77,6 +79,7 @@ function parseArgs(argv) {
|
|
|
77
79
|
workflow: '',
|
|
78
80
|
mode: 'auto',
|
|
79
81
|
version: `v${readPackageVersion(packageRoot)}`,
|
|
82
|
+
versionExplicit: false,
|
|
80
83
|
repository: '',
|
|
81
84
|
expectedSha: '',
|
|
82
85
|
assets: [],
|
|
@@ -146,9 +149,17 @@ function parseArgs(argv) {
|
|
|
146
149
|
else if (arg === '--root') {
|
|
147
150
|
options.root = argv.shift() ?? fail('--root requires a path')
|
|
148
151
|
options.rootProvided = true
|
|
152
|
+
} else if (arg === '--source') {
|
|
153
|
+
if (command !== 'fleet' || options.fleetSubcommand !== 'upgrade')
|
|
154
|
+
fail('--source is only supported by fleet upgrade')
|
|
155
|
+
const value = argv.shift()
|
|
156
|
+
if (!value || value.startsWith('-')) fail('--source requires a path')
|
|
157
|
+
options.source = value
|
|
149
158
|
} else if (arg === '--create-pr') options.createPr = true
|
|
150
|
-
else if (arg === '--version')
|
|
151
|
-
|
|
159
|
+
else if (arg === '--version') {
|
|
160
|
+
options.version = argv.shift() ?? fail('--version requires a tag')
|
|
161
|
+
options.versionExplicit = true
|
|
162
|
+
} else if (arg === '--exclude')
|
|
152
163
|
options.exclude.push(argv.shift() ?? fail('--exclude requires a name'))
|
|
153
164
|
else fail(`unknown option: ${arg}; run --help for the supported options`)
|
|
154
165
|
}
|
|
@@ -241,11 +252,13 @@ async function main() {
|
|
|
241
252
|
if (options.fleetSubcommand === 'status')
|
|
242
253
|
console.log(JSON.stringify(discoverRepositories(root), null, 2))
|
|
243
254
|
else
|
|
244
|
-
upgradeFleet(root,
|
|
255
|
+
upgradeFleet(root, resolve(options.source), {
|
|
245
256
|
createPr: options.createPr,
|
|
246
257
|
dryRun: options.dryRun,
|
|
247
258
|
force: options.force,
|
|
248
|
-
version: options.
|
|
259
|
+
version: options.versionExplicit
|
|
260
|
+
? options.version
|
|
261
|
+
: `v${readPackageVersion(resolve(options.source))}`,
|
|
249
262
|
exclude: options.exclude,
|
|
250
263
|
})
|
|
251
264
|
} catch (error) {
|