Repository navigation
test: cover the bundled wasm-path fallback under any ambient env - #248
Merged
Merged
Conversation
rustledger's downstream CI exports RUSTLEDGER_COMPONENT_WASM for the whole pytest run, so _default_wasm_path()'s bundled-path fallback never executed there and the 100% coverage gate failed on an env quirk (99.97%, component_engine.py:122) — every downstream run has been red on it. The override branch already had a monkeypatch.setenv test; this adds the symmetric monkeypatch.delenv test so BOTH branches are covered regardless of the ambient variable. Verified: full test-py at 100.00% WITH the env var exported (the downstream shape, against a locally built component) and file-level ruff/mypy clean. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
What
Adds the symmetric
monkeypatch.delenvtest for_default_wasm_path()'s bundled-path fallback, so both branches are covered regardless of the ambientRUSTLEDGER_COMPONENT_WASM.Why
rustledger's downstream CI (
downstream.yml, rustfava tests against PR component) exportsRUSTLEDGER_COMPONENT_WASMfor the whole pytest run. With the variable set, the fallback line (component_engine.py:122) never executes, coverage lands at 99.97%, and the--cov-fail-under=100gate fails — on an environment quirk, not a real gap. That job has been red on this for its entire recent history (0 successes in the last 60 runs), which meant a systemically-red check on every rustledger PR.The override branch already had a
monkeypatch.setenvtest; the fallback branch was only covered incidentally, by runs where the ambient variable happened to be unset (rustfava's own CI — which is why it stayed green here while downstream burned).Testing
just test-pyat 100.00% with the env var exported (the exact downstream shape), against a locally built rustledger component — 660 passed.🤖 Generated with Claude Code