Repository navigation
test(parser): backport the parser vs grammar verifier to v2.x (#643) - #655
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Port src/query/datalog/parser/verifier.rs and v3's grammar.pest (exact fact and retract fact, reserved list heads, keyword word boundaries) to main. INT-019 still mixes syntax and semantic parse errors on v2.x, so it counts as semantic, with a witness per semantic site; PRS-080, PRS-084 and PRS-107 do not exist here. KNOWN_DRIFT is v3's list unchanged: every entry matches at k = 3 and k = 4 on main. Add .github/workflows/grammar-verifier.yml: nightly k = 4 runs on main and v3, branch picked from the cron as soak.yml does, an issue opened or commented on failure. Refs #643 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
adityamukho
force-pushed
the
feat/643-verifier-v2
branch
from
October 20, 2026 13:32
9ebe170 to
507fce6
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#643 PR 5 (plan steps 19–21): the parser vs grammar verifier on
main, and the nightly job.Changes
src/query/datalog/parser/verifier.rs: v3's verifier, unchanged apart fromSEMANTIC.tests/grammar/grammar.pest: v3's grammar (exact fact and retract fact, reserved list heads,kw_*word boundaries,edn_value_only).fact_too_few_elements.ednandretract_wrong_arity.ednmove toinvalid/syntax/.SEMANTIConmain:PRS-021,PRS-022, andINT-019with two witnesses (window:over ()without:order-by; rule with no body clause).PRS-080/PRS-084/PRS-107don't exist on v2.x.KNOWN_DRIFT: v3's list unchanged. Every entry matches onmain(no stale entry at k = 3 or k = 4).EmptyWherewas already on v3's list..github/workflows/grammar-verifier.yml: nightly k = 4,mainat 05:30 UTC andv3at 17:30 UTC. The branch comes from the cron, as insoak.yml.workflow_dispatchtakesrefandbound. On failure it opens or comments onNightly grammar verifier failure (<branch>). The same file goes tov3in a separate PR.docs/TEST_COVERAGE.md, CLAUDE.md module line, counts.Deviations from the plan
INT-000isn't listed as semantic. Spec §8 saysINT-019andINT-000. No pest-accepted input raisesINT-000at k = 4: once the retract fact is exact, the retract arity (the onlyINT-000site) is a pest rejection. Listing a code needs a witness.INT-019counts as semantic as a whole. So a syntax error codedINT-019that pest accepts isn't caught on v2.x. The verifier's doc comment and CHANGELOG say so.Verification
cargo test: 1315 tests (1306 passing, 9 ignored), 0 failed.MINIGRAF_GRAMMAR_BOUND=4): 331 s wall locally, all 4 tests pass.cargo fmt --check,cargo clippy --all-features -- -D warningsclean.INT-019breadth point above (by design per spec §8). Docs updated to state it.Refs #643
🤖 Generated with Claude Code
https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT