code-foundry 0.31.6 → 0.31.8

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.
@@ -8,7 +8,7 @@ dependency_review: auto
8
8
  package_manager: bun
9
9
  toolchain: auto
10
10
  runtime_repository: 0xPlayerOne/code-foundry
11
- runtime_ref: v0.27.15
11
+ runtime_ref: v0.31.7
12
12
  release_type: node
13
13
  npm_publish: true
14
14
  license: agpl-3.0-or-later
@@ -12,7 +12,7 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.2
15
+ default: v0.31.7
16
16
  runner:
17
17
  description: Runner used by CI jobs.
18
18
  required: false
@@ -12,7 +12,7 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.2
15
+ default: v0.31.7
16
16
  runner:
17
17
  description: Runner used by CodeQL jobs.
18
18
  required: false
@@ -3,16 +3,66 @@ name: Code Foundry
3
3
  on:
4
4
  push:
5
5
  branches: [staging]
6
+ pull_request:
7
+ branches: [main]
6
8
  workflow_dispatch:
7
9
 
8
10
  permissions:
11
+ actions: read
9
12
  contents: read
10
13
  pull-requests: write
14
+ packages: read
15
+ security-events: write
11
16
 
12
17
  jobs:
13
18
  release-pr:
19
+ if: >-
20
+ github.event_name == 'push' ||
21
+ github.event_name == 'workflow_dispatch' ||
22
+ startsWith(github.head_ref, 'release-please--branches--main')
14
23
  name: Release PR
15
24
  uses: ./.github/workflows/release-pr.yml
16
25
  with:
17
26
  runner: ubuntu-slim
18
27
  secrets: inherit
28
+
29
+ ci:
30
+ if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--branches--main')
31
+ name: CI
32
+ uses: ./.github/workflows/ci.yml
33
+ with:
34
+ runtime-repository: 0xPlayerOne/code-foundry
35
+ runtime-ref: ${{ github.sha }}
36
+ runner: ubuntu-latest
37
+ secrets: inherit
38
+
39
+ test:
40
+ if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--branches--main')
41
+ name: Test
42
+ uses: ./.github/workflows/test.yml
43
+ with:
44
+ runtime-repository: 0xPlayerOne/code-foundry
45
+ runtime-ref: ${{ github.sha }}
46
+ runner: ubuntu-latest
47
+ unit-runner: ubuntu-slim
48
+ secrets: inherit
49
+
50
+ security:
51
+ if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--branches--main')
52
+ name: Security
53
+ uses: ./.github/workflows/security.yml
54
+ with:
55
+ runtime-repository: 0xPlayerOne/code-foundry
56
+ runtime-ref: ${{ github.sha }}
57
+ runner: ubuntu-slim
58
+ secrets: inherit
59
+
60
+ codeql:
61
+ if: github.event_name == 'pull_request' && startsWith(github.head_ref, 'release-please--branches--main')
62
+ name: CodeQL
63
+ uses: ./.github/workflows/codeql.yml
64
+ with:
65
+ runtime-repository: 0xPlayerOne/code-foundry
66
+ runtime-ref: ${{ github.sha }}
67
+ runner: ubuntu-latest
68
+ secrets: inherit
@@ -17,7 +17,7 @@ on:
17
17
  description: Code Foundry runtime tag or ref.
18
18
  required: false
19
19
  type: string
20
- default: v0.27.18
20
+ default: v0.31.7
21
21
 
22
22
  permissions:
23
23
  actions: write
@@ -114,12 +114,11 @@ jobs:
114
114
  run: |
115
115
  echo "::notice title=Manual release merge required::Release Please created or updated a version pull request. RELEASE_PLEASE_TOKEN is not configured, so Code Foundry skipped guarded auto-merge. Configure the token before merging when downstream release workflows must run automatically."
116
116
  - name: Merge generated version pull requests
117
- if: steps.release.outputs.prs_created == 'true' && steps.credentials.outputs.auto_merge == 'true'
117
+ if: steps.credentials.outputs.auto_merge == 'true'
118
118
  env:
119
119
  GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
120
120
  run: |
121
121
  set -euo pipefail
122
- node $RUNNER_TEMP/code-foundry/src/cli.mjs release validate-prs
123
122
  mapfile -t release_prs < <(
124
123
  gh pr list \
125
124
  --repo "$GITHUB_REPOSITORY" \
@@ -128,7 +127,37 @@ jobs:
128
127
  --json number,title,headRefName \
129
128
  --jq '.[] | select(.title | startswith("chore(main): release ")) | select(.headRefName | startswith("release-please--branches--main")) | .number'
130
129
  )
130
+ if [ "${#release_prs[@]}" -eq 0 ]; then
131
+ echo 'No generated release pull request is open; nothing to merge.'
132
+ exit 0
133
+ fi
134
+ node $RUNNER_TEMP/code-foundry/src/cli.mjs release validate-prs
131
135
  for pr in "${release_prs[@]}"; do
