Skip to content

fix(config): reject a non-list setup with a config error - #1740

Merged
max-sixty merged 1 commit into
mainfrom
fix/setup-non-list
Nov 25, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/setup-non-list

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

.config/tend.yaml now fails with setup must be a list of steps when setup: holds anything other than a list. Before, setup: false, setup: {} or setup: '' silently loaded as no setup steps, and a non-empty mapping or string (setup: {run: make}, setup: make) was iterated by key or character and failed with the misleading setup[0] must be a mapping with uses or run. An absent, empty (setup:) or [] setup still means no steps.

This is the list-shaped counterpart of #1738, which closed the same or {} hole for secrets, workflows and checks; that PR's review noted setup: and left it out. New cases in test_config_edge_cases.py cover all five rejected shapes plus the two accepted empty ones. The rejected cases fail on main, and the generator suite passes locally, apart from the two network-bound test_refresh_consumers.py tests that can't resolve DNS in the sandbox.

`setup:` was read as `raw.get("setup", []) or []`, so `setup: false`,
`setup: {}` or `setup: ''` silently became no steps, and a non-empty
mapping or string iterated its keys or characters and failed with the
misleading `setup[0] must be a mapping`. An absent, empty or `[]` setup
still means no steps; anything else that is not a list now raises
`setup must be a list of steps`.

Follow-up to #1738, whose review noted this gap.
@max-sixty
max-sixty merged commit f3101bb into main Nov 25, 2026
12 checks passed
@max-sixty
max-sixty deleted the fix/setup-non-list branch November 25, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants