Skip to content

fix: align policy identity normalization with grammar contract - #230

Merged
rlippmann merged 2 commits into
mainfrom
matching_normalization
Aug 6, 2026
Merged

fix: align policy identity normalization with grammar contract#230
rlippmann merged 2 commits into
mainfrom
matching_normalization

Conversation

@rlippmann

Copy link
Copy Markdown
Owner

What changed

  • Narrowed policy identity normalization to:
    • Unicode NFKC normalization
    • apostrophe glyph normalization
    • case-insensitive matching
    • whitespace collapse and trimming
  • Removed leading article stripping for a, an, and the.
  • Removed the English-specific dontdon't rewrite.
  • Promoted the existing spec-target expectations into active conformance coverage.
  • Updated engine, property, step, and state JSON fixtures to preserve distinct policy identities such as:
    • docker and the docker
    • dont and don't

Why

  • The runtime applied language-specific interpretation that was not part of the documented policy identity contract.
  • Article removal and contraction correction belonged to older acquisition-oriented behavior, not deterministic identity normalization in the authority layer.
  • Aligning runtime behavior with the existing grammar specification makes policy identity predictable and keeps the core normalization rules language-neutral.

Checklist

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

@rlippmann
rlippmann merged commit d1d8b91 into main Aug 6, 2026
16 checks passed
@rlippmann
rlippmann deleted the matching_normalization branch August 6, 2026 05:13
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