code-foundry 0.30.3 → 0.31.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.
@@ -723,7 +723,7 @@ runs:
723
723
  path: ~/.cargo/advisory-db
724
724
  # The advisory database is independent of project dependencies. Keep
725
725
  # it warm for Security without invalidating it on every lockfile edit.
726
- key: ${{ runner.os }}-rust-advisory-${{ hashFiles('.code-foundry/src/runtime.mjs') }}
726
+ key: ${{ runner.os }}-rust-advisory-${{ hashFiles('.github/.code-foundry/src/runtime.mjs') }}
727
727
  restore-keys: |
728
728
  ${{ runner.os }}-rust-advisory-
729
729
  - name: Cache Rust builds
@@ -773,7 +773,7 @@ runs:
773
773
  REPO_FOUNDRY_INSTALL_PYTHON: ${{ inputs.install-python }}
774
774
  REPO_FOUNDRY_INSTALL_RUST: ${{ inputs.install-rust }}
775
775
  REPO_FOUNDRY_TASK: ${{ inputs.task }}
776
- run: node .code-foundry/src/runtime.mjs ci install
776
+ run: node .github/.code-foundry/src/runtime.mjs ci install
777
777
  - name: Measure Bun dependencies
778
778
  id: javascript-bun-cache
779
779
  if: >-
@@ -50,7 +50,7 @@ jobs:
50
50
  with:
51
51
  repository: ${{ inputs.runtime-repository }}
52
52
  ref: ${{ inputs.runtime-ref }}
53
- path: .code-foundry
53
+ path: .github/.code-foundry
54
54
  sparse-checkout: |
55
55
  .github/actions
56
56
  src/lib
@@ -58,10 +58,10 @@ jobs:
58
58
  - name: Install runtime
59
59
  run: |
60
60
  mkdir -p .github/actions
61
- cp -R .code-foundry/.github/actions/. .github/actions/
61
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
62
62
  - name: Detect
63
63
  id: applicability
64
- run: node .code-foundry/src/runtime.mjs ci should_run format >> "$GITHUB_OUTPUT"
64
+ run: node .github/.code-foundry/src/runtime.mjs ci should_run format >> "$GITHUB_OUTPUT"
65
65
  - name: Setup
66
66
  if: steps.applicability.outputs.applicable == 'true'
67
67
  uses: ./.github/actions/setup
@@ -76,7 +76,7 @@ jobs:
76
76
  task: format
77
77
  - name: Format
78
78
  if: steps.applicability.outputs.applicable == 'true'
79
- run: node .code-foundry/src/runtime.mjs ci format
79
+ run: node .github/.code-foundry/src/runtime.mjs ci format
80
80
 
81
81
  lint:
82
82
  name: Lint
@@ -89,7 +89,7 @@ jobs:
89
89
  with:
90
90
  repository: ${{ inputs.runtime-repository }}
91
91
  ref: ${{ inputs.runtime-ref }}
92
- path: .code-foundry
92
+ path: .github/.code-foundry
93
93
  sparse-checkout: |
94
94
  .github/actions
95
95
  src/lib
@@ -97,10 +97,10 @@ jobs:
97
97
  - name: Install runtime
98
98
  run: |
99
99
  mkdir -p .github/actions
100
- cp -R .code-foundry/.github/actions/. .github/actions/
100
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
101
101
  - name: Detect
102
102
  id: applicability
103
- run: node .code-foundry/src/runtime.mjs ci should_run lint >> "$GITHUB_OUTPUT"
103
+ run: node .github/.code-foundry/src/runtime.mjs ci should_run lint >> "$GITHUB_OUTPUT"
104
104
  - name: Setup
105
105
  if: steps.applicability.outputs.applicable == 'true'
106
106
  uses: ./.github/actions/setup
@@ -110,7 +110,7 @@ jobs:
110
110
  task: lint
111
111
  - name: Lint
112
112
  if: steps.applicability.outputs.applicable == 'true'
113
- run: node .code-foundry/src/runtime.mjs ci lint
113
+ run: node .github/.code-foundry/src/runtime.mjs ci lint
114
114
 
115
115
  type-check:
116
116
  name: Type-Check
@@ -123,7 +123,7 @@ jobs:
123
123
  with:
124
124
  repository: ${{ inputs.runtime-repository }}
125
125
  ref: ${{ inputs.runtime-ref }}
126
- path: .code-foundry
126
+ path: .github/.code-foundry
127
127
  sparse-checkout: |
128
128
  .github/actions
129
129
  src/lib
@@ -131,10 +131,10 @@ jobs:
131
131
  - name: Install runtime
