Skip to content

ci: downstream rustfava job — embedder tests against the PR component - #1679

Merged
robcohen merged 1 commit into
mainfrom
chore/downstream-rustfava
Jul 1, 2026
Merged

robcohen merged 1 commit into
mainfrom
chore/downstream-rustfava

Conversation

@robcohen

@robcohen robcohen commented Jul 1, 2026

Copy link
Copy Markdown
Member

Implements improvement idea #1 (the highest-impact one from the validated review).

Why

Every FFI bug in the v0.17→v0.19 arc — @@ price (#1462), clamp (#1656), load-vs-validate (#1663), lot label (#1666), decryption (#1667), diagnostics (#1668) — was found by rustfava after a release shipped, driving 6 releases in ~3 days. The in-repo parity tests catch conversion drift; only the real embedder catches contract/behavior drift.

What

downstream.yml: on PRs touching the embedding surface or the engine crates behind it —

  1. build the wasip2 component from the PR,
  2. check out rustledger/rustfava@main,
  3. run rustfava's just test-py against that wasm via the RUSTLEDGER_COMPONENT_WASM override (its documented env hook, component_engine.py), mirroring rustfava's own CI setup (python 3.13 + uv + just + wasmtime, touch app.js).

Advisory by design (not in the required build gate)

  • An intentional WIT break legitimately fails here until rustfava adopts the new contract — red is the signal, not a merge blocker. ⚠️ Concretely: this job will be red right now on engine PRs, because v0.19.0's host.decrypt import (3.2.0) isn't in rustfava@main yet — which is exactly the visibility it exists to provide.
  • A green run on an engine PR is strong evidence rustfava won't need an emergency patch release.

Verified: YAML parses; job/trigger structure checked; action SHAs match the pins used in ci.yml and rustfava's test.yml.

🤖 Generated with Claude Code

…'s component

Every FFI bug in the v0.17-v0.19 arc (#1462, #1656, #1663, #1666, #1667, #1668)
was found by rustfava AFTER a release shipped. New advisory workflow: on PRs
touching the embedding surface or the engine crates behind it, build the wasip2
component from the PR, check out rustfava@main, and run its Python test suite
against that wasm via the RUSTLEDGER_COMPONENT_WASM override — moving discovery
from post-release to pre-merge.

Deliberately NOT in the required build gate: an intentional WIT break (e.g. the
3.2.0 host.decrypt import) legitimately fails here until rustfava adopts the new
contract; red is the signal, not a merge blocker.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Copilot AI review requested due to automatic review settings July 1, 2026 21:29
@robcohen
robcohen requested a review from a team as a code owner July 1, 2026 21:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an advisory downstream CI workflow that builds the wasm32-wasip2 FFI component from the current PR and runs rustledger/rustfava’s Python test suite against that artifact via RUSTLEDGER_COMPONENT_WASM, so embedder-level contract/behavior drift is detected pre-merge.

Changes:

  • Introduces a new Downstream (rustfava) GitHub Actions workflow triggered on PRs that touch the FFI surface or core engine crates.
  • Builds the PR’s rustledger-ffi-component WebAssembly component and runs rustfava’s just test-py against it using the documented env override.
  • Configures concurrency cancellation and mirrors rustfava’s Python/uv/just/wasmtime test environment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/downstream.yml Resolved
Comment thread .github/workflows/downstream.yml Resolved
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✅ Compatibility Test Results

Metric Result
Check Compatibility 100%
BQL Compatibility 100%
Full AST Match 100%
Total Files 792
What's tested
  • Check: Exit codes and error counts match bean-check
  • BQL: Query results match bean-query
  • Files: ~800 test files downloaded from 10+ beancount repositories

Full results available in workflow artifacts

@robcohen
robcohen merged commit aecb305 into main Jul 1, 2026
79 of 83 checks passed
@robcohen
robcohen deleted the chore/downstream-rustfava branch July 1, 2026 22:07
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.

2 participants