Skip to content

test: accept rustledger v0.14 query error categorization#132

Merged
robcohen merged 1 commit intomainfrom
fix/v0.14-test-compat
Apr 27, 2026
Merged

test: accept rustledger v0.14 query error categorization#132
robcohen merged 1 commit intomainfrom
fix/v0.14-test-compat

Conversation

@robcohen
Copy link
Copy Markdown
Member

Summary

  • Broaden test_query_errors and test_query_to_file to accept either QueryParseError or QueryCompilationError for bare-word queries (rustledger v0.14 routes these through the compilation path).
  • Broaden test_api_query_result_error to accept either "Query parse error" or "Query compilation error" in the response.

These changes are forward-compatible — they pass on both rustledger ≤0.13 and v0.14.

Why

The bot-generated v0.14.0 upgrade PR (#131) is failing 4 tests against current rustledger v0.14.x because the upstream changed how it categorizes some query errors. Two of the four (test_query_errors, test_query_to_file) and one of the API tests (test_api_query_result_error) are pure assertion mismatches and can be loosened on main ahead of the upgrade.

The 4th failing test (test_api_errors snapshot) is not addressed here — the interpolation error wording changed from "cannot infer currency for posting to""multiple postings missing amounts for". That requires pytest --snapshot-update against a v0.14.x WASM artifact and should be folded into the upgrade PR itself.

Test plan

  • Diff is forward-compatible — assertions still match v0.13.x behavior on main
  • After v0.14.x upgrade lands, verify test_query_errors, test_query_to_file, test_api_query_result_error all green
  • Snapshot regeneration for test_api_errors happens in the upgrade PR (not here)

🤖 Generated with Claude Code

Prepares the test suite for rustledger v0.14, where bare-word/empty
queries are routed through the compilation path instead of the parse
path. Assertions are broadened to accept either categorization so they
pass on both v0.13.x and v0.14.x.

The interpolation snapshot mismatch in `test_api_errors` is not
addressed here — the v0.14 wording change (`cannot infer currency` →
`multiple postings missing amounts`) needs `pytest --snapshot-update`
run against the v0.14.x WASM artifact.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@robcohen robcohen enabled auto-merge (squash) April 27, 2026 16:48
@robcohen robcohen disabled auto-merge April 27, 2026 16:48
@robcohen robcohen merged commit 8a955dd into main Apr 27, 2026
24 of 29 checks passed
@robcohen robcohen deleted the fix/v0.14-test-compat branch April 27, 2026 22:38
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