You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
inferred_tolerance_default option not honored #308
The option IS parsed correctly by rustledger-loader, and the validation logic in rustledger-validate does use inferred_tolerance_default. However, the FFI layer drops the field when returning options to Fava.
Missing in FFI layer:
LedgerOptions struct (crates/rustledger-ffi-wasi/src/types/output.rs:280-292) - missing the inferred_tolerance_default field
cmd_load_full (load.rs:198-210) - doesn't copy inferred_tolerance_default to output
Fix needed:
Add to LedgerOptions:
pub inferred_tolerance_default:HashMap<String,String>,// Store as String for JSON serialization
And update the option parsing/copying in both helpers.rs and load.rs.
Note: The tolerance calculation in calculate_tolerances() (transaction.rs:316-344) already implements the correct behavior - it's just not visible to Fava because the FFI output omits the field.
Activity
robcohen commentedon Feb 7, 2026
Root Cause Analysis
The option IS parsed correctly by
rustledger-loader, and the validation logic inrustledger-validatedoes useinferred_tolerance_default. However, the FFI layer drops the field when returning options to Fava.Missing in FFI layer:
LedgerOptionsstruct (crates/rustledger-ffi-wasi/src/types/output.rs:280-292) - missing theinferred_tolerance_defaultfieldload_source(helpers.rs:97-110) - doesn't parseinferred_tolerance_defaultcmd_load_full(load.rs:198-210) - doesn't copyinferred_tolerance_defaultto outputFix needed:
Add to
LedgerOptions:And update the option parsing/copying in both
helpers.rsandload.rs.Note: The tolerance calculation in
calculate_tolerances()(transaction.rs:316-344) already implements the correct behavior - it's just not visible to Fava because the FFI output omits the field.feat(ffi): add missing options and entry fields to FFI output
robcohen commentedon Feb 8, 2026
Fixed in v0.8.5 (PR #311). The
inferred_tolerance_defaultoption is now properly passed through the FFI layer.Rustfava PR to upgrade to v0.8.5: rustledger/rustfava#80