132
132
  run: |
133
133
  mkdir -p .github/actions
134
- cp -R .code-foundry/.github/actions/. .github/actions/
134
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
135
135
  - name: Detect
136
136
  id: applicability
137
- run: node .code-foundry/src/runtime.mjs ci should_run type_check >> "$GITHUB_OUTPUT"
137
+ run: node .github/.code-foundry/src/runtime.mjs ci should_run type_check >> "$GITHUB_OUTPUT"
138
138
  - name: Setup
139
139
  if: steps.applicability.outputs.applicable == 'true'
140
140
  uses: ./.github/actions/setup
@@ -144,7 +144,7 @@ jobs:
144
144
  task: type_check
145
145
  - name: Type-Check
146
146
  if: steps.applicability.outputs.applicable == 'true'
147
- run: node .code-foundry/src/runtime.mjs ci type_check
147
+ run: node .github/.code-foundry/src/runtime.mjs ci type_check
148
148
 
149
149
  build:
150
150
  name: Build
@@ -162,7 +162,7 @@ jobs:
162
162
  with:
163
163
  repository: ${{ inputs.runtime-repository }}
164
164
  ref: ${{ inputs.runtime-ref }}
165
- path: .code-foundry
165
+ path: .github/.code-foundry
166
166
  sparse-checkout: |
167
167
  .github/actions
168
168
  src/lib
@@ -170,10 +170,10 @@ jobs:
170
170
  - name: Install runtime
171
171
  run: |
172
172
  mkdir -p .github/actions
173
- cp -R .code-foundry/.github/actions/. .github/actions/
173
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
174
174
  - name: Detect
175
175
  id: applicability
176
- run: node .code-foundry/src/runtime.mjs ci should_run build >> "$GITHUB_OUTPUT"
176
+ run: node .github/.code-foundry/src/runtime.mjs ci should_run build >> "$GITHUB_OUTPUT"
177
177
  - name: Setup
178
178
  if: steps.applicability.outputs.applicable == 'true'
179
179
  uses: ./.github/actions/setup
@@ -183,4 +183,4 @@ jobs:
183
183
  task: build
184
184
  - name: Build
185
185
  if: steps.applicability.outputs.applicable == 'true'
186
- run: node .code-foundry/src/runtime.mjs ci build
186
+ run: node .github/.code-foundry/src/runtime.mjs ci build
@@ -16,6 +16,6 @@ jobs:
16
16
  uses: ./.github/workflows/ci.yml
17
17
  with:
18
18
  runtime-repository: 0xPlayerOne/code-foundry
19
- runtime-ref: staging
19
+ runtime-ref: ${{ github.sha }}
20
20
  runner: ubuntu-latest
21
21
  secrets: inherit
@@ -90,7 +90,7 @@ jobs:
90
90
  with:
91
91
  repository: ${{ inputs.runtime-repository }}
92
92
  ref: ${{ inputs.runtime-ref }}
93
- path: .code-foundry
93
+ path: .github/.code-foundry
94
94
  sparse-checkout: |
95
95
  .github/actions
96
96
  src/lib
@@ -98,7 +98,7 @@ jobs:
98
98
  - name: Install runtime
99
99
  run: |
100
100
  mkdir -p .github/actions
101
- cp -R .code-foundry/.github/actions/. .github/actions/
101
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
102
102
  - id: languages
103
103
  name: Detect languages
104
104
  env:
@@ -106,7 +106,7 @@ jobs:
106
106
  REPO_FOUNDRY_CODE_SECURITY: ${{ steps.security.outputs.status }}
107
107
  REPO_FOUNDRY_PRIVATE: ${{ github.event.repository.private }}
108
108
  REPO_FOUNDRY_VISIBILITY: ${{ github.event.repository.visibility }}
109
- run: node .code-foundry/src/runtime.mjs codeql
109
+ run: node .github/.code-foundry/src/runtime.mjs codeql
110
110
 
111
111
  analyze-actions:
112
112
  name: Analyze (Actions)
@@ -132,7 +132,7 @@ jobs:
132
132
  with:
133
133
  repository: ${{ inputs.runtime-repository }}
134
134
  ref: ${{ inputs.runtime-ref }}
135
- path: .code-foundry
135
+ path: .github/.code-foundry
136
136
  sparse-checkout: |
137
137
  .github/actions
138
138
  src/lib
@@ -144,7 +144,7 @@ jobs:
144
144
  needs.detect.outputs.actions_changed == 'true'
145
145
  run: |
146
146
  mkdir -p .github/actions
147
- cp -R .code-foundry/.github/actions/. .github/actions/
147
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
148
148
  - name: Analyze