136
+ echo "Waiting for required checks on release PR #$pr"
137
+ checks_seen=false
138
+ for attempt in $(seq 1 60); do
139
+ if required_count=$(gh pr checks "$pr" \
140
+ --repo "$GITHUB_REPOSITORY" \
141
+ --required \
142
+ --json name \
143
+ --jq 'length' 2>/dev/null); then
144
+ if [ "$required_count" -gt 0 ]; then
145
+ checks_seen=true
146
+ break
147
+ fi
148
+ fi
149
+ sleep 5
150
+ done
151
+ if [ "$checks_seen" != true ]; then
152
+ echo "Required checks were not registered for release PR #$pr within the readiness window." >&2
153
+ exit 1
154
+ fi
155
+ gh pr checks "$pr" \
156
+ --repo "$GITHUB_REPOSITORY" \
157
+ --required \
158
+ --watch \
159
+ --fail-fast \
160
+ --interval 10
132
161
  gh pr merge "$pr" \
133
162
  --repo "$GITHUB_REPOSITORY" \
134
163
  --admin \
@@ -12,7 +12,7 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.2
15
+ default: v0.31.7
16
16
  runner:
17
17
  description: Runner used by Security jobs.
18
18
  required: false
@@ -12,7 +12,7 @@ on:
12
12
  description: Code Foundry runtime tag or ref.
13
13
  required: false
14
14
  type: string
15
- default: v0.20.2
15
+ default: v0.31.7
16
16
  runner:
17
17
  description: Runner used by non-unit test jobs.
18
18
  required: false
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.31.8](https://github.com/0xPlayerOne/code-foundry/compare/v0.31.7...v0.31.8) (2026-07-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **runtime:** pin self workflows to v0.31.7 ([565b5bc](https://github.com/0xPlayerOne/code-foundry/commit/565b5bcc2b8f4ade8b3addc02f72c96a42308325))
9
+
10
+ ## [0.31.7](https://github.com/0xPlayerOne/code-foundry/compare/v0.31.6...v0.31.7) (2026-07-30)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **ci:** remove duplicate promotion checks ([b210b7f](https://github.com/0xPlayerOne/code-foundry/commit/b210b7f0aa5bdb6cb7e121cc751b6f618512ebf3))
16
+
3
17
  ## [0.31.6](https://github.com/0xPlayerOne/code-foundry/compare/v0.31.5...v0.31.6) (2026-07-30)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "0.31.6",
3
+ "version": "0.31.8",
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",
@@ -74,8 +74,8 @@ function createSynchronizationPullRequest(root, repository, base, head, mainSha,
74
74
  if (apply.status !== 0) throw new Error(`Synchronization patch did not apply cleanly: ${apply.stderr.trim()}`)
75
75
  const add = spawnSync('git', ['add', '--', ...changedPaths], { cwd: root, encoding: 'utf8' })
76
76
  if (add.status !== 0) throw new Error(`Failed to stage synchronization metadata: ${add.stderr.trim()}`)
77
- const commit = spawnSync('git', ['commit', '-m', `chore(release): synchronize ${base} -> ${head}`], { cwd: root, encoding: 'utf8' })
78
- if (commit.status !== 0) throw new Error(`Failed to commit synchronization metadata: ${commit.stderr.trim()}`)
77
+ const identity = spawnSync('git', ['-c', 'user.name=github-actions[bot]', '-c', 'user.email=41898282+github-actions[bot]@users.noreply.github.com', 'commit', '-m', `chore(release): synchronize ${base} -> ${head}`], { cwd: root, encoding: 'utf8' })
78
+ if (identity.status !== 0) throw new Error(`Failed to commit synchronization metadata: ${identity.stderr.trim()}`)
79
79
  const push = spawnSync('git', ['push', '--set-upstream', 'origin', branch], { cwd: root, encoding: 'utf8', env: { ...process.env, GH_TOKEN: token } })
80
80
  if (push.status !== 0) throw new Error(`Failed to publish synchronization branch: ${push.stderr.trim()}`)
81
81
  }
@@ -1,58 +0,0 @@
1
- name: Code Foundry
2
-
3
- on:
4
- pull_request:
5
- branches: [main]
6
- workflow_dispatch:
7
-
8
- permissions:
9
- actions: read
10
- contents: read
11
- packages: read
12
- pull-requests: read
13
- security-events: write
14
-
15
- jobs:
16
- ci:
17
- name: CI
18
- uses: ./.github/workflows/ci.yml
19
- with:
20
- runtime-repository: 0xPlayerOne/code-foundry
21
- runtime-ref: ${{ github.sha }}
22
- runner: ubuntu-latest
23
- secrets: inherit
24
-
25
- test:
26
- name: Test
27
- uses: ./.github/workflows/test.yml
28
- with:
29
- runtime-repository: 0xPlayerOne/code-foundry
30
- runtime-ref: ${{ github.sha }}
31
- runner: ubuntu-latest
32
- unit-runner: ubuntu-slim
33
- secrets: inherit
34
-
35
- security:
36
- name: Security
37
- uses: ./.github/workflows/security.yml
38
- with:
39
- runtime-repository: 0xPlayerOne/code-foundry
40
- runtime-ref: ${{ github.sha }}
41
- runner: ubuntu-slim
42
- secrets: inherit
43
-
44
- codeql:
45
- name: CodeQL
46
- uses: ./.github/workflows/codeql.yml
47
- with:
48
- runtime-repository: 0xPlayerOne/code-foundry
49
- runtime-ref: ${{ github.sha }}
50
- runner: ubuntu-latest
51
- secrets: inherit
52
-
53
- release-pr:
54
- name: Release PR / Create
55
- runs-on: ubuntu-slim
56
- steps:
57
- - name: Validate promotion
58
- run: echo 'Main promotion validation is handled by this workflow; version release remains a post-merge action.'