Skip to content

Bugfixes 2.2.1#152

Open
mike-finopsorg wants to merge 4 commits into
devfrom
bugfixes-2.2.1
Open

Bugfixes 2.2.1#152
mike-finopsorg wants to merge 4 commits into
devfrom
bugfixes-2.2.1

Conversation

@mike-finopsorg

@mike-finopsorg mike-finopsorg commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

…umnValue

ColumnByColumnEqualsColumnValueGenerator emitted ({a} * {b}) <> {r} with no
tolerance. The CSV loader infers numeric columns as Float64/DOUBLE, so the
product is computed in IEEE-754 and compared bit-exactly. Rows whose
exact-decimal product equals the result but whose float64 product differs by a
rounding bit (e.g. 0.000015 * 20 -> 0.00030000000000000003 vs 0.0003) were
wrongly flagged non-conformant.

Replace the exact comparison in both the violation and predicate SQL with a
relative epsilon via a shared _tolerance_expr helper so the two can't drift:
ABS(({a} * {b}) - {r}) <= 1e-9 * GREATEST(ABS({r}), 1). The tolerance absorbs
only float representation error, staying faithful to FOCUS exact-equality intent.

Resolves false failures for CAU-ListCost-C-011-C, CAU-ListUnitPrice-C-014-C,
CAU-ContractedCost-C-011-C, and CAU-ContractedUnitPrice-C-013-C.

Add end-to-end DuckDB regression tests and update the composite-calculation
generator test to assert the new tolerance SQL.

Signed-off-by: Mike Fuller <mike@finops.org>
@mike-finopsorg mike-finopsorg self-assigned this Jul 15, 2026
@mike-finopsorg mike-finopsorg mentioned this pull request Jul 15, 2026
Signed-off-by: Mike Fuller <mike@finops.org>
Signed-off-by: Mike Fuller <mike@finops.org>

@Matt-Cowsert Matt-Cowsert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Mike, the fixes all check out. I ran the #144 repro and the full test suite against this branch locally (429 passing), since CI can't run here until the merge conflict is cleared.

Two housekeeping items:

The diff is mostly the already-merged 2.2.0 work. The real change vs main is about 120 lines: the float tolerance fix, the publish workflow fix, the version bump, and the new tests. A rebase onto main will collapse the diff to just that, clear the conflict, and let CI run. It will also drop the two commits missing sign-offs that have DCO stuck (one is the suggestion of mine you accepted; those don't get signed automatically).

Suggest dropping #149 from the fix list. That cycle comes from the 1.4 model's dependency declarations, and the actual fix is the FOCUS_Spec model change you filed (FinOps-Open-Cost-and-Usage-Spec/FOCUS_Spec#2536), not anything in this PR. Dropping it here keeps the release notes accurate.

One inline suggestion on the new tag patterns; everything else looks good.

Comment thread .github/workflows/publish.yaml Outdated
Co-authored-by: Matt Cowsert <matthew@finops.org>
@mike-finopsorg
mike-finopsorg changed the base branch from main to dev July 21, 2026 20:13

@Matt-Cowsert Matt-Cowsert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for incorporating my suggestion MIke, approving now

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.

2 participants