code-foundry 1.3.0 → 1.3.2

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.
@@ -11,7 +11,7 @@ dependency_review: auto
11
11
  package_manager: bun
12
12
  toolchain: auto
13
13
  runtime_repository: 0xPlayerOne/code-foundry
14
- runtime_ref: v1.2.0
14
+ runtime_ref: v1.3.1
15
15
  release_type: node
16
16
  npm_publish: true
17
17
  license: agpl-3.0-or-later
@@ -9,17 +9,16 @@ permissions:
9
9
  contents: read
10
10
 
11
11
  jobs:
12
- # One job: the release-please branch gate stays at the job level so
13
- # ordinary pull requests render a single skipped check instead of two.
14
- # The scan itself still runs only for generated release pull requests
15
- # (or manual dispatch) with the scanner configured and keyed.
16
- scan:
17
- name: OpenCode Security / Scan
12
+ detect:
13
+ name: OpenCode Security / Detect
18
14
  if: >-
19
15
  vars.CI_BILLING_PAUSED != 'true' &&
20
16
  (github.event_name == 'workflow_dispatch' ||
21
17
  startsWith(github.event.pull_request.head.ref, 'release-please--branches--main'))
22
18
  runs-on: ubuntu-slim
19
+ outputs:
20
+ enabled: ${{ steps.detect.outputs.enabled }}
21
+ token: ${{ steps.detect.outputs.token }}
23
22
  steps:
24
23
  - name: Checkout
25
24
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
@@ -36,17 +35,27 @@ jobs:
36
35
  if [ -n "$OPENCODE_API_KEY" ]; then token=true; fi
37
36
  echo "enabled=$enabled" >> "$GITHUB_OUTPUT"
38
37
  echo "token=$token" >> "$GITHUB_OUTPUT"
