Skip to content

fix: evaluate native Fusion expressions and allow random in Preview/Apply - #20

Merged
DiegoV71 merged 1 commit into
mainfrom
codex/native-quantities-random
Nov 8, 2026
Merged

DiegoV71 merged 1 commit into
mainfrom
codex/native-quantities-random

Conversation

@DiegoV71

@DiegoV71 DiegoV71 commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Paramood 1.6.0 rejected valid physical/compound expressions and refused random-dependent batches. Delegate original numeric expressions to Fusion and remove those runtime refusals.

Preview / Calculate
  infer units and planned references
  -> native isValidExpression / evaluateExpression
Apply
  -> original formula, including random()
  -> verify expression, type and finite native result

All 96 documented units, canonical aliases, affine temperatures, physical/compound dimensions, valid fractional powers, lazy conditionals, implicit unit promotion, dimensioned rounding/sign, and native unit symbols are covered. Sampled previews display ≈ and a short English note. Random dependency markers propagate through snapshots and variants; formulas and deterministic values still guard stale previews.

Evidence

  • Before: area/physical outputs were rejected; random() caused NONDETERMINISTIC_EXPRESSION; local eager branch evaluation and unit assumptions vetoed valid native formulas.
    After: 496 Python tests plus 22 subtests, 162 frontend tests, 48 IntelliSense tests, Ruff 0.17.3, Prettier, ESLint, TypeScript/Vite, compilation, ZIP/SHA-256 and stable release contract pass locally.
  • Actual macOS Fusion 2706.1.17: all 96 unit abbreviations, all 26 functions, and 25 additional creation/update scenarios passed. Random recompute preserved preview/variant identity; deterministic edits invalidated previews. F3D reopen preserved 144 parameter expressions/units and the random variant.
  • Installed test ZIP rendered sampled native preview/readback in a narrow Palette, including wrapping long before/after values. Prefill/state notifications drove the visual check; native adapter Apply and actual native values were verified separately. Pointer/keyboard interaction was not reaccepted.
  • Reproducible native suite: scripts/fusion_expression_parity.py. English reference, acceptance record, README and 1.6.1 release notes updated; existing GitVersion/CI publication retained.

Merge Danger

Door: two-way

No command IDs, manifest UUID, dependency versions or versioning configuration change. Read-only native evaluation creates no preview parameters; graph/document/formula/type guards remain. Only random-dependent sampled numeric values are excluded from stable-value equality checks. Security review confirms native expression parsing rather than Python eval and retains bridge payload bounds.

Blast Radius: expressions

Native Windows, cloud Save and full add-in restart remain unverified. The previous restart crash is outside this fix. See docs/EXPRESSION_ACCEPTANCE.md for precise offline/native/UI boundaries.

@DiegoV71
DiegoV71 merged commit 5cb1e55 into main Nov 8, 2026
16 checks passed
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.

1 participant