fix(cloud): exclude config-shaped files from flow discovery - #114
Merged
Conversation
Flow discovery excluded config files by filename: literally config.yaml / config.yml, plus the exact --config target. A second workspace config sharing the folder (config_build.yml alongside config_update.yml, as when one folder serves several CI workflows) survived discovery, got parsed as a flow, and failed with "Expected an array of steps". Add isWorkspaceConfigFile(), which classifies by shape rather than filename: no `---` separator, a top-level map, and at least one workspace-config-only key. Requiring a recognised key keeps a flow that is merely missing its `---` separator loud rather than silently dropped. Applied in plan() after applyFlowGlobs so it covers both the glob and default branches, and in planSingleFile so a custom-named config passed as the input gets the existing "pass the workspace folder path" error. Also fixes the sibling path-matching bugs in applyFlowGlobs, which are the same defect family. --config is now resolved once in plan() and both branches compare normalised absolute paths: - the default branch used `file.endsWith(configFile)`, so `--config ./x.yml` failed to match and `--config g.yml` would have dropped `flow-config.yml` - the glob branch compared a workspace-relative match against `path.basename(configFile)`, which only matched when the config sat at the workspace root - the config.yaml / config.yml name checks are anchored to the basename, so a genuine flow named my-config.yaml is no longer dropped; a real config with that name is still excluded, by shape The `--exclude-flows` workaround is no longer needed. The hand-rolled extension and .app-bundle checks in the glob branch are replaced with the existing isFlowFile helper, which does exactly that. Closes #99
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
14 tasks
finalerock44
added a commit
that referenced
this pull request
Aug 10, 2026
Retargets the pending dev beta release from 5.2.0-beta.5 to 5.3.1-beta.1. The beta line is still numbered off 5.2.0 because the stable 5.3.0 release never completed: the promote PR (#108) merged with `Release-As: 5.3.0`, but the release-please PR it generated (#109) is still open, so no v5.3.0 tag exists and `.release-please-manifest-beta.json` sat at 5.2.0-beta.4. Release-please therefore proposed 5.2.0-beta.5 (#115) for the flow-discovery fix in #114, which is behind the stable line rather than ahead of it. The stable line is 5.3.0, so the next beta belongs on the 5.3.1 patch series. This commit is intentionally empty — the payload is the footer below, which release-please reads to pin the exact version of the next dev release. It applies once and needs no follow-up cleanup, unlike a `release-as` key in release-please-config-beta.json, which would pin every subsequent dev release until removed. Release-As: 5.3.1-beta.1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flow discovery excluded config files by filename: literally config.yaml / config.yml, plus the exact --config target. A second workspace config sharing the folder (config_build.yml alongside config_update.yml, as when one folder serves several CI workflows) survived discovery, got parsed as a flow, and failed with "Expected an array of steps".
Add isWorkspaceConfigFile(), which classifies by shape rather than filename: no
---separator, a top-level map, and at least one workspace-config-only key. Requiring a recognised key keeps a flow that is merely missing its---separator loud rather than silently dropped. Applied in plan() after applyFlowGlobs so it covers both the glob and default branches, and in planSingleFile so a custom-named config passed as the input gets the existing "pass the workspace folder path" error.Also fixes the sibling path-matching bugs in applyFlowGlobs, which are the same defect family. --config is now resolved once in plan() and both branches compare normalised absolute paths:
file.endsWith(configFile), so--config ./x.ymlfailed to match and--config g.ymlwould have droppedflow-config.ymlpath.basename(configFile), which only matched when the config sat at the workspace rootThe
--exclude-flowsworkaround is no longer needed. The hand-rolled extension and .app-bundle checks in the glob branch are replaced with the existing isFlowFile helper, which does exactly that.Closes #99
What & why
Type of change
fix— bug fixfeat— new featureperf— performance improvementrefactor— code change that's neither a fix nor a featuredocs— documentation onlychore/ci/build/test— tooling, no user-facing change!or PR notes aBREAKING CHANGE:)Checklist
pnpm lintpassespnpm typecheckpassespnpm buildpassesCHANGELOG.md(release-please handles this)README.md/STYLE_GUIDE.mdupdated if behaviour or output changedHow to test
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.