Skip to content

feat(errors): PRS-083..PRS-107 replace user-facing INT-019 parse errors (#643) - #648

Merged
adityamukho merged 1 commit into
v3from
feat/643-error-codes
Oct 20, 2026
Merged

adityamukho merged 1 commit into
v3from
feat/643-error-codes

Conversation

@adityamukho

Copy link
Copy Markdown
Collaborator

#643 PR 2 of the plan (docs/superpowers/plans/2026-10-20-643-grammar-verifier.md, steps 1–5). Part of #643; no closing keyword.

What

  • 25 Parser-category codes, PRS-083–PRS-107, for the 24 user-reachable INT-019 sites in parser.rs and the retract arity path. Message text is unchanged except the datalog parser: prefix is gone.
  • parse_retract checks the fact length before Pattern::from_edn, so a retract fact without 3 elements is PRS-090 (was INT-000).
  • The 4 unreachable invariant sites keep INT-019.
  • docs/ERROR_REFERENCE.md: a quick-reference row and a section per code; the INT-019 section now says it is raised only by unreachable invariants and lists what replaced it.
  • CHANGELOG.md Unreleased → Breaking changes (the plan said "Changed"; Unreleased has no such heading). Bindings unaffected (ErrorCode is pub(crate); plan deviation 5).

Tests

tests/error_codes_prs_test.rs: 26 new tests, each running its code's documented example, asserting code, Parser category, argument in the message and no old prefix; three through prepare. 1646 tests (1636 passing, 10 ignored). CI's clippy command and cargo fmt --check clean.

Review

Codex (read-only, on the commit): no defects found.

🤖 Generated with Claude Code

https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT

…rs (#643)

The parser's long-tail syntax and structure errors shared INT-019 with a
"datalog parser: " prefix. Each user-reachable site now has its own
Parser-category code with today's text, and parse_retract checks the fact
arity itself (PRS-090, was INT-000 via Pattern::from_edn). The four
unreachable invariant sites keep INT-019. ERROR_REFERENCE.md gets a row
and section per code; the INT-019 section lists what replaced it.

Plan steps 1-5 of docs/superpowers/plans/2026-10-20-643-grammar-verifier.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019kY61Y11gcRD91Y6b7jbGT
@adityamukho
adityamukho merged commit ff4e226 into v3 Oct 20, 2026
24 checks passed
@adityamukho
adityamukho deleted the feat/643-error-codes branch October 20, 2026 11:08
@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant