Relationships
#3839 workflow validate/run say "Workflow not found" for a file that doctor workflows explains is misnamed
Opened by reset · 10/23/2026
On 20261020.024627.0-sha.26dc044f (macOS 27), a workflow saved as workflows/plain.yaml is invisible to validate and run, and the error gives no reason. In a workspace from swamp repo init --tool none: swamp workflow create plain writes workflows/workflow-plain.yaml and swamp workflow validate plain passes (Result: PASSED). After mv workflows/workflow-plain.yaml workflows/plain.yaml, the same validate prints Error: Workflow not found: plain and exits 1; swamp workflow validate workflows/plain.yaml prints Error: Workflow not found: workflows/plain.yaml; swamp workflow search --json returns "results": [].
swamp doctor workflows on the same workspace already knows the cause: ⚠ plain → Not loaded: swamp only reads files named workflow-<name>.yaml in <workspace>/workflows. Rename <workspace>/workflows/plain.yaml to workflow-<name>.yaml, or remove it if it is a stale copy of a workflow that already loads. (exit 0). The file carries name: plain, so the loader could have matched it or the error could have said why it did not.
Expected: Workflow not found for a name that matches the name: field of a YAML file under workflows/ says the file is not loaded because of its name, as doctor does, or points at swamp doctor workflows.
Actual: validate and run report only Workflow not found: plain; the explanation exists only in doctor.
Steps to reproduce:
mkdir ws && cd ws && SWAMP_REPO_DIR=$PWD swamp repo init --tool noneswamp workflow create plain && mv workflows/workflow-plain.yaml workflows/plain.yamlswamp workflow validate plain->Error: Workflow not found: plainswamp doctor workflows-> theNot loaded: swamp only reads files named workflow-<name>.yamlwarning.
Prior art: #1468 (shipped) added the broken-file warning before Workflow not found for a file that fails to parse; #2942 (shipped) aligned doctor's file set with the loader's. Neither covers a well-formed file whose name does not match the pattern.
Suggestion: when a workflow lookup fails, run the same misnamed-file check doctor runs on the workflows/ directory and append its sentence to the error, or at least Run 'swamp doctor workflows' to see files that are not loaded.
Open
No activity in this phase yet.
Sign in to post a ripple.