datalog-plan: log parser/safety bug-hunt round (7 bugs fixed)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 32s

This commit is contained in:
2026-05-10 21:18:04 +00:00
parent 3a1ecaa362
commit a9e4eea334

View File

@@ -15,7 +15,7 @@ for rose-ash data (e.g. federation graph, content relationships).
## Status (rolling)
`bash lib/datalog/conformance.sh`**239/239 across 11 suites**
`bash lib/datalog/conformance.sh`**256/256 across 11 suites**
(tokenize, parse, unify, eval, builtins, semi_naive, negation, aggregates,
api, magic, demo). Source is ~3100 LOC, tests ~2900 LOC, public API
documented in `lib/datalog/datalog.sx`.
@@ -320,6 +320,21 @@ large graphs.
_Newest first._
- 2026-05-10 — Bug-hunt round on parser/safety surfaced 7 real
bugs, each fixed with regression tests:
- Reserved relation names (`not`, `count`, `<`, `is`, ...) were
accepted as rule/fact heads — would silently shadow built-ins.
- Negative number literals (`n(-1).`) failed to parse — users
had to express them as `(- 0 1)` or via `is`.
- Unterminated block comment `/* ...` silently consumed the
rest of the input. Now raises with the position.
- Same silent-consume bug in unterminated string / quoted-atom.
- Empty-list rule head and non-list rule body weren't validated;
they'd crash later in `rest`. dl-add-rule! now checks shape.
- dl-magic-query with non-list / non-dict goal crashed cryptically.
- Tokenizer silently swallowed unrecognised characters (`?`, `!`,
`#`, `@`, etc.) — typos produced confusing downstream errors.
- 2026-05-08 — Phase 6 driver: `dl-magic-query db query-goal`.
Builds a fresh internal db from the caller's EDB + magic seed +
rewritten rules, saturates, queries, returns substitutions —