From 6da417fcddbcb25a8a77752d3251d5e55c48a590 Mon Sep 17 00:00:00 2001 From: robcohen Date: Sat, 7 Feb 2026 21:09:51 -0600 Subject: [PATCH 1/3] chore: upgrade rustledger to v0.8.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This release includes fixes for FFI field passthrough: - inferred_tolerance_default is now properly passed (fixes #71) - 12 other missing options fields added - Posting.flag and Balance.tolerance now available 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/rustfava/rustledger/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rustfava/rustledger/engine.py b/src/rustfava/rustledger/engine.py index 934439049..b999077cb 100644 --- a/src/rustfava/rustledger/engine.py +++ b/src/rustfava/rustledger/engine.py @@ -21,7 +21,7 @@ SUPPORTED_API_VERSION = "1." # Rustledger release to download -RUSTLEDGER_VERSION = "v0.7.0" +RUSTLEDGER_VERSION = "v0.8.5" RUSTLEDGER_WASM_URL = ( f"https://github.com/rustledger/rustledger/releases/download/" f"{RUSTLEDGER_VERSION}/rustledger-ffi-wasi-{RUSTLEDGER_VERSION}.wasm" From d88ab8c8578ba2dab885eec850707123917a5bc3 Mon Sep 17 00:00:00 2001 From: robcohen Date: Sat, 7 Feb 2026 21:18:51 -0600 Subject: [PATCH 2/3] feat(ci): add workflow to receive rustledger release updates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Listen for `rustledger-release` events dispatched by rustledger's release workflow and automatically create a PR to update the WASM version. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/update-rustledger.yml | 69 +++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/update-rustledger.yml diff --git a/.github/workflows/update-rustledger.yml b/.github/workflows/update-rustledger.yml new file mode 100644 index 000000000..b4ce334b8 --- /dev/null +++ b/.github/workflows/update-rustledger.yml @@ -0,0 +1,69 @@ +name: Update Rustledger WASM + +on: + repository_dispatch: + types: [rustledger-release] + workflow_dispatch: + inputs: + version: + description: 'Rustledger version (e.g., v0.8.5)' + required: true + type: string + +permissions: + contents: write + pull-requests: write + +jobs: + update-wasm-version: + name: Update WASM version + runs-on: ubuntu-latest + steps: + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.BOT_APP_ID }} + private-key: ${{ secrets.BOT_PRIVATE_KEY }} + + - uses: actions/checkout@v4 + with: + token: ${{ steps.app-token.outputs.token }} + + - name: Get version + id: version + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + VERSION="${{ inputs.version }}" + else + VERSION="${{ github.event.client_payload.version }}" + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + echo "Using rustledger version: $VERSION" + + - name: Update RUSTLEDGER_VERSION in engine.py + run: | + VERSION="${{ steps.version.outputs.version }}" + FILE="src/rustfava/rustledger/engine.py" + + # Update the version + sed -i "s/RUSTLEDGER_VERSION = \"v[0-9]*\.[0-9]*\.[0-9]*\"/RUSTLEDGER_VERSION = \"$VERSION\"/" "$FILE" + + # Verify the change + grep "RUSTLEDGER_VERSION" "$FILE" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ steps.app-token.outputs.token }} + base: main + commit-message: "chore: upgrade rustledger to ${{ steps.version.outputs.version }}" + title: "chore: upgrade rustledger to ${{ steps.version.outputs.version }}" + body: | + Automated update of rustledger WASM version to ${{ steps.version.outputs.version }}. + + This PR was triggered by a new rustledger release. + + See [rustledger releases](https://github.com/rustledger/rustledger/releases) for changelog. + branch: chore/upgrade-rustledger-${{ steps.version.outputs.version }} + delete-branch: true From 3f215a745af385b770307046adefdc0accd8255b Mon Sep 17 00:00:00 2001 From: robcohen Date: Sat, 7 Feb 2026 21:32:51 -0600 Subject: [PATCH 3/3] test: update snapshot for Balance.tolerance field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rustledger v0.8.5 now passes through the tolerance field for Balance entries, so the snapshot needs to reflect this. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../test_serialisation-test_serialise_entry_types.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json b/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json index a5f5999ae..56b050afe 100644 --- a/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json +++ b/tests/__snapshots__/test_serialisation-test_serialise_entry_types.json @@ -1 +1 @@ -[{"account":"Assets:Cash","booking":"STRICT","currencies":["USD"],"date":"2017-12-11","entry_hash":"ENTRY_HASH","meta":{},"t":"Open"},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-13","diff_amount":null,"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":null},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-14","diff_amount":null,"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":null},{"account":"Assets:Cash","date":"2017-12-16","entry_hash":"ENTRY_HASH","filename":"./tests/data/filename","links":[],"meta":{},"t":"Document","tags":[]},{"date":"2017-12-12","description":"event description","entry_hash":"ENTRY_HASH","meta":{"account-value":"Assets:Cash","amount-value":{"currency":"USD","number":"10"},"bool-value":true,"currency-value":"USD","date-value":"2022-12-12","number-value":"20","string-value":"value"},"t":"Event","type":"event name"},{"account":"Assets:Cash","comment":"This is some comment or note","date":"2017-12-20","entry_hash":"ENTRY_HASH","links":[],"meta":{},"t":"Note","tags":[]},{"account":"Assets:Cash","date":"2017-12-21","entry_hash":"ENTRY_HASH","meta":{},"source_account":"Assets:OtherCash","t":"Pad"},{"account":"Assets:Cash","date":"2017-12-22","entry_hash":"ENTRY_HASH","meta":{},"t":"Close"},{"currency":"USD","date":"2018-12-15","entry_hash":"ENTRY_HASH","meta":{},"t":"Commodity"},{"amount":{"currency":"EUR","number":"1"},"currency":"USD","date":"2018-12-16","entry_hash":"ENTRY_HASH","meta":{},"t":"Price"},{"date":"2012-12-12","entry_hash":"ENTRY_HASH","meta":{},"t":"Custom","type":"string","values":[{"currency":"EUR","number":1.0},false]},{"date":"2019-12-12","entry_hash":"ENTRY_HASH","meta":{},"name":"query name","query_string":"journal","t":"Query"}] \ No newline at end of file +[{"account":"Assets:Cash","booking":"STRICT","currencies":["USD"],"date":"2017-12-11","entry_hash":"ENTRY_HASH","meta":{},"t":"Open"},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-13","diff_amount":null,"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":null},{"account":"Assets:Cash","amount":{"currency":"USD","number":"1"},"date":"2017-12-14","diff_amount":null,"entry_hash":"ENTRY_HASH","meta":{},"t":"Balance","tolerance":1.0},{"account":"Assets:Cash","date":"2017-12-16","entry_hash":"ENTRY_HASH","filename":"./tests/data/filename","links":[],"meta":{},"t":"Document","tags":[]},{"date":"2017-12-12","description":"event description","entry_hash":"ENTRY_HASH","meta":{"account-value":"Assets:Cash","amount-value":{"currency":"USD","number":"10"},"bool-value":true,"currency-value":"USD","date-value":"2022-12-12","number-value":"20","string-value":"value"},"t":"Event","type":"event name"},{"account":"Assets:Cash","comment":"This is some comment or note","date":"2017-12-20","entry_hash":"ENTRY_HASH","links":[],"meta":{},"t":"Note","tags":[]},{"account":"Assets:Cash","date":"2017-12-21","entry_hash":"ENTRY_HASH","meta":{},"source_account":"Assets:OtherCash","t":"Pad"},{"account":"Assets:Cash","date":"2017-12-22","entry_hash":"ENTRY_HASH","meta":{},"t":"Close"},{"currency":"USD","date":"2018-12-15","entry_hash":"ENTRY_HASH","meta":{},"t":"Commodity"},{"amount":{"currency":"EUR","number":"1"},"currency":"USD","date":"2018-12-16","entry_hash":"ENTRY_HASH","meta":{},"t":"Price"},{"date":"2012-12-12","entry_hash":"ENTRY_HASH","meta":{},"t":"Custom","type":"string","values":[{"currency":"EUR","number":1.0},false]},{"date":"2019-12-12","entry_hash":"ENTRY_HASH","meta":{},"name":"query name","query_string":"journal","t":"Query"}] \ No newline at end of file