Repository navigation
Route-smoke suite + coverage burn-down (query.py, component_engine.py into the 100% gate) - #231
Merged
Merged
Conversation
Kitchen-sink route smoke motivated by #190/#191 — failures any user hit in minutes that nothing exercised. Three layers, all run against the full corpus fixture set: every page shell + server-rendered route returns 200; every no-argument API endpoint returns 200; and every BQL query embedded in the frontend report sources executes via /api/query. The queries are extracted from frontend/src/reports at test time, so a frontend query change cannot silently drift out of test coverage — the exact #190 failure shape. First run caught three engine bugs in released v1.31.0, filed upstream: - rustledger#1699: typed scalar functions (only, abs) type-error on NULL instead of propagating it — the Holdings by_currency page 500s on most real ledgers today. Excused via an error-body gap list that a guard test forces to shrink once the engine fix ships. - rustledger#1700: {a # b} per-unit-from-total cost weight is wrong in all three forms (valid ledgers rejected, invalid accepted). - rustledger#1701: a query column declared Amount can carry an Inventory-shaped payload; rustfava's row marshalling crashed on it (KeyError -> HTTP 500 for the whole query). FIXED here: _convert_row_value now shape-sniffs and flattens, with the inventory flattening extracted into a shared helper.
…gate Burn-down of the rustledger/* coverage exemption — the omit glob becomes explicit per-file entries, and the two highest-risk files join the enforced gate: - query.py 53% -> 100%: cursor protocol, every row-conversion branch (incl. the new Amount/Inventory shape-sniff), execute() through both engine styles (component query_entries + legacy source-text), parse/compilation error mapping, and source-serialization edges. - component_engine.py 88% -> 100%: wasm-path env override, download fallback (success + no-partial-file-on-failure), query-value unwrapping, meta-value tagging, cost-number shapes both directions, result<ok,err> lifting via the component's real ResultType, _default_for across type classes harvested from real component signatures, pair-list/variant unmarshal tolerance branches, and guest-path rewriting edge shapes. No fabricated mocks for the WIT layer — every wasmtime type instance comes from the actual component. - constants.py: covered rather than omitted (Missing sentinel). Full suite: 629 passed, 100.00% under the tightened gate.
The component is gitignored, so CI checkouts lack it and the availability gate (evaluated at import time, before any lazy download) silently skipped the entire component suite on every runner — hidden until the coverage burn-down made component_engine.py measured. Download the pinned release asset in the test jobs so the suite actually runs on CI. Also compute the guest-path-rewrite expectations via the same Path arithmetic the code uses, so the assertion holds with Windows separators.
robcohen
enabled auto-merge (squash)
July 3, 2026 17:54
robcohen
force-pushed
the
test/route-smoke
branch
from
July 3, 2026 17:54
b3ebdef to
4fffc39
Compare
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.
Items 1+2 of the project-review action list: catch user-visible breakage before users do, and put the highest-risk files under the coverage gate.
1. Kitchen-sink route smoke (
tests/test_smoke_routes.py, 29 tests)Every page shell + server route, every no-arg API endpoint, and every BQL query embedded in the frontend report sources (extracted from the TS at test time, so a frontend query change can't silently drift out of coverage — the exact #190 failure shape), all × 9 corpus ledgers.
First run caught three engine bugs live in released v1.31.0, filed upstream:
only()/abs()type-error on NULL instead of propagating it: the Holdings by currency page 500s on most real ledgers today. Excused via an error-body gap list; a guard test forces the list to shrink when the engine fix ships.{a # b}cost weight wrong in all three forms (valid ledgers rejected, invalid accepted).Amountcarrying an Inventory-shaped payload; rustfava's row marshalling crashed on it (KeyError→ HTTP 500 for the whole query). Fixed here:_convert_row_valuenow shape-sniffs and degrades gracefully.2. Coverage burn-down
The
rustledger/*omit glob becomes explicit per-file entries; the two files where every recent bug lived join the enforced gate:query.py53% → 100% — cursor protocol, every conversion branch, both engine styles throughexecute(), error mappingcomponent_engine.py88% → 100% — download fallback,result<ok,err>lifting,_default_for, pair-list/variant tolerance branches, guest-path rewriting; every wasmtime type instance harvested from the real component, no fabricated WIT mocksconstants.pycovered rather than omittedRemaining exempt (documented in
pyproject.toml):backend.py,engine.py,loader.py,options.py,types.py,__init__.py— next burn-down targets.Validation
Full suite 629 passed, 100.00% under the tightened gate; ruff (pinned) + mypy clean.
🤖 Generated with Claude Code