feat: walk-up engine.yaml discovery + wengine verify#144
Merged
Conversation
Merged
Replace the prototype CLI's machine-global config with the plan's project discovery model, and add `wengine verify`. Discovery: every engine-building command (schema, node, the read/run workflow subcommands, verify) now finds its project by walking up from the cwd to the nearest engine.yaml — like git/uv. The platformdirs config.yaml default and the `--config` override are gone, along with the `wengine config path/show` group and the platformdirs dependency. Not finding an engine.yaml is a hard error pointing at `wengine init` (no implicit builtin fallback, matching load-time resolution). verify: `wengine verify <path>...` re-typechecks workflows against the current engine.yaml node map. Each path is a workflow file or a directory (searched recursively for *.json/*.yaml/*.yml). Reports ok/FAIL per workflow and exits non-zero if any fail — the operator's check after remapping a node name to a new distribution or version. Tests: test_cli.py pivots from a `--config` fixture to an autouse `engine_project` fixture that chdirs into a temp dir seeded with the test engine.yaml; adds TestVerify and a missing-engine.yaml error test; drops the obsolete TestConfig. Docs: rewrite the discovery sections of docs/cli.md and the build order + settled decisions in docs/plans/node-distribution.md; refresh the wengine skill SKILL.md and replace config.example.yaml with engine.example.yaml. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
`verify` took multiple PATHs and recursively globbed directories for *.json/*.yaml/*.yml, which swept in non-workflow files (engine.yaml itself, anything under .venv) and reported spurious failures. Reduce it to a single workflow file argument (dir_okay=False); drop `_collect_workflow_files`, `WORKFLOW_SUFFIXES`, and the per-file pass/fail summary. Update the test and docs/cli.md accordingly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Implements build-order step 7 of docs/plans/node-distribution.md: replaces the prototype CLI's machine-global config with the plan's walk-up project discovery, and adds
wengine verify.Stacked on #143 (
wengine install) — review/merge that first.Discovery
Every engine-building command (
schema,node, the read/runworkflowsubcommands,verify) now finds its project by walking up from the cwd to the nearestengine.yaml, likegit/uv. Removed:platformdirsconfig.yamldefault and the--configoverride flagwengine config path/config showgroupplatformdirsdependencyNot finding an
engine.yamlis now a hard error pointing atwengine init— no implicit builtin fallback, matching load-time resolution.wengine verifywengine verify <path>re-typechecks a workflow against the currentengine.yamlnode map. Printsok/FAILwith a summary, and exits non-zero if it fails.Tests
test_cli.pypivots from a--configfixture to an autouseengine_projectfixture that chdirs into a temp dir seeded with the testengine.yaml. AddsTestVerifyand a missing-engine.yamlerror test; drops the obsoleteTestConfig. Full suite green (613 passed), ruff + pyright clean.Docs
Rewrote the discovery sections of
docs/cli.md, updated the build order + settled decisions in the plan, refreshed the wengine skillSKILL.md, and replacedconfig.example.yamlwithengine.example.yaml(verified against actual entry-point names).🤖 Generated with Claude Code