Repository navigation
Conversation
Allow providers.<id>.card_filter.include/exclude to drop statement rows by card_last4 before date-range inference, hooks and matching. Filtered rows produce no pending entries, do not constrain matching and do not reach Extra; include is a whitelist (rows without card_last4 are dropped), exclude a blacklist (they are kept), and exclude wins when both are set. context.parsed keeps the unfiltered parse. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This branch has not been deployed
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.
背景
按卡管理的银行每张卡单独导出流水,但同一 provider 下可能配置了多张卡。对账时其他卡的账本条目会被算进 Extra,卡间转账只要一侧流水有记录,另一侧的腿也会被豁免,导致结果不准确。
改动
新增
providers.<id>.card_filter.include/.exclude,在解析之后、范围推断 / hooks / 匹配之前按card_last4丢弃账单行:include是白名单(没有卡号的行也会被丢弃)exclude是黑名单(没有卡号的行保留)exclude优先context.parsed仍保留未过滤的解析结果测试
uv run pytest tests/:811 passeduv run ruff check .通过