datalog: dl-magic-query shape validator (255/255)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 44s
Bug: dl-magic-query crashed with cryptic "rest: 1 list arg" when the goal argument was a string, number, or arbitrary dict. The first thing the function does is dl-rel-name + dl-adorn-goal, both of which assume a positive-literal list shape. Fix: explicit shape check up front. A goal must be a non-empty list whose first element is a symbol. Otherwise raise with a clear diagnostic. Built-in / aggregate / negation dispatch (the fall-back to dl-query) is unchanged. 2 new magic tests cover string and bare-dict goal rejection.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# datalog scoreboard
|
||||
|
||||
**253 / 253 passing** (0 failure(s)).
|
||||
**255 / 255 passing** (0 failure(s)).
|
||||
|
||||
| Suite | Passed | Total | Status |
|
||||
|-------|--------|-------|--------|
|
||||
@@ -13,5 +13,5 @@
|
||||
| negation | 10 | 10 | ok |
|
||||
| aggregates | 20 | 20 | ok |
|
||||
| api | 20 | 20 | ok |
|
||||
| magic | 34 | 34 | ok |
|
||||
| magic | 36 | 36 | ok |
|
||||
| demo | 21 | 21 | ok |
|
||||
|
||||
Reference in New Issue
Block a user