Summary
When --config <path> is passed to dcd cloud, the CLI correctly loads settings from that file, but it does not exclude other config-like files that happen to sit in the same flow folder. Any sibling file that isn't literally named config.yaml/config.yml and isn't the exact --config target still gets treated as a regular flow file — and fails when the CLI tries to parse it as one.
Reproduction
- Create a flow folder containing two workspace config files with custom names, e.g.:
.maestro/runners/config_build.yml
.maestro/runners/config_update.yml
your-flow.yaml
- Run:
dcd cloud --config .maestro/runners/config_update.yml --app-file app.apk .maestro/runners/
- The run fails with an error like:
Error processing dependencies for file /path/to/.maestro/runners/config_build.yml in the Test Steps section.
Expected an array of steps but received: {...}
This happens even though config_build.yml was never referenced by this invocation — it's picked up purely because it's sitting in the same folder.
Root cause
In src/services/execution-plan.service.ts, applyFlowGlobs()'s default (no flows: glob) branch only excludes two things from the flow-file list:
return unfilteredFlowFiles.filter(
(file) =>
!file.endsWith('config.yaml') &&
!file.endsWith('config.yml') &&
(!configFile || !file.endsWith(configFile)),
);
- a file literally named
config.yaml / config.yml
- the exact file passed via
--config
Any other config-shaped file in the same folder (e.g. a second workspace config used by a different CI workflow) isn't excluded, so it's carried forward as a "flow to run." When readTestYamlFileAsJson parses it, there's no --- document separator, so the whole file (a plain map like {flows: [...], includeTags: [...]}) is treated as testSteps. processDependencies then iterates over it as if it were an array of steps, which throws, producing the "Test Steps section" error above.
The flows:-glob branch of applyFlowGlobs has the same gap: it only special-cases config.yaml/config.yml and path.basename(configFile), not other config-shaped files matched by a broad glob.
Suggested fix
Have dcd cloud treat any file that parses as a workspace config shape (no --- separator, top-level map with keys like flows/includeTags/excludeTags/executionOrder, etc.) as "not a flow," regardless of its filename — rather than only recognizing the single active --config path and the literal config.yaml/config.yml name. That way, multiple named config files can safely coexist in one folder for different workflows (e.g. smoke vs. regression), with only the one selected via --config ever being loaded, and the rest simply ignored as flow candidates.
Workaround (documenting for now)
Until this is fixed, pass --exclude-flows <path-to-the-other-config> alongside --config so the inactive config file is filtered out before flow discovery runs.
Summary
When
--config <path>is passed todcd cloud, the CLI correctly loads settings from that file, but it does not exclude other config-like files that happen to sit in the same flow folder. Any sibling file that isn't literally namedconfig.yaml/config.ymland isn't the exact--configtarget still gets treated as a regular flow file — and fails when the CLI tries to parse it as one.Reproduction
This happens even though
config_build.ymlwas never referenced by this invocation — it's picked up purely because it's sitting in the same folder.Root cause
In
src/services/execution-plan.service.ts,applyFlowGlobs()'s default (noflows:glob) branch only excludes two things from the flow-file list:config.yaml/config.yml--configAny other config-shaped file in the same folder (e.g. a second workspace config used by a different CI workflow) isn't excluded, so it's carried forward as a "flow to run." When
readTestYamlFileAsJsonparses it, there's no---document separator, so the whole file (a plain map like{flows: [...], includeTags: [...]}) is treated astestSteps.processDependenciesthen iterates over it as if it were an array of steps, which throws, producing the "Test Steps section" error above.The
flows:-glob branch ofapplyFlowGlobshas the same gap: it only special-casesconfig.yaml/config.ymlandpath.basename(configFile), not other config-shaped files matched by a broad glob.Suggested fix
Have
dcd cloudtreat any file that parses as a workspace config shape (no---separator, top-level map with keys likeflows/includeTags/excludeTags/executionOrder, etc.) as "not a flow," regardless of its filename — rather than only recognizing the single active--configpath and the literalconfig.yaml/config.ymlname. That way, multiple named config files can safely coexist in one folder for different workflows (e.g. smoke vs. regression), with only the one selected via--configever being loaded, and the rest simply ignored as flow candidates.Workaround (documenting for now)
Until this is fixed, pass
--exclude-flows <path-to-the-other-config>alongside--configso the inactive config file is filtered out before flow discovery runs.