feat(formulas): expand verified Python function support

Merged
VI
24d ago
+902-97

Summary

Extend verified calculation formulas while keeping grouping and placeholder nodes out of Python authoring.

Python formulas → CSO → independent verification → FormulaSheet / Python export
  + exp, log with an optional base, min, variadic max/min, round with digits
  + equality, compound comparison predicates, comparison chains
  noop / stub: display and export only
  numeric and / or: rejected

Preserve numeric kinds, signed zero and short-circuit evaluation. Fix nested conditional export grouping and MathML operator types/spacing. The support contract distinguishes 34 calculation operations from two display-only nodes.

Evidence

  • Before: On main, capture of math.log(8, 2), min(8, 3, 2), two-argument rounding and compound predicates returns UNSUPPORTED_SYNTAX.
    After: The installed wheel captures the reference results, and integration tests independently verify, render and replay the formulas. Numeric logical expressions and noop/stub authoring remain rejected; their existing display/export forms have compatibility coverage.
  • Validation passed: 802 tests, workspace lint/typecheck, demo build, all five isolated projects, installed-package acceptance and library archive consumers. Dependency audit reports zero vulnerabilities. Lint retains existing warnings.
  • Inspected the 34-operation HTML sheet at 820 px, including compound predicate wrapping. Automated PDF checks passed; acceptance PDFs have not received visual review.

Merge Danger

Door: two-way

Code-only changes; no data migration. Calculations using the new syntax require matching Python and core packages.

Blast Radius: calculations

Changes affect formula capture, independent evaluation, export and MathML rendering.