149
149
  if: >-
150
150
  needs.detect.outputs.enabled == 'true' &&
@@ -186,7 +186,7 @@ jobs:
186
186
  with:
187
187
  repository: ${{ inputs.runtime-repository }}
188
188
  ref: ${{ inputs.runtime-ref }}
189
- path: .code-foundry
189
+ path: .github/.code-foundry
190
190
  sparse-checkout: |
191
191
  .github/actions
192
192
  src/lib
@@ -198,7 +198,7 @@ jobs:
198
198
  needs.detect.outputs.javascript_changed == 'true'
199
199
  run: |
200
200
  mkdir -p .github/actions
201
- cp -R .code-foundry/.github/actions/. .github/actions/
201
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
202
202
  - name: Analyze
203
203
  if: >-
204
204
  needs.detect.outputs.enabled == 'true' &&
@@ -240,7 +240,7 @@ jobs:
240
240
  with:
241
241
  repository: ${{ inputs.runtime-repository }}
242
242
  ref: ${{ inputs.runtime-ref }}
243
- path: .code-foundry
243
+ path: .github/.code-foundry
244
244
  sparse-checkout: |
245
245
  .github/actions
246
246
  src/lib
@@ -252,7 +252,7 @@ jobs:
252
252
  needs.detect.outputs.python_changed == 'true'
253
253
  run: |
254
254
  mkdir -p .github/actions
255
- cp -R .code-foundry/.github/actions/. .github/actions/
255
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
256
256
  - name: Analyze
257
257
  if: >-
258
258
  needs.detect.outputs.enabled == 'true' &&
@@ -294,7 +294,7 @@ jobs:
294
294
  with:
295
295
  repository: ${{ inputs.runtime-repository }}
296
296
  ref: ${{ inputs.runtime-ref }}
297
- path: .code-foundry
297
+ path: .github/.code-foundry
298
298
  sparse-checkout: |
299
299
  .github/actions
300
300
  src/lib
@@ -306,7 +306,7 @@ jobs:
306
306
  needs.detect.outputs.rust_changed == 'true'
307
307
  run: |
308
308
  mkdir -p .github/actions
309
- cp -R .code-foundry/.github/actions/. .github/actions/
309
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
310
310
  - name: Analyze
311
311
  if: >-
312
312
  needs.detect.outputs.enabled == 'true' &&
@@ -21,6 +21,6 @@ jobs:
21
21
  uses: ./.github/workflows/codeql.yml
22
22
  with:
23
23
  runtime-repository: 0xPlayerOne/code-foundry
24
- runtime-ref: staging
24
+ runtime-ref: ${{ github.sha }}
25
25
  runner: ubuntu-latest
26
26
  secrets: inherit
@@ -55,7 +55,7 @@ jobs:
55
55
  with:
56
56
  repository: ${{ inputs.runtime-repository }}
57
57
  ref: ${{ inputs.runtime-ref }}
58
- path: .code-foundry
58
+ path: .github/.code-foundry
59
59
  sparse-checkout: src
60
60
  - name: Detect release profile
61
61
  id: profile
@@ -117,7 +117,7 @@ jobs:
117
117
  GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
118
118
  run: |
119
119
  set -euo pipefail