39
- - name: Scan
40
- if: steps.detect.outputs.enabled == 'true' && steps.detect.outputs.token == 'true'
41
- uses: 0xPlayerOne/opencode-security/.github/workflows/opencode-security.yml@137698ef3545204af8fad00fc8bd64d663c8122e # main
42
- with:
43
- # This is the scanner checkout ref, not the consumer PR ref. The
44
- # reusable workflow already checks out the consumer repository.
45
- source_ref: 137698ef3545204af8fad00fc8bd64d663c8122e
46
- runner: ubuntu-latest
47
- model: opencode-go/muse-spark-1.3-contributor
48
- mode: standard
49
- fail_on_severity: high
50
- max_cost_usd: 1
51
- secrets:
52
- OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
38
+
39
+ # Reusable workflows can only be called from a job level, so the scan is
40
+ # its own job gated on the detect outputs. The scan itself still runs only
41
+ # for generated release pull requests (or manual dispatch) with the
42
+ # scanner configured and keyed.
43
+ scan:
44
+ name: OpenCode Security / Scan
45
+ needs: detect
46
+ if: >-
47
+ vars.CI_BILLING_PAUSED != 'true' &&
48
+ needs.detect.outputs.enabled == 'true' &&
49
+ needs.detect.outputs.token == 'true'
50
+ uses: 0xPlayerOne/opencode-security/.github/workflows/opencode-security.yml@137698ef3545204af8fad00fc8bd64d663c8122e # main
51
+ with:
52
+ # This is the scanner checkout ref, not the consumer PR ref. The
53
+ # reusable workflow already checks out the consumer repository.
54
+ source_ref: 137698ef3545204af8fad00fc8bd64d663c8122e
55
+ runner: ubuntu-latest
56
+ model: opencode-go/muse-spark-1.3-contributor
57
+ mode: standard
58
+ fail_on_severity: high
59
+ max_cost_usd: 1
60
+ secrets:
61
+ OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.2](https://github.com/0xPlayerOne/code-foundry/compare/v1.3.1...v1.3.2) (2026-09-07)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * preserve consumer-only Oxc config keys across syncs ([#476](https://github.com/0xPlayerOne/code-foundry/issues/476)) ([07aee3a](https://github.com/0xPlayerOne/code-foundry/commit/07aee3aed2aadeccf9740e1966941281e3f031f4))
9
+
10
+ ## [1.3.1](https://github.com/0xPlayerOne/code-foundry/compare/v1.3.0...v1.3.1) (2026-09-07)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * restore job-level OpenCode scanner call; preserve consumer oxlint ignores on sync ([#473](https://github.com/0xPlayerOne/code-foundry/issues/473)) ([171ac3d](https://github.com/0xPlayerOne/code-foundry/commit/171ac3dc57368a6ad1e21d8b439a34cbbe2eca58))
16
+
3
17
  ## [1.3.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.2.1...v1.3.0) (2026-09-07)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-foundry",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
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": {
@@ -227,7 +227,12 @@ export function syncRepository(options) {
227
227
  }
228
228
  if (file === '.oxfmtrc.json' && existsSync(destination)) {
229
229
  content = Buffer.from(
230
- mergeOxfmtConfig(content.toString('utf8'), readFileSync(destination, 'utf8'))
230
+ mergeIgnorePatternsConfig(content.toString('utf8'), readFileSync(destination, 'utf8'))
231
+ )
232
+ }
233
+ if (file === '.oxlintrc.json' && existsSync(destination)) {
234
+ content = Buffer.from(
235
+ mergeIgnorePatternsConfig(content.toString('utf8'), readFileSync(destination, 'utf8'))
231
236
  )
232
237
  }
233
238
  if (!existsSync(destination) || !buffersEqual(content, readFileSync(destination))) {
@@ -776,32 +781,45 @@ function mergeGitignore(baseline, existing) {
776
781
  }
777
782
 
778
783
  /**
779
- * Merge the baseline Oxfmt config with the consumer's current config. The
780
- * baseline owns every key except `ignorePatterns`, where consumer-specific
781
- * patterns (added by sync migrations or by the repository) are preserved so
782
- * repeated syncs never churn them.
784
+ * Merge a baseline Oxc config (.oxfmtrc.json / .oxlintrc.json) with the
785
+ * consumer's current config. The baseline owns every key it defines, except
786
+ * `ignorePatterns`, where consumer-specific patterns (added by sync
787
+ * migrations or by the repository) are preserved so repeated syncs never
788
+ * churn them. Keys the baseline does not define (e.g. a repository-owned
789
+ * `overrides` block) belong to the consumer and are preserved as well, so
790
+ * a sync never silently drops repository-owned configuration.
783
791
  * @param {string} baseline @param {string} existing @returns {string}
784
792
  */
785
- function mergeOxfmtConfig(baseline, existing) {
786
- /** @type {string[]} */
787
- let extra = []
793
+ function mergeIgnorePatternsConfig(baseline, existing) {
794
+ /** @type {Record<string, any>} */
795
+ let consumer = {}
788
796
  try {
789
- const parsed = JSON.parse(existing)
790
- if (Array.isArray(parsed.ignorePatterns)) extra = parsed.ignorePatterns
797
+ consumer = JSON.parse(existing)
798
+ if (consumer === null || typeof consumer !== 'object' || Array.isArray(consumer))
799
+ return baseline
791
800
  } catch {
792
801
  return baseline
793
802
  }
794
- if (extra.length === 0) return baseline
795
- let config
803
+ /** @type {Record<string, any>} */
804
+ let config = {}
796
805
  try {
797
806
  config = JSON.parse(baseline)
807
+ if (config === null || typeof config !== 'object' || Array.isArray(config)) return baseline
798
808
  } catch {
799
809
  return baseline
800
810
  }
811
+ let preserved = false
812
+ for (const [key, value] of Object.entries(consumer)) {
813
+ if (!(key in config)) {
814
+ config[key] = value
815
+ preserved = true
816
+ }
817
+ }
818
+ const extra = Array.isArray(consumer.ignorePatterns) ? consumer.ignorePatterns : []
801
819
  const base = Array.isArray(config.ignorePatterns) ? config.ignorePatterns : []
802
820
  const missing = extra.filter((pattern) => !base.includes(pattern))
803
- if (missing.length === 0) return baseline
804
- config.ignorePatterns = [...base, ...missing]
821
+ if (missing.length) config.ignorePatterns = [...base, ...missing]
822
+ if (!preserved && !missing.length) return baseline
805
823
  return `${JSON.stringify(config, null, 2)}\n`
806
824
  }
807
825