code-foundry 1.39.3 → 1.41.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.
@@ -221,7 +221,7 @@ Keep pull requests focused and reviewable. Include screenshots or recordings for
221
221
  | Exact Release Please pull request targeting `main` | Full validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |
222
222
  | Scheduled or manual validation | Full audit tier |
223
223
  | Push to a working branch | Draft PR workflow |
224
- | Push to `main` | Release workflow plus default-branch CodeQL scan; validation ran on the merged PR |
224
+ | Push to `main` | Release workflow; CodeQL skips release-only merges (audit covers drift) |
225
225
 
226
226
  Draft pull requests do not start validation unless `draft_protection: false` is configured. The lightweight Draft Guard converts ordinary pull requests opened or reopened while ready back to draft; it never checks out pull-request code and it excludes Release Please version heads, whose release workflow owns their state. Marking a pull request ready for review starts the applicable validation tier, and each new commit on a ready pull request reruns that tier for the current head. Draft updates allocate no validation runner while protection is enabled. Converting a pull request to draft runs only the lightweight cancellation control.
227
227
 
@@ -101,10 +101,15 @@ jobs:
101
101
 
102
102
  # CodeQL requires a push analysis to populate default-branch code-scanning
103
103
  # alerts. Keep the full validation gate pull-request-only so main pushes do
104
- # not duplicate CI, test, or security work.
104
+ # not duplicate CI, test, or security work. Release Please version merges
105
+ # change manifests only, so the code tree is identical to the content merge
106
+ # whose default-branch scan is still current; re-scanning it on every release
107
+ # wastes the Rust-heavy analysis budget, and the scheduled audit covers drift.
105
108
  default-branch-codeql:
106
109
  name: CodeQL (default branch)
107
- if: vars.CI_BILLING_PAUSED != 'true' && github.event_name == 'push'
110
+ if: >-
111
+ vars.CI_BILLING_PAUSED != 'true' && github.event_name == 'push' &&
112
+ !startsWith(github.event.head_commit.message, 'chore(main): release ')
108
113
  permissions:
109
114
  actions: read
