Commit Graph
10 Commits
Author SHA1 Message Date
Stefan 2b892e15de fix: record affected documents at change time
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.
2026-10-01 21:15:43 +02:00
Stefan c30964e192 feat: affected_by query returning documents whose diagnostics depend on changed files 2026-10-01 21:15:43 +02:00
Stefan 6d0ced5e78 perf: complete decision table checks without the full table check
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
2026-10-01 16:22:06 +02:00
Ivan Miletic 6a5e9c1945 fix: decision table verification and diagnostic quick fixes
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.
2026-10-01 11:23:02 +02:00
stefan-gorules ffdfd807d1 feat: implement slots instead of natural language (#527)
* feat: implement slots instead of natural language

Replace the natural-language projection (`nl`) with engine-owned slot
completion: for a cursor position the engine classifies the slot being
edited (operand, operator, literal, member access, ...) and returns typed
options, literal facts and the expected type, for policies and graphs.

- zen-expression: new `slot` module (classification, literals, operators)
  and a lenient lexer mode for incomplete input; `nl` removed
- Intellisense: typed diagnostic codes with arguments, richer inspect for
  hover, dedicated parser error variants (messages unchanged)
- Engine: `Workspace::cursor_scope`, `slot`, `facts`; `rename_from` and
  `references_from`; editor spans in UTF-16 units; renames reach imported
  policies, `$nodes` reads, child graphs and output column heads; no `$root`
  completion in policies
- Node bindings: `slot`, `facts`, `cursorScope`, `slotBatch` replace
  `nl`, `nlTokenize`, `nlEncodeString`, `nlTokenizeBatch`

No change to expression evaluation: the VM, compiler, functions and the
default lexer path are untouched, and parser error messages keep their text.

* fix: harden slot classification, scopes and graph expectations

- restore master execution order; slot scopes hide writes of the edited
  block and its dependents instead of relying on block ranking
- token-start editing gated by slot state; operator, list and operand
  spans no longer splice into neighbouring tokens
- interval-aware bracket pairing for half-open and reversed intervals
- lenient lexer recovers from unknown characters (slots only)
- graph expected type follows switch and pass-through nodes and merges
  compatible output schemas
- sibling inference caps distinct values and analyses lazily
- deterministic overload return type display

* fix: order policy blocks by entity reads through closures and relationships

- record reads for `#.field` in closures so entity fields read through
  lists become dependencies
- link reads through derived lists (filter/map results) to the entity
  fields they carry and order the list after those fields
- evaluate entity blocks on single relationships, and demand entity
  paths for plain reads through relationships
- slot scopes keep the top-level variable when hiding written fields
2026-09-28 21:47:40 +02:00
stefan-gorules c3b9de695b feat: search capability (#494)
* feat: search capability

* reduce false fuzzy matches count
2026-07-22 16:23:40 +02:00
stefan-gorules 8d1910cc4e feat: graph workspace and static analysis (#483) 2026-07-16 23:42:13 +02:00
stefan-gorules b4b59eb7c5 feat: policy dictionary (#479)
* feat: policy dictionary

* remove enum references

* improve tests

* reset index.js and package.json
2026-07-08 13:21:03 +02:00
stefan-gorules 6858c1bd04 feat: natural language (#477)
* feat: natural language

* fix cargo fmt
2026-07-07 13:12:46 +02:00
stefan-gorules 6c0ca51354 feat: policy engine (#450)
* feat: policy engine

* fix: cargo fmt

* fix: resolve issues with miri
2026-06-23 18:51:47 +02:00