Skip to content

fix: decision table verification and diagnostic quick fixes - #537

Merged
ivanmiletic merged 14 commits into
masterfrom
fix/table-analysis
Oct 2, 2026
Merged

ivanmiletic merged 14 commits into
masterfrom
fix/table-analysis

Conversation

@ivanmiletic

Copy link
Copy Markdown
Contributor

Verify tables in policies and graphs (unreachable, duplicate, missing cases, compress), budgeted live checks with an on-demand full check, and quick-fix data for redundant parentheses and ?? fallbacks.

ivanmiletic and others added 2 commits October 1, 2026 11:23
Verify tables in policies and graphs (unreachable, duplicate, missing cases, compress), budgeted live checks with an on-demand full check, and quick-fix data for redundant parentheses and ?? fallbacks.
Remove full_table_check and the 2,000-row cap; table verification now runs fully in live diagnostics, with work caps only as a runaway guard.

- Per-column row index (string/bool keys, numeric segment tree) of live rows for unreachable checks and compression
- Witness-first reachability before computing covers; lazy borrowed coverers
- Divide-and-conquer missing cases over column partitions
- Allocation-free set intersection/subset checks and in-place merges for string cells
- Findings cache keyed by table content, so unchanged tables are not re-verified
- Identical cells type-checked once per column; linear output type merge and dictionary/linter grouping
ivanmiletic and others added 12 commits October 1, 2026 21:12
Graph analyses record what they consume from other documents (called signatures, imported dictionaries) and stay valid while those values are unchanged; affected_by follows an edge only when the consumed value changed.
Typed edges (policy imports, graph dictionary imports, sub-decision signatures) maintained on set/remove; affected_by walks the index with early cutoff, and dictionary views cover the whole import chain.
Edits queue their path; before the next snapshot the engine walks dependents with a frozen copy of every recorded view (each dependent on the graph stack) and stamps affected documents with a sequence. Consumers read them via changes_since(cursor), so queries in between cannot absorb a change. Graph dictionary views now cover the combined import list, matching first-wins resolution.
…isense

The table analysis now uses zen_expression::intellisense::values for what a condition accepts (interval/string/bool/null sets), parsing cells into constraints and printing sets back as cell text. ArmTest and the runtime decision table index are unchanged.
…ate columns by date

Cell text listed range tokens first ("> 5, null"); the VM evaluates list items left to right and a comparison throws on non-numbers, so null/string/bool values never matched. Compression and missing-case fixes produced cells that changed results. Switch conditions on date fields now narrow date columns by date instead of by string.
Inside a decision-call cycle a recorded signature depends on which member was cut off as recursive, so comparing it could skip a dependent (seen when undoing an edit in a 3-graph cycle).
…rs skip, fallible outputs don't shadow, integer and aliased fields in missing cases

- keys set by only some switch branches are nullable where branches join, in $nodes and in graph output
- the (x ?? 0) fix is not offered in graph table cells and switch conditions, where an error means no match
- a graph first-hit row whose output can fail no longer makes later rows unreachable
- integer schema fields drop gaps without integers; min/max are read through nullable anyOf
- columns over the same field path ((x), x['y']) share one dimension; derived columns overlapping another column are left out of gap checks
@ivanmiletic
ivanmiletic merged commit 20d88e3 into master Oct 2, 2026
59 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.

3 participants