ci: run the full workspace test suite (CLI-37)#109
Merged
markovejnovic merged 4 commits intoJun 10, 2026
Merged
Conversation
Widen the dogfood rust_project step from cargo test -p harmont-cli to cargo test --workspace, and build esbuild/Node into its base so hm-dsl-engine's build.rs emits a real SDK bundle instead of an 18-byte stub. This brings the previously-uncovered bundled_sources tests (and the node-gated render tests) into CI.
The test rendered the repo's own .hm/ci.py at runtime via `hm render ci`, but hm-exec intentionally strips .hm/ from the build source archive (crates/hm-exec/src/local/source.rs) to keep __pycache__/.py out of /workspace. So inside `hm run ci`'s own sandbox the pipeline can't be re-rendered and the test fails with 'no .hm/ directory found in /workspace'. Worse, cargo test is fail-fast across binaries, so this failure aborted the run before hm-dsl-engine's bundled_sources tests (the CLI-37 ones) ever executed. The --workspace change in the parent commit is the real fix; this guardrail is redundant and environment-fragile. Removing it.
`hm run` built the execution backend (connecting to the Docker daemon) before rendering the pipeline, so argument errors — unknown slug, zero or many declared pipelines, or an invalid --format — surfaced as a Docker socket error in any daemon-less environment instead of the intended, helpful message. Reorder handle(): resolve cloud creds (still fail-fast on a missing token), then render + parse the plan, then pick the renderer (validating --format), and only then connect to Docker. Pure reorder; cloud auth still precedes render work. This is what let widening dogfood CI to `cargo test --workspace` go red: the daemon-less pipeline sandbox now runs these previously-skipped arg-validation tests (zero_pipelines_returns_a_helpful_error, many_pipelines_still_requires_arg, unknown_format_fails_fast_with_listing), which expect the validation message, not a daemon error. Genuine execution tests remain #[ignore]d.
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
CLI-37 reported
hm-dsl-enginetests failing (the 18-byte stubbundled_sourcestests + theinit_ts_templates_roundtrip_renderjs-export error). Those tests never run in our own CI:.hm/ci.pyscoped the Rust step tocargo test -p harmont-cli, so every other workspace crate — includinghm-dsl-engine— was untested.hm run cigreen did not implycargo testgreen.What
Two coupled changes to the
rust_projecttarget in.hm/ci.py:project.test()(nopackages=) now renderscargo test --workspace --lockedinstead of two-p harmont-clisteps. The whole workspace is tested.hm.js.project("crates/hm-dsl-engine/harmont-ts").install(). This is required, not cosmetic:hm-dsl-engine/build.rsshells out to esbuild at compile time to embed the TS SDK bundle. Without it the build emits an 18-byte stub and thebundled_sourceslength-assertions fail. Installing Node also means the JS-runtime-gated render tests (init_ts_templates_roundtrip_render,ts_engine_test) actually run instead of self-skipping.These land together on purpose:
--workspacewithout esbuild = red CI; esbuild without--workspace= the dsl-engine tests still never run.dogfood_ci_tests_whole_workspaceincrates/hm/tests/cmd_init.rsrenders our own.hm/ci.pyand asserts the IR containscargo test --workspaceand notcargo test -p harmont-cli, so the scope can't silently regress. Verified to fail when the scope is reverted.Verification
hm render cinow emitscargo test --workspace --lockedand annpm ciinstall step; zero-p harmont-cli.cargo clippy --tests -D warningsclean.cargo test --workspacegreen is validated by this PR's own CI run (the point of the change) — localhm run ciwas not run (Docker).Closes CLI-37 / #105.