120
- node .code-foundry/src/cli.mjs release validate-prs
120
+ node .github/.code-foundry/src/cli.mjs release validate-prs
121
121
  mapfile -t release_prs < <(
122
122
  gh pr list \
123
123
  --repo "$GITHUB_REPOSITORY" \
@@ -155,7 +155,7 @@ jobs:
155
155
  with:
156
156
  repository: ${{ inputs.runtime-repository }}
157
157
  ref: ${{ inputs.runtime-ref }}
158
- path: .code-foundry
158
+ path: .github/.code-foundry
159
159
  sparse-checkout: |
160
160
  src
161
161
  release-please-config.json
@@ -170,7 +170,7 @@ jobs:
170
170
  fi
171
171
  - name: Reconcile release metadata
172
172
  if: steps.staging.outputs.exists == 'true'
173
- run: node .code-foundry/src/cli.mjs release reconcile --github --base main --head staging
173
+ run: node .github/.code-foundry/src/cli.mjs release reconcile --github --base main --head staging
174
174
  - name: Skip without staging
175
175
  if: steps.staging.outputs.exists != 'true'
176
176
  run: echo 'No staging branch exists; release reconciliation is not applicable.'
@@ -200,7 +200,7 @@ jobs:
200
200
  with:
201
201
  repository: ${{ inputs.runtime-repository }}
202
202
  ref: ${{ inputs.runtime-ref }}
203
- path: .code-foundry
203
+ path: .github/.code-foundry
204
204
  sparse-checkout: src
205
205
  - name: Detect post-release hook
206
206
  id: hook
@@ -221,7 +221,7 @@ jobs:
221
221
  NODE
222
222
  - name: Dispatch post-release hook once
223
223
  if: steps.hook.outputs.enabled == 'true' && steps.hook.outputs.workflow != ''
224
- run: node .code-foundry/src/cli.mjs release hook --tag '${{ needs.release.outputs.tag_name }}' --workflow '${{ steps.hook.outputs.workflow }}' --mode '${{ steps.hook.outputs.mode }}'
224
+ run: node .github/.code-foundry/src/cli.mjs release hook --tag '${{ needs.release.outputs.tag_name }}' --workflow '${{ steps.hook.outputs.workflow }}' --mode '${{ steps.hook.outputs.mode }}'
225
225
  - name: Explain disabled post-release hook
226
226
  if: steps.hook.outputs.enabled != 'true' || steps.hook.outputs.workflow == ''
227
227
  run: echo 'No post-release workflow configured; artifact delivery is intentionally skipped.'
@@ -19,5 +19,5 @@ jobs:
19
19
  with:
20
20
  runner: ubuntu-slim
21
21
  runtime-repository: 0xPlayerOne/code-foundry
22
- runtime-ref: main
22
+ runtime-ref: ${{ github.sha }}
23
23
  secrets: inherit
@@ -81,7 +81,7 @@ jobs:
81
81
  with:
82
82
  repository: ${{ inputs.runtime-repository }}
83
83
  ref: ${{ inputs.runtime-ref }}
84
- path: .code-foundry
84
+ path: .github/.code-foundry
85
85
  sparse-checkout: |
86
86
  .github/actions
87
87
  src/lib
@@ -89,13 +89,13 @@ jobs:
89
89
  - name: Install runtime
90
90
  run: |
91
91
  mkdir -p .github/actions
92
- cp -R .code-foundry/.github/actions/. .github/actions/
92
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
93
93
  - name: Detect
94
94
  id: profile
95
95
  env:
96
96
  REPO_FOUNDRY_PRIVATE: ${{ github.event.repository.private }}
97
97
  REPO_FOUNDRY_VISIBILITY: ${{ github.event.repository.visibility }}
98
- run: node .code-foundry/src/runtime.mjs security profile >> "$GITHUB_OUTPUT"
98
+ run: node .github/.code-foundry/src/runtime.mjs security profile >> "$GITHUB_OUTPUT"
99
99
 
100
100
  dependency-audit-javascript:
101
101
  name: Dependency Audit (JavaScript)
@@ -127,7 +127,7 @@ jobs:
127
127
  with:
128
128
  repository: ${{ inputs.runtime-repository }}
129
129
  ref: ${{ inputs.runtime-ref }}
130
- path: .code-foundry
130
+ path: .github/.code-foundry
131
131
  sparse-checkout: |
132
132
  .github/actions
133
133
  src/lib
@@ -135,10 +135,10 @@ jobs:
135
135
  - name: Install runtime
136
136
  run: |
137
137
  mkdir -p .github/actions
138
- cp -R .code-foundry/.github/actions/. .github/actions/
138
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
139
139
  - name: Detect
140
140
  id: applicability
141
- run: node .code-foundry/src/runtime.mjs security should_run javascript >> "$GITHUB_OUTPUT"
141
+ run: node .github/.code-foundry/src/runtime.mjs security should_run javascript >> "$GITHUB_OUTPUT"
142
142
  - name: Setup
143
143
  if: steps.applicability.outputs.applicable == 'true'
144
144
  uses: ./.github/actions/setup
@@ -147,7 +147,7 @@ jobs:
147
147
  cache-save: ${{ github.event_name != 'pull_request' }}
148
148
  - name: Audit dependencies
149
149
  if: steps.applicability.outputs.applicable == 'true'
150
- run: node .code-foundry/src/runtime.mjs security audit javascript
150
+ run: node .github/.code-foundry/src/runtime.mjs security audit javascript
151
151
 
152
152
  dependency-audit-rust:
153
153
  name: Dependency Audit (Rust)
@@ -173,7 +173,7 @@ jobs:
173
173
  with:
174
174
  repository: ${{ inputs.runtime-repository }}
175
175
  ref: ${{ inputs.runtime-ref }}
176
- path: .code-foundry
176
+ path: .github/.code-foundry
177
177
  sparse-checkout: |
178
178
  .github/actions
179
179
  src/lib
@@ -181,10 +181,10 @@ jobs:
181
181
  - name: Install runtime
182
182
  run: |
183
183
  mkdir -p .github/actions
184
- cp -R .code-foundry/.github/actions/. .github/actions/
184
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
185
185
  - name: Detect
186
186
  id: applicability
187
- run: node .code-foundry/src/runtime.mjs security should_run rust >> "$GITHUB_OUTPUT"
187
+ run: node .github/.code-foundry/src/runtime.mjs security should_run rust >> "$GITHUB_OUTPUT"
188
188
  - name: Check Rust
189
189
  id: system-rust
190
190
  if: steps.applicability.outputs.applicable == 'true'
@@ -212,7 +212,7 @@ jobs:
212
212
  tool: cargo-audit
213
213
  - name: Audit dependencies
214
214
  if: steps.applicability.outputs.applicable == 'true'
215
- run: node .code-foundry/src/runtime.mjs security audit rust
215
+ run: node .github/.code-foundry/src/runtime.mjs security audit rust
216
216
 
217
217
  dependency-audit-python:
218
218
  name: Dependency Audit (Python) / ${{ matrix.requirement }}
@@ -253,7 +253,7 @@ jobs:
253
253
  with:
254
254
  repository: ${{ inputs.runtime-repository }}
255
255
  ref: ${{ inputs.runtime-ref }}
256
- path: .code-foundry
256
+ path: .github/.code-foundry
257
257
  sparse-checkout: |
258
258
  .github/actions
259
259
  src/lib
@@ -261,14 +261,14 @@ jobs:
261
261
  - name: Install runtime
262
262
  run: |
263
263
  mkdir -p .github/actions
264
- cp -R .code-foundry/.github/actions/. .github/actions/
264
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
265
265
  - name: Setup
266
266
  uses: ./.github/actions/setup
267
267
  with:
268
268
  mise-scope: python
269
269
  cache-save: ${{ github.event_name != 'pull_request' }}
270
270
  - name: Audit dependencies
271
- run: node .code-foundry/src/runtime.mjs security audit python
271
+ run: node .github/.code-foundry/src/runtime.mjs security audit python
272
272
 
273
273
  dependency-audit-python-gate:
274
274
  name: Dependency Audit (Python)
@@ -16,6 +16,6 @@ jobs:
16
16
  uses: ./.github/workflows/security.yml
17
17
  with:
18
18
  runtime-repository: 0xPlayerOne/code-foundry
19
- runtime-ref: staging
19
+ runtime-ref: ${{ github.sha }}
20
20
  runner: ubuntu-slim
21
21
  secrets: inherit
@@ -58,7 +58,7 @@ jobs:
58
58
  with:
59
59
  repository: ${{ inputs.runtime-repository }}
60
60
  ref: ${{ inputs.runtime-ref }}
61
- path: .code-foundry
61
+ path: .github/.code-foundry
62
62
  sparse-checkout: |
63
63
  .github/actions
64
64
  src/lib
@@ -66,10 +66,10 @@ jobs:
66
66
  - name: Install runtime
67
67
  run: |
68
68
  mkdir -p .github/actions
69
- cp -R .code-foundry/.github/actions/. .github/actions/
69
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
70
70
  - name: Detect
71
71
  id: applicability
72
- run: node .code-foundry/src/runtime.mjs ci task_profile unit >> "$GITHUB_OUTPUT"
72
+ run: node .github/.code-foundry/src/runtime.mjs ci task_profile unit >> "$GITHUB_OUTPUT"
73
73
  - name: Setup
74
74
  if: steps.applicability.outputs.applicable == 'true'
75
75
  uses: ./.github/actions/setup
@@ -87,7 +87,7 @@ jobs:
87
87
  task-rust: ${{ steps.applicability.outputs.rust }}
88
88
  - name: Unit
89
89
  if: steps.applicability.outputs.applicable == 'true'
90
- run: node .code-foundry/src/runtime.mjs ci unit
90
+ run: node .github/.code-foundry/src/runtime.mjs ci unit
91
91
  - name: Upload coverage
92
92
  if: >-
93
93
  always() &&
@@ -119,7 +119,7 @@ jobs:
119
119
  with:
120
120
  repository: ${{ inputs.runtime-repository }}
121
121
  ref: ${{ inputs.runtime-ref }}
122
- path: .code-foundry
122
+ path: .github/.code-foundry
123
123
  sparse-checkout: |
124
124
  .github/actions
125
125
  src/lib
@@ -127,10 +127,10 @@ jobs:
127
127
  - name: Install runtime
128
128
  run: |
129
129
  mkdir -p .github/actions
130
- cp -R .code-foundry/.github/actions/. .github/actions/
130
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
131
131
  - name: Detect
132
132
  id: applicability
133
- run: node .code-foundry/src/runtime.mjs ci task_profile integration >> "$GITHUB_OUTPUT"
133
+ run: node .github/.code-foundry/src/runtime.mjs ci task_profile integration >> "$GITHUB_OUTPUT"
134
134
  - name: Setup
135
135
  if: steps.applicability.outputs.applicable == 'true'
136
136
  uses: ./.github/actions/setup
@@ -148,7 +148,7 @@ jobs:
148
148
  task-rust: ${{ steps.applicability.outputs.rust }}
149
149
  - name: Integration
150
150
  if: steps.applicability.outputs.applicable == 'true'
151
- run: node .code-foundry/src/runtime.mjs ci integration
151
+ run: node .github/.code-foundry/src/runtime.mjs ci integration
152
152
 
153
153
  e2e:
154
154
  name: E2E
@@ -164,7 +164,7 @@ jobs:
164
164
  with:
165
165
  repository: ${{ inputs.runtime-repository }}
166
166
  ref: ${{ inputs.runtime-ref }}
167
- path: .code-foundry
167
+ path: .github/.code-foundry
168
168
  sparse-checkout: |
169
169
  .github/actions
170
170
  src/lib
@@ -172,10 +172,10 @@ jobs:
172
172
  - name: Install runtime
173
173
  run: |
174
174
  mkdir -p .github/actions
175
- cp -R .code-foundry/.github/actions/. .github/actions/
175
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
176
176
  - name: Detect
177
177
  id: applicability
178
- run: node .code-foundry/src/runtime.mjs ci task_profile e2e >> "$GITHUB_OUTPUT"
178
+ run: node .github/.code-foundry/src/runtime.mjs ci task_profile e2e >> "$GITHUB_OUTPUT"
179
179
  - name: Cache browser binaries
180
180
  if: steps.applicability.outputs.applicable == 'true' && steps.applicability.outputs.browser == 'true'
181
181
  uses: ./.github/actions/cache
@@ -205,7 +205,7 @@ jobs:
205
205
  task-rust: ${{ steps.applicability.outputs.rust }}
206
206
  - name: E2E
207
207
  if: steps.applicability.outputs.applicable == 'true'
208
- run: node .code-foundry/src/runtime.mjs ci e2e
208
+ run: node .github/.code-foundry/src/runtime.mjs ci e2e
209
209
 
210
210
  smoke:
211
211
  name: Smoke
@@ -221,7 +221,7 @@ jobs:
221
221
  with:
222
222
  repository: ${{ inputs.runtime-repository }}
223
223
  ref: ${{ inputs.runtime-ref }}
224
- path: .code-foundry
224
+ path: .github/.code-foundry
225
225
  sparse-checkout: |
226
226
  .github/actions
227
227
  src/lib
@@ -229,10 +229,10 @@ jobs:
229
229
  - name: Install runtime
230
230
  run: |
231
231
  mkdir -p .github/actions
232
- cp -R .code-foundry/.github/actions/. .github/actions/
232
+ cp -R .github/.code-foundry/.github/actions/. .github/actions/
233
233
  - name: Detect
234
234
  id: applicability
235
- run: node .code-foundry/src/runtime.mjs ci task_profile smoke >> "$GITHUB_OUTPUT"
235
+ run: node .github/.code-foundry/src/runtime.mjs ci task_profile smoke >> "$GITHUB_OUTPUT"
236
236
  - name: Setup
237
237
  if: steps.applicability.outputs.applicable == 'true'
238
238
  uses: ./.github/actions/setup
@@ -250,4 +250,4 @@ jobs:
250
250
  task-rust: ${{ steps.applicability.outputs.rust }}
251
251
  - name: Smoke
252
252
  if: steps.applicability.outputs.applicable == 'true'
253
- run: node .code-foundry/src/runtime.mjs ci smoke
253
+ run: node .github/.code-foundry/src/runtime.mjs ci smoke
@@ -16,7 +16,7 @@ jobs:
16
16
  uses: ./.github/workflows/test.yml
17
17
  with:
18
18
  runtime-repository: 0xPlayerOne/code-foundry
19
- runtime-ref: staging
19
+ runtime-ref: ${{ github.sha }}
20
20
  runner: ubuntu-latest
21
21
  unit-runner: ubuntu-slim
22
22
  secrets: inherit
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.31.0](https://github.com/0xPlayerOne/code-foundry/compare/v0.30.4...v0.31.0) (2026-07-29)
4
+
5
+
6
+ ### Features
7
+
8
+ * **release:** open safe staging sync PRs ([6adb1dc](https://github.com/0xPlayerOne/code-foundry/commit/6adb1dc63966e5bfe70deb3ccd3c3aa5e93ccfad))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **release:** compare promoted branch tips ([081666b](https://github.com/0xPlayerOne/code-foundry/commit/081666b774418ab333d34eb9a3ca2a8c3bd60c78))
14
+
15
+ ## [0.30.4](https://github.com/0xPlayerOne/code-foundry/compare/v0.30.3...v0.30.4) (2026-07-29)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **ci:** isolate runtime from consumer tooling ([32fe3ee](https://github.com/0xPlayerOne/code-foundry/commit/32fe3eea20ddad6086c1cfcacff6e7cb90606da0))
21
+ * **self-ci:** test the checked-out runtime revision ([93973ba](https://github.com/0xPlayerOne/code-foundry/commit/93973bac19da7d250e3ccda4d4c79b1b0033008b))
22
+
3
23
  ## [0.30.3](https://github.com/0xPlayerOne/code-foundry/compare/v0.30.2...v0.30.3) (2026-07-29)
4
24
 
5
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "0.30.3",
3
+ "version": "0.31.0",
4
4
  "description": "A fast, language-aware repository factory for agent-ready workflows, testing, security, and release automation.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-or-later",
@@ -22,8 +22,12 @@ export function reconcileRelease(root, options) {
22
22
  const mainSha = git(target, ['rev-parse', `origin/${base}`]) || git(target, ['rev-parse', base])
23
23
  const stagingSha = git(target, ['rev-parse', `origin/${head}`]) || git(target, ['rev-parse', head])
24
24
  const mergeBaseSha = git(target, ['merge-base', mainSha, stagingSha])
25
- const mainChangedPaths = diffNames(target, mergeBaseSha, mainSha)
26
- const stagingChangedPaths = diffNames(target, mergeBaseSha, stagingSha)
25
+ // Compare the branch tips directly. Release Please may rebase or recreate
26
+ // commits during promotion, leaving equivalent code with different ancestry.
27
+ // Comparing both tips preserves the fail-closed behavior for real content
28
+ // differences without mistaking that normal history rewrite for a change.
29
+ const mainChangedPaths = diffNames(target, stagingSha, mainSha)
30
+ const stagingChangedPaths = diffNames(target, mainSha, stagingSha)
27
31
  const plan = classifyReconciliation({
28
32
  mainSha,
29
33
  stagingSha,
@@ -34,6 +38,23 @@ export function reconcileRelease(root, options) {
34
38
  })
35
39
  console.log(JSON.stringify({ base, head, ...plan }, null, 2))
36
40
  if (plan.action === 'fail') throw new Error(plan.reason + (plan.unexpected?.length ? ` Unexpected paths: ${plan.unexpected.join(', ')}` : ''))
41
+ if (plan.action === 'pull-request' && options.github && !options.dryRun) {
42
+ if (!process.env.GITHUB_REPOSITORY) throw new Error('GITHUB_REPOSITORY is required for synchronization PRs.')
43
+ const token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN
44
+ if (!token) throw new Error('GH_TOKEN or GITHUB_TOKEN is required for synchronization PRs.')
45
+ const existing = ghJson(target, ['pr', 'list', '--repo', process.env.GITHUB_REPOSITORY, '--state', 'open', '--base', head, '--head', base, '--json', 'number,url'])
46
+ if (Array.isArray(existing) && existing.length) {
47
+ return { ...plan, synchronizationPullRequest: existing[0].url ?? existing[0].number }
48
+ }
49
+ const result = spawnSync('gh', [
50
+ 'pr', 'create', '--repo', process.env.GITHUB_REPOSITORY,
51
+ '--base', head, '--head', base,
52
+ '--title', `chore(release): synchronize ${base} -> ${head}`,
53
+ '--body', `Synchronize ${head} with ${base} after Release Please publication.\n\nOnly approved release metadata differs between the branch tips; Code Foundry verified the content before opening this PR.`,
54
+ ], { cwd: resolve(root), encoding: 'utf8', env: { ...process.env, GH_TOKEN: token } })
55
+ if (result.status !== 0) throw new Error(`Failed to create synchronization PR: ${result.stderr.trim()}`)
56
+ return { ...plan, synchronizationPullRequest: result.stdout.trim() }
57
+ }
37
58
  if (plan.action !== 'fast-forward' || !options.github || options.dryRun) return plan
38
59
  if (!process.env.GITHUB_REPOSITORY) throw new Error('GITHUB_REPOSITORY is required for --github reconciliation.')
39
60
  const token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN
@@ -11,7 +11,7 @@ import { customWorkflowFiles, overlayPolicy } from '../lib/overlay.mjs'
11
11
  const standardFiles = [
12
12
  '.editorconfig', '.gitattributes', '.gitignore', 'release-please-config.json',
13
13
  'docs/EXTENSIONS.md',
14
- '.githooks/pre-commit', 'AGENTS.md', 'LICENSE', 'NOTICE', 'ruff.toml', '.prettierrc',
14
+ '.githooks/pre-commit', 'AGENTS.md', 'LICENSE', 'NOTICE', 'ruff.toml', '.prettierrc', '.prettierignore',
15
15
  '.github/CODEOWNERS', '.github/CODE_OF_CONDUCT.md', '.github/CONTRIBUTING.md',
16
16
  '.github/PULL_REQUEST_TEMPLATE.md', '.github/SECURITY.md', '.github/dependabot.yml',
17
17
  '.github/ISSUE_TEMPLATE/bug_report.yml', '.github/ISSUE_TEMPLATE/config.yml',
@@ -108,6 +108,9 @@ export function syncRepository(options) {
108
108
  if (file === '.gitignore' && existsSync(destination)) {
109
109
  content = Buffer.from(mergeGitignore(content.toString('utf8'), readFileSync(destination, 'utf8')))
110
110
  }
111
+ if (file === '.prettierignore' && existsSync(destination)) {
112
+ content = Buffer.from(mergeIgnoreFile(content.toString('utf8'), readFileSync(destination, 'utf8')))
113
+ }
111
114
  if (!existsSync(destination) || !buffersEqual(content, readFileSync(destination))) {
112
115
  changed.push(file)
113
116
  writeOrReport(destination, content, dryRun)
@@ -140,8 +143,8 @@ export function syncRepository(options) {
140
143
  }
141
144
  if (includesValue(languages, 'typescript') && existsSync(join(target, '.prettierignore'))) {
142
145
  const prettierIgnore = readFileSync(join(target, '.prettierignore'), 'utf8')
143
- if (!prettierIgnore.split(/\r?\n/).includes('.code-foundry')) {
144
- writeOrReport(join(target, '.prettierignore'), `${prettierIgnore.trimEnd()}\n.code-foundry\n`, dryRun)
146
+ if (!prettierIgnore.split(/\r?\n/).includes('.github/.code-foundry')) {
147
+ writeOrReport(join(target, '.prettierignore'), `${prettierIgnore.trimEnd()}\n.github/.code-foundry\n`, dryRun)
145
148
  changed.push('.prettierignore')
146
149
  }
147
150
  }
@@ -175,7 +178,7 @@ function renderReleaseConfig(target, sourceFile) {
175
178
  /** @param {string} file @param {string} languages @param {string} features @param {Record<string, string>} config */
176
179
  function shouldInclude(file, languages, features, config) {
177
180
  if (file === 'ruff.toml') return includesValue(languages, 'python')
178
- if (file === '.prettierrc') return includesValue(languages, 'typescript')
181
+ if (file === '.prettierrc' || file === '.prettierignore') return includesValue(languages, 'typescript')
179
182
  if (file === '.github/dependabot.yml') return includesValue(features, 'dependabot')
180
183
  if (file === '.github/workflows/opencode-security.yml') return ['true', 'auto'].includes(config.opencode_security ?? 'false')
181
184
  const workflow = file.match(/^\.github\/workflows\/([^/]+)\.yml$/)?.[1]
@@ -228,6 +231,13 @@ function mergeGitignore(baseline, existing) {
228
231
  return custom ? `${baseline.trimEnd()}\n\n${marker}\n${custom}\n` : baseline
229
232
  }
230
233
 
234
+ /** @param {string} baseline @param {string} existing */
235
+ function mergeIgnoreFile(baseline, existing) {
236
+ const baselineLines = new Set(baseline.split(/\r?\n/).map((line) => line.trim()).filter(Boolean))
237
+ const custom = existing.split(/\r?\n/).map((line) => line.trimEnd()).filter((line) => line.trim() && !baselineLines.has(line.trim()))
238
+ return custom.length ? `${baseline.trimEnd()}\n\n# Repository-specific rules\n${custom.join('\n')}\n` : baseline
239
+ }
240
+
231
241
  /** @param {string} file @param {string} content */
232
242
  function isLegacyManagedDoc(file, content) {
233
243
  if (file === 'AGENTS.md') {