110
115
  contents: read
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.41.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.40.0...v1.41.0) (2026-10-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * **validation:** skip default-branch CodeQL on release-please merges ([#694](https://github.com/0xPlayerOne/code-foundry/issues/694)) ([25fc22e](https://github.com/0xPlayerOne/code-foundry/commit/25fc22e6d4b76f0b7e06601f6dc420085949f127))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * give the release artifact budgets several releases of headroom ([#696](https://github.com/0xPlayerOne/code-foundry/issues/696)) ([a504607](https://github.com/0xPlayerOne/code-foundry/commit/a504607e16f097a5075191fd24cb26953b06a340))
14
+
15
+ ## [1.40.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.39.3...v1.40.0) (2026-10-02)
16
+
17
+
18
+ ### Features
19
+
20
+ * **sync:** add dependency_updater setting to gate Dependabot and scaffold Renovate ([#692](https://github.com/0xPlayerOne/code-foundry/issues/692)) ([15805de](https://github.com/0xPlayerOne/code-foundry/commit/15805dee09a93ca168bbc00dbc3c3af36a40e7bf))
21
+
3
22
  ## [1.39.3](https://github.com/0xPlayerOne/code-foundry/compare/v1.39.2...v1.39.3) (2026-10-01)
4
23
 
5
24
 
@@ -34,21 +34,22 @@ to require an existing mise configuration.
34
34
 
35
35
  ## Repository and runtime
36
36
 
37
- | Key | Values | Notes |
38
- | ----------------------- | -------------------------------------------- | -------------------------------------------------------------------- |
39
- | `version` | `1` | Configuration schema version. |
40
- | `profile` | `auto`, `application`, `monorepo`, `minimal` | Repository shape; `auto` detects it. |
41
- | `languages` | comma-separated language names | Supported values are `typescript`, `rust`, `python`, and `solidity`. |
42
- | `package_manager` | `bun`, `pnpm`, `yarn`, `npm`, `none` | JavaScript package-manager policy. |
43
- | `toolchain` | `auto`, `native`, `mise` | Environment setup policy. |
44
- | `runtime_repository` | `OWNER/REPO` | Source of reusable workflows and runtime code. |
45
- | `runtime_ref` | tag or commit | Runtime version used by generated callers. |
46
- | `features` | `all` or a list | See [Feature selection](#feature-selection). |
47
- | `draft_protection` | `true`, `false` | Skip generated runner-heavy gates for draft PRs when false. |
48
- | `billing_paused` | `true`, `false` | Disable Dependabot version updates while CI billing is paused. |
49
- | `codeql` | `auto`, `true`, `false` | Enable CodeQL when the repository and GitHub plan support it. |
50
- | `dependency_review` | `auto`, `true`, `false` | Enable Dependency Review when supported. |
51
- | `runner` and `*_runner` | GitHub runner labels | Override the default runner per workflow. |
37
+ | Key | Values | Notes |
38
+ | ----------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------- |
39
+ | `version` | `1` | Configuration schema version. |
40
+ | `profile` | `auto`, `application`, `monorepo`, `minimal` | Repository shape; `auto` detects it. |
41
+ | `languages` | comma-separated language names | Supported values are `typescript`, `rust`, `python`, and `solidity`. |
42
+ | `package_manager` | `bun`, `pnpm`, `yarn`, `npm`, `none` | JavaScript package-manager policy. |
43
+ | `toolchain` | `auto`, `native`, `mise` | Environment setup policy. |
44
+ | `runtime_repository` | `OWNER/REPO` | Source of reusable workflows and runtime code. |
45
+ | `runtime_ref` | tag or commit | Runtime version used by generated callers. |
46
+ | `features` | `all` or a list | See [Feature selection](#feature-selection). |
47
+ | `draft_protection` | `true`, `false` | Skip generated runner-heavy gates for draft PRs when false. |
48
+ | `billing_paused` | `true`, `false` | Disable Dependabot version updates while CI billing is paused. |
49
+ | `dependency_updater` | `dependabot`, `renovate`, `none` | Which dependency-update bot sync manages; see [Feature selection](#feature-selection). |
50
+ | `codeql` | `auto`, `true`, `false` | Enable CodeQL when the repository and GitHub plan support it. |
51
+ | `dependency_review` | `auto`, `true`, `false` | Enable Dependency Review when supported. |
52
+ | `runner` and `*_runner` | GitHub runner labels | Override the default runner per workflow. |
52
53
 
53
54
  For `codeql: auto` and `dependency_review: auto`, public repositories use the
54
55
  available GitHub security checks and private repositories require the relevant
@@ -82,6 +83,22 @@ remain aliases for compatibility. Other selectable features are:
82
83
  - `release` — run Release Please and optional package publication.
83
84
  - `dependabot` — install the language-aware Dependabot configuration.
84
85
 
86
+ The `dependency_updater` key selects which dependency-update bot `sync`
87
+ manages, and an explicit value wins over the `dependabot` feature (including
88
+ `features: all`):
89
+
90
+ - `dependabot` (default) — render `.github/dependabot.yml` whenever the
91
+ `dependabot` feature is selected; existing repositories are unaffected.
92
+ - `renovate` — never render `.github/dependabot.yml` and remove an existing
93
+ one; install `renovate.json` from the runtime template only when the
94
+ repository has none. A repository-owned `renovate.json` is never modified.
95
+ - `none` — never render `.github/dependabot.yml`, remove an existing one, and
96
+ install nothing.
97
+
98
+ Installing `renovate.json` does not schedule update runs: a repository still
99
+ needs the Renovate GitHub App or a self-hosted runner. The `billing_paused`
100
+ Dependabot pause applies only while `dependency_updater` is `dependabot`.
101
+
85
102
  The release-integrity and OpenCode Security callers are installed independently
86
103
  of feature selection. OpenCode Security is disabled unless the repository or
87
104
  organization variable `OPENCODE_SECURITY` is `true` and the
package/docs/WORKFLOWS.md CHANGED
@@ -141,7 +141,9 @@ While paused, set `billing_paused: true` in `.github/code-foundry.yml` and run a
141
141
  sync so the rendered `dependabot.yml` disables version updates
142
142
  (`open-pull-requests-limit: 0`, monthly cadence). Remove the flag and sync to
143
143
  restore updates when billing resumes. `npx code-foundry ci status` reports the
144
- Dependabot state, and `pause` warns when updates are still active.
144
+ Dependabot state, and `pause` warns when updates are still active. A repository
145
+ whose `dependency_updater` is `renovate` or `none` has no Dependabot
146
+ configuration to pause.
145
147
 
146
148
  ## Standard workflow responsibilities
147
149
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "1.39.3",
3
+ "version": "1.41.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": {
@@ -145,6 +145,14 @@ function synchronize(options) {
145
145
  if (!['true', 'false'].includes(draftProtection)) {
146
146
  throw new Error(`Unsupported draft_protection: ${draftProtection}; use true or false.`)
147
147
  }
148
+ // Validate the dependency-update bot policy before any sync writes so a
149
+ // typo fails fast instead of leaving a half-switched updater behind.
150
+ const dependencyUpdater = configured(config.dependency_updater, 'dependabot')
151
+ if (!['renovate', 'dependabot', 'none'].includes(dependencyUpdater)) {
152
+ throw new Error(
153
+ `Unsupported dependency_updater: ${dependencyUpdater}; use renovate, dependabot, or none.`
154
+ )
155
+ }
148
156
  const obsoleteConfigKeys = [
149
157
  'opencode_security',
150
158
  ...(workflow === 'direct' ? ['staging_validation_mode'] : []),
@@ -335,6 +343,33 @@ function synchronize(options) {
335
343
  }
336
344
  }
337
345
 
346
+ // `dependency_updater` owns the dependency-update bot contract, and an
347
+ // explicit value wins over the features gate above: a repository that
348
+ // leaves Dependabot must not keep a previously rendered dependabot.yml,
349
+ // and a Renovate repository gets a config only when it does not already
350
+ // own one (repository-owned renovate.json is never modified).
351
+ if (dependencyUpdater !== 'dependabot') {
352
+ const destination = join(target, '.github/dependabot.yml')
353
+ if (existsSync(destination)) {
354
+ changed.push('.github/dependabot.yml')
355
+ if (dryRun)
356
+ console.log(
357
+ `Would remove .github/dependabot.yml; dependency_updater selects ${dependencyUpdater}.`
358
+ )
359
+ else rmSync(destination, { force: true })
360
+ }
361
+ }
362
+ if (dependencyUpdater === 'renovate') {
363
+ const destination = join(target, 'renovate.json')
364
+ if (!existsSync(destination)) {
365
+ const template = join(source, 'src/templates/renovate.json')
366
+ if (!existsSync(template))
367
+ throw new Error('Template file missing: src/templates/renovate.json')
368
+ changed.push('renovate.json')
369
+ writeOrReport(destination, readFileSync(template), dryRun)
370
+ }
371
+ }
372
+
338
373
  // Preserved (repository-owned) workflows may reference the runtime directly,
339
374
  // for example a hand-maintained Cloudflare preview caller. Advance their
340
375
  // plain semver pins to the synced runtime ref so a stale hand-added pin
@@ -591,7 +626,11 @@ function shouldInclude(file, languages, features, config) {
591
626
  if (file === 'ruff.toml') return includesValue(languages, 'python')
592
627
  if (file === '.oxfmtrc.json' || file === '.oxlintrc.json')
593
628
  return includesValue(languages, 'typescript')
594
- if (file === '.github/dependabot.yml') return includesValue(features, 'dependabot')
629
+ if (file === '.github/dependabot.yml')
630
+ return (
631
+ configured(config.dependency_updater, 'dependabot') === 'dependabot' &&
632
+ includesValue(features, 'dependabot')
633
+ )
595
634
  // The OpenCode Security caller is installed in every repository so the
596
635
  // OPENCODE_SECURITY repository variable can opt a repository in (or out)
597
636
  // without a configuration change. The detect job keeps the scan off unless
@@ -1017,8 +1056,8 @@ const DIRECT_DOC_REPLACEMENTS = {
1017
1056
  '7. Push to the fork and open a pull request targeting `main`.',
1018
1057
  ],
1019
1058
  [
1020
- '| Event | Expected automation |\n| -------------------------------------------------- | ------------------------------------------------------------------------------------- |\n| Draft pull request targeting `staging` | No runner-heavy validation; run local checks before requesting review |\n| Ready pull request targeting `staging` | Fast validation: CI plus unit tests, ending in `Validation / Gate` |\n| Draft ordinary pull request targeting `main` | No runner-heavy validation; run local checks before requesting review |\n| Ready ordinary pull request targeting `main` | Audit validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Exact Release Please pull request targeting `main` | Full validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Scheduled or manual validation | Full audit tier |\n| Push to a working branch | Draft PR workflow |\n| Push to `staging` | Promotion PR workflow; canonical validation waits for the PR event |\n| Push to `main` | Release workflow plus default-branch CodeQL scan; validation ran on the merged PR |\n',
1021
- '| Event | Expected automation |\n| -------------------------------------------------- | ------------------------------------------------------------------------------------- |\n| Draft pull request targeting `main` | No runner-heavy validation; run local checks before requesting review |\n| Ready pull request targeting `main` | Audit validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Exact Release Please pull request targeting `main` | Full validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Scheduled or manual validation | Full audit tier |\n| Push to a working branch | Draft PR workflow |\n| Push to `main` | Release workflow plus default-branch CodeQL scan; validation ran on the merged PR |\n',
1059
+ '| Event | Expected automation |\n| -------------------------------------------------- | ------------------------------------------------------------------------------------- |\n| Draft pull request targeting `staging` | No runner-heavy validation; run local checks before requesting review |\n| Ready pull request targeting `staging` | Fast validation: CI plus unit tests, ending in `Validation / Gate` |\n| Draft ordinary pull request targeting `main` | No runner-heavy validation; run local checks before requesting review |\n| Ready ordinary pull request targeting `main` | Audit validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Exact Release Please pull request targeting `main` | Full validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Scheduled or manual validation | Full audit tier |\n| Push to a working branch | Draft PR workflow |\n| Push to `staging` | Promotion PR workflow; canonical validation waits for the PR event |\n| Push to `main` | Release workflow; CodeQL skips release-only merges (audit covers drift) |\n',
1060
+ '| Event | Expected automation |\n| -------------------------------------------------- | ------------------------------------------------------------------------------------- |\n| Draft pull request targeting `main` | No runner-heavy validation; run local checks before requesting review |\n| Ready pull request targeting `main` | Audit validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Exact Release Please pull request targeting `main` | Full validation: CI, full tests, Security, and CodeQL, ending in `Validation / Gate` |\n| Scheduled or manual validation | Full audit tier |\n| Push to a working branch | Draft PR workflow |\n| Push to `main` | Release workflow; CodeQL skips release-only merges (audit covers drift) |\n',
1022
1061
  ],
1023
1062
  [
1024
1063
  '| Change | Target | Merge method | Merge gate |\n| ---------------------------- | --------- | ----------------------------------------------- | --------------------------------------------------------- |\n| Working branch | `staging` | Squash | All applicable required checks pass |\n| `staging` → `main` promotion | `main` | Rebase (`merge_strategy`) | Current staging checks, release review, and rollout notes |\n| Release Please version PR | `main` | Rebase (`release_merge_strategy`, fails closed) | Validation gate and release policy pass |\n',
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
+ "extends": ["config:recommended"],
4
+ "draftPR": true,
5
+ "labels": ["dependencies"],
6
+ "packageRules": [
7
+ {
8
+ "description": "Non-major dependency updates ride one grouped draft PR per cycle.",
9
+ "matchUpdateTypes": ["minor", "patch", "pin", "digest"],
10
+ "groupName": "non-major dependency updates"
11
+ },
12
+ {
13
+ "description": "Major dependency bumps share one grouped draft PR per cycle so a batch reads as one upgrade decision.",
14
+ "matchUpdateTypes": ["major"],
15
+ "groupName": "major dependency updates"
16
+ }
17
+ ]
18
+ }