Skip to content

refactor: canonicalize directive text boundary - #240

Merged
rlippmann merged 4 commits into
mainfrom
090dev11
Aug 14, 2026
Merged

refactor: canonicalize directive text boundary#240
rlippmann merged 4 commits into
mainfrom
090dev11

Conversation

@rlippmann

@rlippmann rlippmann commented Aug 14, 2026

Copy link
Copy Markdown
Owner

What changed

  • canonicalized CanonicalDirective.text as a computed property derived from kind and operands
  • updated grammar docs, API contract fixtures, and grammar tests so directive text is treated as canonical serialized syntax rather than preserved caller input
  • fixed normalization and replacement property generators so they only assert on true normalized-key equivalence and canonical replacement inputs
  • added focused grammar coverage for the unsupported canonical-serialization kind branch to bring grammar coverage to 100%

Why

  • CanonicalDirective is a public grammar object, so its surface should reflect semantic canonical serialization rather than historical parser provenance
  • property-based engine tests should use the actual normalization and grammar rules as their oracle instead of relying on looser assumptions
  • the grammar module is intended to be a tightly specified boundary, and fuller coverage helps keep that contract stable in CI

Checklist

  • pre-commit run (uv run pre-commit run --all-files)
  • tests pass (uv run pytest)

@rlippmann rlippmann changed the title refactor: harden canonical directive boundary refactor: canonicalize directive text boundary Aug 14, 2026
@rlippmann
rlippmann merged commit 03d2e3f into main Aug 14, 2026
16 checks passed
@rlippmann
rlippmann deleted the 090dev11 branch August 14, 2026 22:24
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