Skip to content

fix: pin rustledger v0.24.0 and refresh the snapshots it moves - #325

Merged
robcohen merged 2 commits into
mainfrom
fix/refresh-stale-snapshots
Sep 16, 2026
Merged

robcohen merged 2 commits into
mainfrom
fix/refresh-stale-snapshots

Conversation

@robcohen

@robcohen robcohen commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

Closes rustledger/rustledger#2302. Supersedes #321.

Two changes that only work together

RUSTLEDGER_VERSION moves v0.22.0 -> v0.24.0, and the four snapshots move with it. Separately each is red: the bumped pin produces output the old snapshots reject (that is #321, stuck since 2026-09-06), and refreshed snapshots do not match what v0.22.0's component emits.

That deadlock is the whole of rustledger#2302. The snapshots went stale, so the upgrade bot's PR could not go green, so the pin stayed two releases behind, so rustledger's Downstream (rustfava) check -- which tests against rustledger main -- stayed red on the same four tests. The dead advisory signal there and the stalled upgrade here are one bug.

Downstream (rustfava) in rustledger has failed on every run since 2026-09-01 — 29 of its last 30, the exception being a cancelled run. That job exists to catch embedder breakage before a release: every FFI bug in the v0.17–v0.19 arc was found by rustfava after a release shipped, and the job moves that discovery pre-merge. A check that is red continuously cannot do that — a real break looks identical to the standing noise.

All four failures are stale expectations here, not regressions in rustledger. I checked each against the oracle rather than assuming, since the obvious reading (downstream fails, upstream broke it) is backwards in this case.

Two causes, six changed values

1. document directives carry tags and links — tests/__snapshots__/test_json_api-test_api-documents.json, and the same entry at index 18 of ...-journal.json.

- 'links': [],   'tags': []
+ 'links': ['link1'],   'tags': ['tag']

beancount 3.2.3, on 2012-12-15 document Expenses:Food "./import.csv" #tag ^link1:

Document -> tags=['tag'] links=['link1']

So populating them is correct. Compare beancount#2160, where Note gained the same two fields.

2. An unaliased function column is named with the whole expression — ...-sum.json and ...-misc.json.

- {'name': 'sum'}              + {'name': 'sum(day)'}
- {'name': 'units'}            + {'name': 'units(position)'}

beanquery 0.2.0 names them the same way (SELECT sum(day) → ['sum(day)']); these snapshots matched an older beanquery.

How this was produced

  • Component built fresh from rustledger main (6972f5edd1) for wasm32-wasip2, and resolved through the same RUSTLEDGER_COMPONENT_WASM override the CI job uses — not the released artifact, and not the stale one that had been sitting in that path.
  • Reproduced the four failures first (4 failed, 46 passed), then pytest --snapshot-update.
  • Diffed the regenerated files structurally, not by line: six changed values across the four files, each attributable to a cause above. Nothing else moved.
  • Full suite against the released v0.24.0 component, resolved the way CI resolves it rather than through the RUSTLEDGER_COMPONENT_WASM override: 679 passed, 1 skipped, 100% coverage. The same snapshots also pass against a component built from rustledger main (6972f5edd1), so they are correct for both.

🤖 Generated with Claude Code

https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr

robcohen and others added 2 commits September 16, 2026 17:57
The `Downstream (rustfava)` check in rustledger has failed on every run
since 2026-09-01 -- 29 of its last 30 -- and that is the check whose whole
job is to catch embedder breakage before a release. A check that is always
red gives no signal, so a real break would look exactly like the noise.

All four failures are stale expectations here, not regressions there
(rustledger#2302). Two causes, six values:

- `document` directives carry their tags and links now. beancount 3.2.3
  reads `2012-12-15 document Expenses:Food "./import.csv" #tag ^link1` as
  `tags=['tag'] links=['link1']`, so populating them is correct. Compare
  beancount#2160, where `Note` gained the same two fields. This moves the documents
  snapshot and the same entry at index 18 of the journal one.
- an unaliased function column is named with the whole expression:
  `sum(day)` rather than `sum`, `units(position)` rather than `units`.
  beanquery 0.2.0 names them the same way; these snapshots matched an
  older one.

Regenerated with `pytest --snapshot-update` against a component built from
rustledger main (6972f5edd1), not the released artifact. Nothing else
moved: six changed values across four files, each attributable to a cause
above. Full suite is 679 passed, 1 skipped, 100% coverage.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
The snapshot refresh in the previous commit is only correct against
rustledger v0.24.0 or newer, so the pin has to move with it. The two are
one change: separately, each is red.

#321 (the bot's v0.24.0 bump) has been stuck since 2026-09-06 failing on
exactly the four tests the previous commit fixes, and while it stays
stuck the pin sits at v0.22.0 -- which is in turn why rustledger's
`Downstream (rustfava)` check, which tests against rustledger main, has
been red since 2026-09-01 (rustledger#2302). This supersedes #321.

Verified against the RELEASED v0.24.0 component, resolved the way CI
resolves it rather than through the RUSTLEDGER_COMPONENT_WASM override:
679 passed, 1 skipped, 100% coverage. The same snapshots also pass
against a component built from rustledger main (6972f5edd1).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
@robcohen robcohen changed the title fix(tests): refresh the four snapshots rustledger has outgrown fix: pin rustledger v0.24.0 and refresh the snapshots it moves Sep 16, 2026
@robcohen
robcohen merged commit ab739ca into main Sep 16, 2026
33 checks passed
@robcohen
robcohen deleted the fix/refresh-stale-snapshots branch September 16, 2026 18:49
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.

Downstream (rustfava) has been red since 2026-09-01 on stale snapshots, so its advisory signal is dead

1 participant