Skip to content

feat: walk-up engine.yaml discovery + wengine verify#144

Merged
xujustinj merged 2 commits into
mainfrom
wengine-verify
May 27, 2026
Merged

feat: walk-up engine.yaml discovery + wengine verify#144
xujustinj merged 2 commits into
mainfrom
wengine-verify

Conversation

@xujustinj
Copy link
Copy Markdown
Contributor

@xujustinj xujustinj commented May 20, 2026

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/run workflow subcommands, verify) now finds its project by walking up from the cwd to the nearest engine.yaml, like git/uv. Removed:

  • the platformdirs config.yaml default and the --config override flag
  • the wengine config path / config show group
  • the platformdirs dependency

Not finding an engine.yaml is now a hard error pointing at wengine init — no implicit builtin fallback, matching load-time resolution.

wengine verify

wengine verify <path> re-typechecks a workflow against the current engine.yaml node map. Prints ok / FAIL with a summary, and exits non-zero if it fails.

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. 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 skill SKILL.md, and replaced config.example.yaml with engine.example.yaml (verified against actual entry-point names).

🤖 Generated with Claude Code

Base automatically changed from wengine-install to main May 27, 2026 12:36
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>
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.

1 participant