Repository navigation
fix(plugin): run Python plugins via __plugins__ under the host time budget - #2525
Conversation
…udget No Python plugin could run (#2500): - The Python runtime's fixed 600M fuel was half of what CPython needs to start (measured 1.22G), so even a passthrough plugin trapped with "all fuel consumed". Python plugins now get the host's seconds budget (`[plugins] max_time_secs`, `--plugin-max-time-secs`, `LoadOptions::plugin_max_time_secs`), converted by the shared `sandbox::fuel_for_secs` with no Python multiplier: measured, CPython runs 3-6G fuel per CPU-second, the range other wasm runs at. The default 30 s covers startup 25x and a plugin over ~65k transactions. - Entry points were looked up by the literal name `plugin`. A plugin file now runs as beancount's loader runs a module: each item of `__plugins__` in order (a name via getattr, or a callable), with the config string when present. No `__plugins__` runs nothing, with a warning; a listed name the module lacks is an error naming it. - Entries were spliced into Python source as a string literal, so a narration with a quote or backslash broke their JSON. Inputs now go through files. Adds end-to-end tests through the CPython WASI runtime, run in the Python-gated cargo tests job, which fails if they skip. Closes #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
📊 Benchmark Results
vs base, measured in this run
A difference counts only when it clears the combined spread of the two measurements, per shape (2σ: What do these numbers mean?
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
✅ Compatibility Test Results
What's tested
Full results available in workflow artifacts |
Review round on #2525 (Python plugins, #2500): - Metadata: the compat layer read a `meta` key the wire never has, so plugins saw no metadata and every round trip dropped it. It now arrives typed, with filename/lineno as in beancount, and returns with the plugin's changes. - Errors: beancount-style error namedtuples are reported as message at source location, as bean-check does, and entries a plugin returns keep their source location (Modify, not Delete+Insert). - Sandbox: /work was writable (1 GiB of host temp for 0.07 s of budget) and stderr was the host's. The guest now sees only /lib and /work, read-only; the result goes over a capped stdout, stderr is capped. Inputs/outputs stream one entry per line: 100k transactions fit the 256 MiB cap, where ~50k exhausted it. - Limits: WASM plugins, WASM importers and Python plugins all say which limit ran out (time budget with how to raise it, or memory). - python:leafonly / python:check_commodity reach the built-in Python plugins, which now match beancount's checks and messages. - Concurrent first runs no longer race on the runtime download. - Compat: data.filter_txns, amount.CURRENCY_RE, named stand-in modules; an uncaught exception's message is surfaced. Adds tests/plugin_conformance.rs: every plugin kind through every entry point (check/query/report, --native-plugin, --plugin, python: forms, extract --wasm-importer) plus each sandboxed kind's limits, run in the Python-gated job with RLEDGER_REQUIRE_WASM32 and RLEDGER_REQUIRE_PYTHON_WASI so it cannot skip. Refs #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Adversarial review of this PRRound 1 was fixed in 0b25a35, round 2 in 92b44b9, round 3 in 5ec918d, round 4 in aad87fe, round 5 in d81c8b2 and round 6 in 4155386 (a test only). The PR body has the measurements. SecurityRound 1
Round 2: attacking the round-1 fix
Checked and not exploitable
Correctness (round 1)
Memory cap (round 2)
Native
|
| Workload | 0b25a35 CPU | Now CPU |
|---|---|---|
| passthrough, 20k transactions (3 runs each) | 2.93–3.02 s | 2.85–3.05 s |
| passthrough, 100k transactions | 15.0–15.2 s | 15.1–15.2 s |
| startup | 0.19 s | 0.19 s |
No regression.
Control characters, fixed in this PR. This covers plugin- and importer-supplied text: messages, claimed file names, Python prints and exceptions, WASM failure text, importer warnings, and importer name and description. Their control characters are now escaped (\u{1b}); messages keep newline and tab. One rustledger_plugin::untrusted module does the escaping, and a conformance case covers each channel. Ledger strings remain a separate follow-up.
- Coverage caveat: the
check --pluginrendering incheck.rsis escaped too, but no test reaches it, because the guest can't receive a config string via--plugin.
The 4096 MiB memory ceiling
- Why 4096: it is the wasm32 address-space limit (65536 pages). CPython-WASI declares no memory maximum, and with
--plugin-max-memory-mb 4096a plugin held 3.5 GiB. - What that covers: at about 1.2 KB per transaction, 4 GiB covers about 3M transactions, so a 1M-transaction ledger fits. Going higher would need memory64, which neither the CPython build nor the WASM plugin ABI supports.
- 32-bit hosts: MiB → bytes uses
u64saturating_mul, thenusize::try_from(..).unwrap_or(usize::MAX), so there is no overflow on a 32-bit host.
Mutation testing: I applied 6 more mutations, and each was caught: the work dir following the umask, plus each escaping site removed in turn (plugin message, claimed file name, guest stderr, Python run error, importer warning). That makes 36 across all rounds.
Round 4: reviewing what round 3 added
Escaping
- Gap found: a WASM module's own text (here, its import names) still reached the terminal raw. It got through in load errors from
extract --wasm-importerand from importer directory scans.check --pluginprinted onlyinvalid plugin, so it never showed the cause at all. Fix: importer error messages that carry module text are now escaped: forbidden import, runtime trap (whose backtrace includes function names from the module), compile error and decode error.check --pluginnow shows the cause, escaped. A test covers all four paths; it doesn't cover the runtime-trap and decode messages specifically. - Character coverage: C0, DEL and C1 (U+0080–9F) were already escaped, and so is a lone
\r. Bidirectional override, embedding and isolate characters (U+202A–E, U+2066–9) and U+2028/2029 are now escaped too. Right-to-left text and zero-width characters are kept on purpose: they can mislead only as any text can. - No double-escaping: escaping is idempotent, because its output contains no character it escapes. A unit test checks this. Non-ASCII text such as Hebrew or accented letters passes through unchanged.
- JSON output keeps the escaped form. These messages are display text, and the usual JSON consumers (CI annotations, editors, web UIs) show them verbatim. Sending raw controls would push the sanitizing onto every one of them. serde would still emit DEL and C1 raw.
- Not escaped here: strings in entries a plugin returns (narrations, metadata) shown by
queryandreport. The parser and beancount both accept raw control characters in ledger strings, and the plugin is named by the ledger itself. So such a string is no different from one the ledger author wrote directly, and it falls under the ledger-strings follow-up. Line numbers are integers.
0700 work directory: created atomically with that mode. tempfile uses DirBuilder::mode, i.e. mkdir with the mode, so there is no window before a chmod. The guest writes nothing; its preopens are read-only. The only other files written are the CPython download/extract staging and the .cwasm cache, both in the user's own cache directory. The cache is written via temp file and atomic rename, and is header-checked before it is loaded.
2-thread cap: no deadlock or starvation.
- Why: the guest is single-threaded wasm, so its WASI calls run one at a time. The deadline timer runs on the runtime driver, not on the blocking pool.
- Tried: a
select()loop over 10 open files for 100k iterations finished normally, with no leaked pollables. Re-reading a file in a loop and a 1000 sselect()were each stopped at the 3 s deadline (3.01 s wall). - Minor wording issue, not changed:
select()over about 100 files also fills the 256-entry WASI resource table, because pollables count too. That is correct behavior, but the message says "files open" when the count is really "files and pollables".
#2536 is another lane's PR (fix/effective-date-open-order), not mine.
Mutation testing: I applied 2 more mutations (removing the forbidden-import escape, removing the check --plugin escape), and each was caught. That makes 38 across all rounds.
Round 5: every remaining place guest text reaches output
The sweep: I went through every format!, anyhow!, bail!, #[error], context and eprintln! site in the plugin runtime, dispatch, sandbox, Python runtime, importer, loader, and the CLI's plugin and importer reporting.
Already safe
- Escaped where they are shown: the plugin runtime's forbidden-import and failure messages (by the loader, or by
check --plugin), and allPythonErrortext (by the loader). - Host text or integers only: paths, sizes, caps, ABI versions, and the export signatures, whose names are
&'static. invalid directive: {e:?}:Debugalready escapes control characters.
Leaks found and fixed
- Error chains re-printed raw. rledger printed an error's whole anyhow chain (
{e:#}). The importer's runtime and decode errors keep their wasmtime/rmp error as#[source], so the raw text came back in the chain even though their ownDisplaywas escaped. Two crafted modules showed it: a trap whose backtrace names a function from the module'snamesection, and an unknown variant quoted by serde'sDisplay. Fix: rledger's top-level error printer, and ag-rledger's error envelope, now escape the whole chain. - Invalid-entry message quoted the bad value raw. That is the message added in round 2, e.g. a date. Now escaped.
- Enriched-importer bridge warnings quoted the importer's method and fingerprint strings raw. Today only library callers reach this; the CLI does not. Now escaped.
- Plugin hot-reload failure warning quoted the module's imports raw. Now escaped; there is no test for it.
Left as is
booking error … (date, "narration")quotes a ledger string; it goes with the ledger-strings follow-up.
Message wording: the resource-cap message now reads "held more than 256 open files and pending polls at once".
Tests and mutation testing
- New tests: crafted trap and decode modules, an invalid-entry value carrying controls, and a unit test for the bridge warnings.
- I applied 3 more mutations, one per new escape (top-level chain, invalid-entry value, bridge warnings), and each was caught; that makes 41 across all rounds.
- The matrix is now 39 tests.
Round 6: convergence check
Does escaping the whole chain change normal output? No.
- How I checked: I built origin/main separately and compared its output with this branch's, byte for byte. The cases were:
- a parse error;
- a booking error with a non-ASCII narration and account names;
- missing files under a non-ASCII path, for
check,reportandextract; - a BQL syntax error with a tab;
- a config TOML error whose snippet contains a tab and
ü.
- Result: every case is identical. The only difference is the binary's own name in a usage line.
- On a terminal: run under a pty, the colored output (38 escape sequences) is also byte-identical. Colors come from the diagnostic renderer, not from the error chains
render_errorsees. - Why it holds: escaping keeps
\nand\t, and host error text has no other control characters.
Paths that bypass render_error: none left that carry guest text.
- check, query and report print loader diagnostics, which are escaped at the loader.
- extract importer warnings, names and errors are escaped in the importer; the remaining warnings are host text or come from CSV input. Input data belongs to Escape control characters in ledger strings on output #2538.
- The LSP runs native plugins only (E8006), so no WASM or Python text reaches it. Native plugins can quote ledger strings, which is Escape control characters in ledger strings on output #2538's scope. Editors show diagnostics in their own UI, not through a terminal.
Hot-reload escape: now tested. The warning text comes from a new function, reload_failure_warning, with a unit test that fails if the escape is removed. Hot reload is library-only; no binary calls it.
Conclusion: nothing else real found. Everything still unescaped is ledger text, tracked in #2538.
Decisions for you
- Default time budget stays 30 s. This also sets the wall-clock bound for Python.
- CI on macOS and Windows. Whether to add the non-required plugin job recommended above.
Follow-ups (not filed)
- Message differences: native and Python plugin messages and severities differ, for example
check_commodity. - Compat shim: add
realization/compare, which beancount's ownleafonlyandnoduplicatesneed. - Ledger strings: Escape control characters in ledger strings on output #2538.
- CI: the macOS and Windows plugin job recommended above.
…p a host setting Second review round on #2525 (#2500), attacking the sandbox: - A Python plugin's sleep burned no fuel, so time.sleep(10**9) hung rledger. The guest now runs async on its own thread and fiber under a wall-clock deadline of its time budget. - A deep recursion overflowed the host thread's stack (smaller than the guest's) and aborted rledger with SIGABRT. On the fiber it ends in the guest with a message. - Each open file was an uncapped host descriptor (a plugin reached the 1024 ulimit). The guest's WASI resource table is capped at 256. - Output without its result line was read as "ran nothing"; it is now an error. A plugin returning an invalid entry (WASM or Python) aborted the whole load with exit 2; its changes are now discarded with an error and the load goes on. - The sandbox memory cap is a host setting: [plugins] max_memory_mb / --plugin-max-memory-mb (1-4096), threaded like the time budget via LoadOptions::plugin_max_memory_mb and ResolvedPlugin::run_with_limits. A 300k-transaction ledger runs a Python plugin at 1024 MiB. - Native leafonly counts children named by any directive, as beancount's realization does, so a parent whose child is only opened is reported; a pedantic test that encoded the miss is corrected. Each fix has a plugin_conformance case that fails without it. Refs #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…time # Conflicts: # CHANGELOG.md
Third review round on #2525 (#2500): - Plugin- and importer-supplied text (messages, claimed file names, Python prints and exceptions, importer warnings, names) reached the terminal raw, so control sequences could clear the screen, retitle it or overwrite lines. rustledger_plugin::untrusted escapes control characters (keeping newline and tab in messages) everywhere that text is rendered. - The Python plugin's work directory, which holds the ledger's entries and survives a Ctrl-C, followed the umask (0775); it is now 0700 on Unix. - The guest's tokio runtime is limited to 2 blocking threads (one call used to start dozens). Measured: passthrough 20k and 100k transactions cost the same CPU as 0b25a35 (within 1%). Back-to-back Python plugins after a deadline leave no threads or temp files; conformance cases cover both. Refs #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…time # Conflicts: # CHANGELOG.md
Fourth review round on #2525 (#2500): - A WASM module's import names reached the terminal raw in load errors from extract --wasm-importer, importer directory scans and check --plugin (which also dropped the cause). Importer error messages that carry the module's text (forbidden imports, runtime traps, compile and decode errors) are now escaped, and check --plugin reports the escaped cause. - The untrusted-text escaping also covers the bidirectional override, embedding and isolate characters and the Unicode line separators; right-to-left text and zero-width characters are kept, and the escaping is idempotent. Refs #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
Fifth review round on #2525 (#2500), an inventory of every message site that quotes module or guest text: - rledger printed an error's whole anyhow chain, and the importer errors' sources (a trap backtrace naming the module's functions, a decode error quoting what it returned) re-entered the chain raw. The top-level error printers of rledger and ag-rledger now escape the chain. - The "plugin returned an entry that is not valid" reason quotes the plugin's value; the enriched importer's bridge warnings quote its method and fingerprint strings; a hot-reload failure quotes the module's imports. All escaped. - The resource-cap message says it counts open files and pending polls, which is what the WASI table holds. Refs #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…time # Conflicts: # CHANGELOG.md
Sixth review round on #2525 (#2500): the plugin hot-reload warning's escape had no test. Its text now comes from reload_failure_warning, unit-tested with a forbidden import name carrying a control sequence. Refs #2500 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
…time # Conflicts: # CHANGELOG.md
…tput (#2710) Ledger strings (narrations, payees, metadata, comments, document paths) reached the terminal raw in check diagnostics (message and miette snippet), query tables and report text. They are now escaped with rustledger_plugin::untrusted's rule (#2525), as are price fetch-failure lines. Data output keeps the value: CSV, PRINT, -f beancount and format write it as is; JSON escapes DEL, C1, bidi controls and line separators as \uXXXX, which decode to the same string. extract neutralizes control characters in imported text (tab/newline to a space, others to U+FFFD) with a warning naming the row and field, and `rledger lint control-chars` reports the ones already in a ledger (#2538). Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
What was wrong
No Python plugin could run on main, and no test ran one through the CPython-on-WASI runtime, so CI stayed green. Fixing that, and then an adversarial review of the new path (scale, sandbox, real ecosystem plugins, every plugin entry point), turned up these:
plugin, not through__plugins__.'''…'''literal, so a narration with"or\broke their JSON.metakey the wire never has. Plugins saw no metadata (nofilename/lineno, none of the ledger's keys), every round trip dropped all transaction and posting metadata, and a plugin that set metadata failed to decode.source message entry) were reported asstr(tuple)with no location. Separately, a Python plugin's whole output was re-inserted (Delete+Insert), so every later diagnostic about those entries lost its location: a failingbalance, the next plugin's errors./workwas preopened read-write: a plugin could write 1 GiB of host temp space for 0.07 s of budget, so a ledger from someone else could fill/tmp(tmpfs, i.e. RAM). Its stderr was the host's (unbounded)./was the whole runtime cache dir. All three were exposed by this PR's first commit, the first in which plugins actually ran.all fuel consumed, and out of memory a bareunreachabletrap. Python's uncaught exceptions gave only a wasm backtrace.execute_builtin(check_commodity, leafonly) had no caller:python:leafonlywas refused as a module name. Pythoncheck_commoditycounted anopen's currencies as declared, so it missed what beancount flags. Pythonleafonlyreported each posting instead of each account.python.wasm.What changed
Budget: the host's seconds, the shared conversion, no Python multiplier
sandbox::fuel_for_secsis the one seconds-to-fuel conversion. WASM plugins, importers and Python all use it.PythonRuntime::with_max_time_secsis new, andrun_with_max_time_secsthreads the budget to Python. So[plugins] max_time_secs,--plugin-max-time-secsandLoadOptions::plugin_max_time_secsall govern Python.Measured (fuel via
store.get_fuel(), sandbox memory via the instance's memory size):CPython runs at 3–6G fuel per CPU-second, the same range as other wasm.
FUEL_PER_SECOND's conservative 1G therefore keeps its "stops within N seconds" promise, and a multiplier would break it.Decision: keep the 30 s default, consistent with WASM. (Round 2 made the memory cap configurable; see below.) That covers ~50k transactions at ~0.55M fuel each. A fuel trap now tells a big-ledger user exactly how much to add:
the plugin exceeded its 30-second time budget (rledger raises it with --plugin-max-time-secs or [plugins] max_time_secs); moving 100002 entries into Python and back takes about 62 seconds of it before the plugin does any work. Memory, not time, is the hard ceiling for very large ledgers. The cap holds ~180k transactions, so an SFC-size 316k ledger cannot run a Python plugin. Round 2 makes the cap a host setting (below).Entry points: beancount's
run_transformations__plugins__runs in order: a string viagetattr, otherwise the callable itself.(entries, options_map[, config]). An exception is reported, and the next function gets the pre-exception entries.Deliberate divergences (correctness first), documented in the docstring, docs and CHANGELOG:
__plugins__: runs nothing, as beancount does, but with a warning.AttributeError.__plugins__ = "name"(a string) and non-callable items are errors.Python data path
Decimal,date,Amount), withfilename/linenoas in beancount. Unchanged values keep their wire type.meta, as_replacekeeps it) becomesModify(i). It keeps its span; only genuinely new entries areInsert.serialize_errorsreads.message/.sourcefrom any error object, so located errors match bean-check (file:line: message).data.filter_txnsandamount.CURRENCY_RE. Stand-in modules are named, so a missing import readscannot import name 'realization' from 'beancount.core', and that line is surfaced in the error.Sandbox
/lib(the stdlib) and/work(its inputs), both read-only.prints are redirected to stderr, so they cannot corrupt the result.$HOME,/etc/passwdor/work/../.., cannot write anywhere, cannot make symlinks, and cannot open sockets or run subprocesses.invalid plugin.Limits, uniformly
sandbox::explain_limit/time_budget_exceededgive one wording for all three sandboxed kinds:it exceeded its N-second time budget (rledger raises it with --plugin-max-time-secs or [plugins] max_time_secs), orit ran out of the 256 MiB sandbox memory limit.MemoryLimiter::growth_deniedrecords the refusal. rledger survives and reports with exit 1, never killed.python:formspython:leafonly/python:check_commodity(also with thebeancount.plugins.prefix) run the built-in Python implementations. These now match beancount's checks and messages.python:./file.pyruns the file.python:moduleis still refused (docs/UX: Python plugins referenced by module name fail confusingly; document file-path + sandbox-isolation requirements #1432).Real ecosystem plugins vs bean-check
I ran the plugins' own source files, copied from beancount 3.x and
beancount_reds_plugins, on the same ledgers.Same result as bean-check:
check_commodity: same two errors and messages.unique_prices: same error, at the same line.coherent_cost,onecommodity: clean on both.rename_accounts(reds): same balances.Different from bean-check:
leafonlyandnoduplicatesneedbeancount.core.realization/compare, which the shim doesn't provide. They now fail with thatImportErrornamed. The built-inpython:leafonlycovers the first.Plugin conformance matrix (
crates/rustledger/tests/plugin_conformance.rs)Every kind × entry point, each asserting the plugin's effect (a diagnostic, a tag, an imported transaction) in the command's output:
--native-plugin, andbeancount.plugins.*resolving native;wasm_plugin_main!guest via directive (check/query/report) and--plugin;python:./x.py,python:module(refused) andpython:<builtin>forms;with_plugins.beancount);wasm_importer_main!guest viaextract --wasm-importer.The previously unused
tests/fixtures/python-pluginsfixtures are used here; they gained__plugins__.Limits for each sandboxed kind (WASM plugin, Python plugin, WASM importer):
printto stderr, and locations preserved after a plugin.The guests (
tests/fixtures/conformance/, a standalone workspace) are built for wasm32 by the test itself, once. ThePython-gated cargo testsjob installs the wasm32 target and runs the matrix withRLEDGER_REQUIRE_WASM32=1andRLEDGER_REQUIRE_PYTHON_WASI=1, which make a skip a failure, and greps its log for both skip markers. 24 tests, 3.5 s once warm.Fail-without-fix. I applied 19 mutations, one at a time, and each was caught. Each line is the mutation, then the tests that failed:
python:builtin route removed → the builtin test--native-pluginignored → its test--pluginignored → its test--wasm-importerignored → 4 importer tests/workwritable → isolationserialize_errorsreading onlyValidationError→ located-errors testmetakey → metadata test__plugins__ignored → 6 testsThe original 7
python_plugin_wasitests all fail on main.Second review round (92b44b9): attacking the sandbox
time.sleep(10**9)(waiting burns no fuel)ulimit -nprocessing pipeline failed, exit 2, all diagnostics lostwasmtime is 49.0.2, which has the RUSTSEC-2026-0321
poll_oneofffix; WASM plugins and importers import nothing, so they cannot block.Memory cap as a host setting:
[plugins] max_memory_mb/--plugin-max-memory-mb(1–4096), threaded like the time budget (LoadOptions::plugin_max_memory_mb,ResolvedPlugin::run_with_limitswithPluginLimits), never the ledger's. A 300k-transaction ledger runs a Python plugin at--plugin-max-memory-mb 1024 --plugin-max-time-secs 1000(72 s CPU).Native
leafonly: counts children named by any directive (open, close, balance, pad, note, document, postings), as beancount's realization does, so a parent whose child is only opened is reported, matching bean-check.test_pedantic_runs_multiple_validatorshad encoded the miss (its one expected error was the commodity's) and is corrected.Matrix: 33 tests, 10/10 green locally, green cold (empty CPython cache, no prebuilt guests, 15 s). It runs in the required, non-path-filtered
Python-gated cargo testscheck. 11 more mutations were each caught: no deadline, uncapped table, truncated output accepted, invalid entry aborting, memory cap not threaded (×3), config key or flag ignored, leafonly reverted.Third review round (5ec918d)
rustledger_plugin::untrusteddoes the escaping and a conformance case covers each channel.0700on Unix; it followed the umask and survives a Ctrl-C.--no-default-features, which predates this PR.Fourth review round (aad87fe)
extract --wasm-importer, importer directory scans andcheck --plugin.check --pluginalso dropped the error's cause entirely. Fix: importer error messages that carry module text are now escaped: forbidden import, runtime trap, compile error and decode error.check --pluginreports the escaped cause. A test covers each path.mkdirwith a mode, not create-then-chmod);Fifth review round (d81c8b2)
I went through every message site that interpolates module or guest text.
namesection, and a decode error quoting an unknown variant. Fix: the top-level error printers in rledger and ag-rledger now escape the chain.Also run
cargo fmtcargo clippy --workspace --all-features --all-targets -D warningscargo test --all-features:rustledger-plugin: 377 passedrustledger-importer: 250rustledger-loader: 258rustledger: 967cargo doc -D warningsfor all four cratesCloses #2500
🤖 Generated with Claude Code
https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr