Skip to content

v1.8.0

Choose a tag to compare

@github-actions github-actions released this 24 Jun 10:32
3984483
feat(ui,engine): reactive inputs UX + engine correctness fixes (#1)

Make input-editing fully reactive across both web UIs and fix six
correctness bugs surfaced by an adversarial engine audit.

UI — single source of truth (no more drift between the two front-ends):
- New internal/service/web/shared.js holds all transport-agnostic
  renderers + the reactive simulator; build.mjs copies it into the
  playground. serve --ui (HTTP) and the WASM playground now share it.
- Always-visible typed Inputs panel auto-built from the goal decision's
  required inputs (type/domain/unit hints); a decision selector.
- Two-way form <-> JSON sync (guarded, no ping-pong); input values are
  preserved across .rules edits; debounced live loop (source vs input).
- Decimal-exact submission: number inputs are sent as raw JSON number
  tokens (no JS Number() rounding) so the engine's exact decimals hold.
- Rich result card + readable trace (winning rule, justifying cells)
  and firing-path highlight on the decision graph; soft out-of-domain
  validation (non-blocking).
- New POST /v1/model candidate endpoint mirrors the WASM model() so the
  live loop is identical over HTTP and WASM.

Engine fixes (each repro-confirmed + adversarially verified, with tests):
- ir/match.go: `!= x` (OpNe) no longer matches null/NA (ADR 0003/0013).
- verify: numeric enum `in {1,2,3}` treated as a discrete set — fixes
  false completeness gaps and hidden dead rules.
- cmd/feelc run --json: decimals via modelinfo.JSONify (no "2E+3"),
  byte-identical to the HTTP service; trace decimals normalized too.
- third_party/feel: context-sensitive scanner so `a*3-1`/`10-1`
  subtract correctly, plus a unary-minus production (`-a`, `- 3`).
- vm/expr.go: defensive stack-underflow guard (clean error, no panic).

Deferred (logged): PRIORITY tables silently fall back to rule order when
an output is absent from the priority list — low severity, documented
rank() behavior; warrants a verifier diagnostic, not an eval change.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>