datalog: dl-set-strategy! validates known strategy values
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s

`dl-set-strategy!` accepted any keyword silently — typos like
`:semi_naive` or `:semiNaive` were stored uninspected and the
saturator then used the default. The user never learned their
setting was wrong.

Validator added: strategy must be one of `:semi-naive`, `:naive`,
`:magic` (the values currently recognised by the saturator and
magic-sets driver). Unknown values raise with a clear message that
lists the accepted set.

1 regression test; conformance 276/276.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 09:40:29 +00:00
parent ce98d97728
commit fadcdbd6a9
5 changed files with 51 additions and 14 deletions

View File

@@ -1,13 +1,13 @@
{
"lang": "datalog",
"total_passed": 275,
"total_passed": 276,
"total_failed": 0,
"total": 275,
"total": 276,
"suites": [
{"name":"tokenize","passed":31,"failed":0,"total":31},
{"name":"parse","passed":23,"failed":0,"total":23},
{"name":"unify","passed":29,"failed":0,"total":29},
{"name":"eval","passed":43,"failed":0,"total":43},
{"name":"eval","passed":44,"failed":0,"total":44},
{"name":"builtins","passed":26,"failed":0,"total":26},
{"name":"semi_naive","passed":8,"failed":0,"total":8},
{"name":"negation","passed":12,"failed":0,"total":12},
@@ -16,5 +16,5 @@
{"name":"magic","passed":37,"failed":0,"total":37},
{"name":"demo","passed":21,"failed":0,"total":21}
],
"generated": "2026-05-11T09:34:17+00:00"
"generated": "2026-05-11T09:40:12+00:00"
}