Fix --config on maestro cloud and unify workspace-config handling#3197
Merged
Fix --config on maestro cloud and unify workspace-config handling#3197
--config on maestro cloud and unify workspace-config handling#3197Conversation
Fishbowler
approved these changes
Apr 21, 2026
Contributor
Fishbowler
left a comment
There was a problem hiding this comment.
Looks rational.
How much more testing still needs to happen against Maestro Cloud?
Contributor
Author
I have tested it with a-lot of cases locally and it is working nicely. Since its broken anyways, I don't think there is much risk anyway. What do you think? Should we spend more time testing on it or merge it and take user feedbacks? Unit test also helps verifying the logic. |
Contributor
|
Ace, merge it! |
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.
Why
maestro cloud --config=<path>was broken for any config filename other thanconfig.yaml/config.yml.Two independent problems, both on the cloud path:
FileUtils.isWebFlow()did its own workspace traversal that only skipped the hardcoded filenamesconfig.yaml/config.yml. Any other name (config2.yaml,regression_config.yaml,platform_settings.yaml, …) was parsed as a flow and threw before the planner ever ran. The content-basedisWorkspaceConfigFiledetection added in Skip additional config files in workspace execution planner #3150 was never consulted on this path.CloudInteractor.upload()never receivedconfigFile. Even once local validation passed, the zip that got uploaded contained the workspace unchanged, and the cloud-sideWorkspaceValidatorhardcodes a lookup for/config.yaml//config.ymlat the zip root. So--config=<non-default-name>was effectively ignored during actual cloud execution. Maestro validate against one config locally and run against a different one (or none) in the cloud.Rather than patch these in isolation, the design is now:
--config=<path>means "this file IS the workspace config, wherever it lives" including outside the workspace directory entirely. You can now keep a library of configs in a shared location (e.g.~/maestro-configs/smoke.yaml,~/maestro-configs/regression.yaml) and point--configat any of them; the CLI injects the right one into the upload without touching your workspace layout.What changed
Filters.kt— promotedisWorkspaceConfigFilefromprivateto top-levelfunso it's reusable as the single source of truth for "is this a workspace config YAML?"FileUtils.isWebFlow()— replaced the hardcoded"config.yaml"/"config.yml"filename skip withisWorkspaceConfigFile(toPath()). Fixes bothcloudandtest(both callisWebFlow) in one change, and removes the filename-coupling that made non-default config names explode.WorkspaceUtils.createWorkspaceZip— new optionalconfigOverride: Path?. The function now enforces a single invariant: the resulting zip has exactly one workspace configuration, always at/config.yaml.--config=<path>(including paths outside the workspace): the override's bytes are written as/config.yaml.--configbut with a root-levelconfig.yaml/config.ymlin the workspace: its bytes are written as/config.yaml.flows: [<relative path>]is written as today.isWorkspaceConfigFileare always stripped from the zip contents — in both override and no-override cases. This prevents duplicate/conflicting config entries and shrinks zips that were previously carrying alongregression_config.yaml,platform_settings.yaml, etc. that the worker was going to skip anyway.CloudInteractor.upload— newconfigFile: File?parameter, threaded intocreateWorkspaceZipasconfigOverride.CloudCommand.call— forwardsconfigFiletoupload.WorkspaceValidator.validate— comment added at the zip-root lookup documenting that the invariant is provided bycreateWorkspaceZip, so future readers don't go hunting for how the filename guarantee is enforced.Why this shape
isWorkspaceConfigFile) used everywhere that needs to answer "is this a workspace config?" — planner, zip builder, web-flow detector. Keeps future fixes in one place./config.yamlat the root. No protocol or server changes needed.--configto live anywhere on disk, not just inside the workspace. The override is a file reference, not a workspace member.--configis set.Verified end-to-end
Original repro now completes the build+validate pipeline and proceeds into the real upload.