A posting's rule column is required where the line that reads it books - #7680
Merged
delchev merged 1 commit intoOct 5, 2026
Conversation
`usedRuleColumns` collected every `rule(<column>)` reference of every item row, and the handler checked them all before deriving anything. So a column read by a single `when:`-guarded line gated the whole posting: the day an optional line was added - a promotion account on the few invoices that carry one - every document of that type stopped posting on every tenant whose rule row predated the new column, the ones the line does not apply to included. Nothing threw and nothing was logged, so the documents simply accumulated on the unposted worklist. The gate now follows the line that reads the column. An UNGUARDED row books on every document of its type, so its columns keep the up-front check. A guarded row's columns ride on the row and are checked inside its own guard, where the line actually books. The classifier ternaries of `rule(by: ...)` split the same way. Every skip path now WARNs - no rule row, a null column, an undetermined account - naming the rule entity, the match value and the source key. The handler fires only on the event, so a silent skip left nothing anywhere to explain the gap. Fixes eclipse-dirigible#7649 Co-Authored-By: Claude Opus 5 (1M context) <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.
Fixes #7649
usedRuleColumnscollected everyrule(<column>)reference of every item row, and the generated handler checked all of them before deriving anything. So a column read by a singlewhen:-guarded line gated the whole posting. The day an optional line was added — a promotion account on the few invoices that carry one — every document of that type stopped posting on every tenant whose rule row predated the new column, including the ones the line does not apply to. Nothing threw and nothing was logged, so the documents just accumulated on the unposted worklist.The gate now follows the line that reads the column.
ruleColumns) and are checked inside that row's own guard, where the line actually books. The classifier ternaries ofrule(by: ...)split the same way (ruleCaseGuardson the row,conditionalRuleGuardskeeping only the unguarded rows').Every skip path now says so. No matching rule row, a null column, an undetermined account — each WARNs naming the rule entity, the match value and the source key. The handler fires only on the event, so a silent skip left nothing anywhere to explain the gap.
The item rows are derived into a list before anything is written, so the early return a missing column takes still happens before the first write.
Covered by
GluePostingsTest(the existing fixture's third row iswhen: "Vat != 0", so its VAT account moves offusedRuleColumnsand onto the row — a rule row without one now posts a zero-rated invoice) andGlueGeneratorTest.aGuardedRowsRuleCaseCellsGuardThatRowAlone. Both suites green: 1479 in engine-intent, 217 in ide-template.