code-foundry 1.29.1 → 1.30.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/CONFIGURATION.md +7 -0
- package/package.json +1 -1
- package/src/lib/task-filters.mjs +13 -3
- package/src/runtime-core.mjs +5 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.30.0](https://github.com/0xPlayerOne/code-foundry/compare/v1.29.1...v1.30.0) (2026-09-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* resolve lane diffs only for filtered lanes and accept injected paths ([#631](https://github.com/0xPlayerOne/code-foundry/issues/631)) ([04a0d8a](https://github.com/0xPlayerOne/code-foundry/commit/04a0d8a69b3fd3d3417eef46e22e0eb79860fb04))
|
|
9
|
+
|
|
3
10
|
## [1.29.1](https://github.com/0xPlayerOne/code-foundry/compare/v1.29.0...v1.29.1) (2026-09-17)
|
|
4
11
|
|
|
5
12
|
|
package/docs/CONFIGURATION.md
CHANGED
|
@@ -228,6 +228,13 @@ change set all keep the lane running. Paths are evaluated against
|
|
|
228
228
|
always run. Because filters only decide whether a lane _executes_, required
|
|
229
229
|
checks stay green and the aggregate gate sees a normal success.
|
|
230
230
|
|
|
231
|
+
Diff resolution only runs for lanes that have a filter configured, so
|
|
232
|
+
repositories using a single filter pay one shallow fetch per change instead
|
|
233
|
+
of one per lane. An orchestrator that has already resolved the change set can
|
|
234
|
+
inject it for a lane through a newline-delimited `CHANGED_PATHS` environment
|
|
235
|
+
variable; an empty or missing value falls back to local resolution, so an
|
|
236
|
+
injection can never widen a skip.
|
|
237
|
+
|
|
231
238
|
Security lanes and CodeQL are never filterable: their coverage is structural,
|
|
232
239
|
not change-scoped.
|
|
233
240
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "code-foundry",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.30.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/lib/task-filters.mjs
CHANGED
|
@@ -79,14 +79,24 @@ export function globToRegExp(glob) {
|
|
|
79
79
|
/**
|
|
80
80
|
* Resolve the pull request or push change set. The generated Detect steps
|
|
81
81
|
* pass EVENT_NAME plus BASE_REF/BASE_SHA/HEAD_SHA (pull_request) or
|
|
82
|
-
* BEFORE_SHA/HEAD_SHA (push).
|
|
83
|
-
*
|
|
84
|
-
*
|
|
82
|
+
* BEFORE_SHA/HEAD_SHA (push). An orchestrator that already resolved the
|
|
83
|
+
* change set once can inject it as a newline-delimited CHANGED_PATHS value;
|
|
84
|
+
* an empty or missing value falls through to local resolution so a stale
|
|
85
|
+
* injection can never widen a skip. Returns null when the change set cannot
|
|
86
|
+
* be resolved; callers treat null as fail-open so a checkout edge never
|
|
87
|
+
* skips a required lane.
|
|
85
88
|
* @param {string} root
|
|
86
89
|
* @param {Record<string, string | undefined>} env
|
|
87
90
|
* @returns {string[] | null}
|
|
88
91
|
*/
|
|
89
92
|
export function resolveChangedPaths(root, env = process.env) {
|
|
93
|
+
const injected = env.CHANGED_PATHS
|
|
94
|
+
if (injected && injected.trim().length > 0) {
|
|
95
|
+
return injected
|
|
96
|
+
.split(/\r?\n/)
|
|
97
|
+
.map((line) => line.trim())
|
|
98
|
+
.filter((line) => line.length > 0)
|
|
99
|
+
}
|
|
90
100
|
const event = env.EVENT_NAME
|
|
91
101
|
let range = null
|
|
92
102
|
try {
|
package/src/runtime-core.mjs
CHANGED
|
@@ -691,13 +691,11 @@ function ci(task) {
|
|
|
691
691
|
writeOutput('applicable', relevant(selected) ? 'true' : 'false')
|
|
692
692
|
// Path-filtered lanes are opt-in via `filter_<task>` config keys. The
|
|
693
693
|
// gate fails open: no filter, an unresolvable diff, or an empty change
|
|
694
|
-
// set all keep the lane running.
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
: 'false'
|
|
700
|
-
)
|
|
694
|
+
// set all keep the lane running. Resolving the diff costs a git fetch,
|
|
695
|
+
// so only lanes with a configured filter pay it.
|
|
696
|
+
const filters = readTaskFilters(config)
|
|
697
|
+
const diff = filters.has(selected ?? '') ? resolveChangedPaths(root) : null
|
|
698
|
+
writeOutput('affected', taskAffected(selected ?? '', filters, diff) ? 'true' : 'false')
|
|
701
699
|
writeOutput(
|
|
702
700
|
'javascript',
|
|
703
701
|
hasLanguage('typescript') || hasLanguage('javascript') ? 'true' : 'false'
|