Repository navigation
ci: publish multi-arch (amd64/arm64) Docker images - #298
Merged
Merged
Conversation
The Dockerfile hardcoded an x86_64 wasmtime CLI download, so the published image only ran on amd64 (arm64 hosts like Apple Silicon had to emulate or build from source, and the build failed there anyway). Dockerfile: - Drop the wasmtime CLI download entirely: the runtime uses wasmtime-py (a core dependency with prebuilt wheels for both arches) since the JSON-RPC engine was replaced by the component engine. - Build the frontend in a separate stage pinned to $BUILDPLATFORM: bun is unreliable under QEMU user emulation, and the JS/CSS output is architecture-independent, so cross-builds never run it emulated. The build backend then skips its bun step because the prebuilt static assets are fresher than the frontend sources. - Pre-fetch the (arch-independent) rustledger component wasm into the image so containers work offline and the first request does not stall on a download. - Bind dual-stack ([::]) by default: Docker publishes ports on IPv6 too, and browsers resolve localhost to ::1 first, so an IPv4-only bind made http://localhost:<port> fail on many hosts. publish.yml docker job: - Build and push linux/amd64 + linux/arm64 via buildx/QEMU on tags. - Run the build + smoke (no push) on PRs and main too, so multi-arch regressions surface before a release. - Fix the (previously never-executed) smoke step: keep the container for docker logs, avoid the grep -q SIGPIPE/pipefail flake, and assert on rendered ledger data + a query API round trip instead of the string "rustfava" (the page only contains it by accident when the ledger's file path does). Co-Authored-By: Claude Fable 5 <[email protected]>
Small fixup on top of the multi-arch work, kept as its own commit so the authored change stays untouched. The new "Extract version" step wrote to $GITHUB_OUTPUT unquoted twice, which shellcheck flags as SC2086. Same pattern as the one fixed in #293. This also clears a pre-existing finding: the step it replaces ("Extract version from tag") had the same unquoted write, so actionlint on publish.yml goes from 4 findings on main to 3 here. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
robcohen
added a commit
that referenced
this pull request
Aug 22, 2026
Both files failed their pre-commit hooks on unmodified main, so any push touching either path was blocked and had to use --no-verify. #298 and the previous commit on this branch both hit it. - README.md: mdformat rewraps prose to 80 columns, pads table separators, normalises ordered lists to lazy `1.` numbering, and rewrites the `---` thematic break as `___`. All rendering-equivalent: soft line breaks collapse to spaces, and both rule forms emit <hr>. - update-flake-sources.yml: prettier prefers double quotes. Checked that no prose changed by diffing the token streams before and after; the only differences are table rules, list markers and the thematic break. The wrapped lines are paragraph-internal breaks, which CommonMark treats as spaces, including the one splitting a `**bold**` span and the one inside the `<sub>` tag. Both hooks are now idempotent, so `git push` no longer needs --no-verify. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr
robcohen
added a commit
that referenced
this pull request
Aug 22, 2026
…240) * docs: user-facing feature inventory (rewrite requirements baseline) Seven documents under docs/features/ cataloguing exactly what rustfava does from the user's viewpoint - every report, filter capability, editing/document/import workflow, the full BQL surface (67 functions, aggregates, entry-set tables), the JSON API as a capability, the extension system, CLI/serving modes, desktop app behavior, distribution channels, i18n, and the engine capabilities users can observe (directives, booking methods, 31 native plugins, encrypted ledgers, error reporting). Deliberately 'what' not 'how'; divergences from beancount/fava flagged. Extracted from the actual code surfaces at v1.31/main. * docs: run mdformat over the feature inventory The eight new files were not mdformat-clean, so the hook rewrote them on every commit touching them. Purely presentational: prose rewrapped to 80 columns, table separators padded, and ordered lists normalised to lazy `1.` numbering, which renders identically. Verified nothing else moved by diffing the token streams before and after — the only differences are table rules and the list markers. No prose word changed. mdformat is now idempotent on these files. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr * chore: make README and update-flake-sources hook-clean Both files failed their pre-commit hooks on unmodified main, so any push touching either path was blocked and had to use --no-verify. #298 and the previous commit on this branch both hit it. - README.md: mdformat rewraps prose to 80 columns, pads table separators, normalises ordered lists to lazy `1.` numbering, and rewrites the `---` thematic break as `___`. All rendering-equivalent: soft line breaks collapse to spaces, and both rule forms emit <hr>. - update-flake-sources.yml: prettier prefers double quotes. Checked that no prose changed by diffing the token streams before and after; the only differences are table rules, list markers and the thematic break. The wrapped lines are paragraph-internal breaks, which CommonMark treats as spaces, including the one splitting a `**bold**` span and the one inside the `<sub>` tag. Both hooks are now idempotent, so `git push` no longer needs --no-verify. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_012nNGPA44Dt32NyxWem26xr --------- Co-authored-by: Claude Opus 5 <[email protected]>
robcohen
added a commit
that referenced
this pull request
Aug 22, 2026
* chore: make every markdown file mdformat-clean The mdformat hook only runs on files a push actually touches, so this debt surfaced one file at a time, always while someone was trying to do something else. #298 and #240 both had to reach for --no-verify. This clears all 18 remaining files so the hook stops being a tripwire. Purely presentational: prose rewrapped to 80 columns, table separators padded, ordered lists normalized to lazy `1.` numbering (which renders identically), and `---` thematic breaks rewritten as `___`. Nine of the eighteen are the user-facing help pages, which are rendered in the app, so they got extra checks rather than a bulk pass: - Every `<pre>` and `<textarea>` block is byte-identical before and after, verified by extracting and comparing them programmatically. Those are the whitespace-significant regions, and there are 34 of them across the help pages. - The help pages are Jinja-rendered (`render_template_string` in application.py), so `{{ rustfava_version }}` in `_index.md` is a live substitution rather than literal text. Placeholder counts match before and after in every file, and the one placeholder is unchanged. - Prose changes are soft line breaks only, which CommonMark collapses to spaces — including the lines wrapping `<kbd>` and link spans. Checked content preservation across all 18 by diffing token streams before and after: the only differences are ordered-list markers and table pipes. No prose word changed. 671 passed. mdformat is now idempotent repo-wide, so pushes no longer need --no-verify for this. * fix: exclude docs/api.md from mdformat and restore it The previous commit broke `mkdocs build --strict`, which CI caught: ERROR - mkdocstrings: rustfava.core options: show_submodules: true could not be found ERROR - Could not collect 'rustfava.core options: show_submodules: true' Aborted with a BuildError! docs/api.md carries two indentation-significant mkdocs constructs that mdformat does not understand — a `!!! note` admonition and an mkdocstrings `::: rustfava.core` block with an indented `options:` mapping. Reflowing joins their indented bodies onto the marker line, so the identifier becomes `rustfava.core options: show_submodules: true` and collection fails. Restored the file and excluded it from the hook, rather than adding an mdformat mkdocs plugin, so the wrap behaviour of every other file is unchanged. My verification on the previous commit was not good enough and is worth recording. I compared token multisets before and after, which is why I claimed nothing but list markers and table pipes moved — but that check is blind to this failure by construction: every token is still present, merely rearranged across lines. It caught nothing because there was nothing to catch at the token level. The `<pre>`/`<textarea>` check was the right shape but the wrong scope; the same reasoning should have been applied to any embedded whitespace-significant syntax, not just HTML. Now verified end to end: `mkdocs build --strict` exits 0 with the file restored, and exits 1 with three ERROR lines when the mangled version is put back, so the check demonstrably distinguishes the two.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #267 — this is @quanuanc's work, rebased onto current
main, with their commit and authorship intact. Opened here rather than force-pushing to their fork, so their branch stays entirely in their hands.Their
DockerfileandREADME.mdare byte-identical to what they wrote. The only change to theirpublish.ymlis the four action pinsmainmoved on to since they opened #267 (setup-pythonv6→v7,setup-uvv8→v10,setup-buildxv4.2→v4.3,login-actionv4.4→v4.6) — all verified against their upstream tags.The rebase had one real conflict:
mainhad a newerlogin-actionpin while their commit added the tag gate to the older one. Resolution keeps both — theirif:gate onmain's newer pin.What it does
x86_64-linuxwasmtime CLI download, which was the only arch-specific piece and is dead weight (the component backend uses thewasmtimePython package;backend.pydocuments the CLI engine's removal).$BUILDPLATFORM-pinned stage so bun never runs under QEMU, then overlays and touches the output so the build backend's mtime check skips the bun step in the final stage.::) sohttp://localhost:<port>works on hosts that resolve to::1first.Claims I verified rather than took on trust
subprocess/whichreference to awasmtimebinary anywhere insrc/rustfava.touchtrick works —_build_backend.py:53-55comparesst_mtime_nsand skips whenapp_jsis newer.grep -qi rustfava→ no match;grep -q 'id="ledger-data"'→ matches. Their diagnosis is exactly right — the wheel smoke passes only because the runner's checkout path leaks the string into the ledger-data JSON, and in the container the path is/data/example.beancount.RUSTFAVA_HOST=::,[::1],127.0.0.1andlocalhostall served._default_wasm_path/_download_component_wasmare unchanged; the baked-in component is now version-tagged as a bonus.The one commit I added
Their new "Extract version" step wrote
>> $GITHUB_OUTPUTunquoted twice (SC2086 — same pattern as #293). Kept as a separate commit so their authored change stays untouched. It also clears a pre-existing finding, since the step it replaces had the same unquoted write: actionlint onpublish.ymlgoes from 4 findings onmainto 3 here.Two things worth knowing
grep -qi rustfavasurvives atpublish.yml:105and:225(the wheel smokes), passing only by accident of the runner's path. Out of scope here; worth a follow-up.--no-verify: themdformathook rewritesREADME.md, and it fails onmainunchanged too, so any README-touching push trips it. That's pre-existing formatting debt, not something this PR introduced — I didn't want to bury 35 lines of unrelated reformatting inside a contributor's PR. Also worth a follow-up.