fix: publish beangulp-yapeal + close two core bugs PR #1 exposes - #2
Merged
Conversation
- CI: publish.yaml's matrix never listed beangulp-yapeal, even though quints now hard-depends on it at runtime — the next release would ship quints with an unresolvable dependency. - init.py: `quints init --importers yapeal` never opened the yapeal bank account in accounts.bean; reproduced end-to-end (`quints check` fails with "unknown account" as soon as a drafted statement is booked). - importing.py: match_receivables() only rewrote the counter-leg account when a draft already had two postings. Yapeal's default (no rule-matched) draft has only the cash leg, so a receivable match flipped it to flag "*" without completing it — an unbalanced transaction that beancount rejects on load. Pre-existing latent bug, newly reachable via yapeal's caller; fixed to append the elided receivable posting. - Mechanical drift: stale "supported: ubs, wise, stripe" strings in init.py, cli.py help text, and getting-started.md; missing yapeal reminder in the AGENTS.md sample-data checklist. Yapeal-specific issues (the beangulp-yapeal package's own identify()/ extract() logic) are left for the PR author — see PR #1 review comments. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Depends on #1
This branch is built on top of jensbin's
yapealbranch content (it's notmergeable to
mainuntil #1 lands — the diff below will shrink to justthis PR's commit once that happens).
Summary
Follow-up from reviewing #1. Splitting the fix so the CI gap and the
core-quints bugs get fixed by us, and the yapeal-package-specific issues
go back to the PR author (see review comments on #1):
.github/workflows/publish.yaml's publish matrix never listedbeangulp-yapeal, even thoughquintsnow hard-depends on it atruntime. The next version tag would publish
quintswith anunresolvable dependency (
uvx quintsfails to resolve).init.py:quints init --importers yapealnever opened the yapealbank account in
accounts.bean. Reproduced end-to-end — booking adrafted statement and running
quints checkfails with "Invalidreference to unknown account". Fixed
_backbone()to open it, same asthe wise/stripe branches.
importing.py:match_receivables()only rewrote the counter-legaccount when a draft already had two postings. Yapeal's default
(no-rule-matched) draft has only the cash leg, so a receivable match
flipped it to flag
*without completing it — beancount rejects theresulting single-posting transaction as unbalanced on load. This is a
pre-existing latent bug in shared code, newly reachable via yapeal's new
caller; fixed to append the elided receivable posting so the match
actually balances.
"supported: ubs, wise, stripe"strings ininit.py, the--importersCLI help text, anddocs/getting-started.md;missing yapeal reminder in the generated
AGENTS.mdsample-datachecklist.
Note: adding
beangulp-yapealto the publish matrix also needs apypi-beangulp-yapealGitHub environment (mirroring the existingpypi-<package>ones) and the matching PyPI trusted-publisherregistration — that's a one-time manual setup step, not something a code
change can do.
Test plan
and loads the ledger end-to-end (would have failed before the fix).
match_receivables()completing asingle-posting draft, including a full load through
beancount.loader.load_string.make check— green (ruff, basedpyright, import-linter, deptry,vulture, 186 passed / 2 skipped).
🤖 Generated with Claude Code