Skip to content

fix: expand decimal and cross-kind edge coverage - #40

Merged
aryamantodkar merged 2 commits into
epic/realizer-edge-casesfrom
fix/realizer-edge-cases/decimal
Aug 29, 2026
Merged

fix: expand decimal and cross-kind edge coverage#40
aryamantodkar merged 2 commits into
epic/realizer-edge-casesfrom
fix/realizer-edge-cases/decimal

Conversation

@aryamantodkar

Copy link
Copy Markdown
Contributor

Summary

Expand deterministic realizer coverage for DECIMAL and harden complete-span validation across the previously fixed kinds.

What changed

  • Add a local DECIMAL parser with signed values, point/dot fractions, named scales, scientific notation, grouping and locale separators, Unicode spacing, suffix scales, and parenthesized negatives.
  • Canonicalize decimal values for evaluation equivalence while keeping runtime output stable.
  • Reject malformed decimals, repeated scales, incomplete scientific forms, and unrelated trailing text.
  • Extend CARDINAL sign handling and prevent invalid zero aliases from entering candidate options.
  • Tighten DATE validation for impossible calendar values, eras, Roman years, compact weekday/month forms, quarter syntax, and unrelated suffixes.
  • Validate TIME timezone names and offsets; reject malformed meridiem, separators, prefixes, and suffixes.
  • Preserve MONEY currency identity and complete-span behavior; reject repeated scales and unrelated suffixes.
  • Add complete-span guards for delegated PHONE and ELECTRONIC parsing.
  • Update README, coverage documentation, and public/integration tests.

Invariant

Realizers must consume the complete annotated span and emit only valid runtime candidates. Evaluation equivalence may ignore formatting and representation differences, but must preserve semantic identity such as numeric value, date/time value, and currency.

Validation

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run pytest (6 passed)
  • cargo test --manifest-path rust/Cargo.toml (44 passed)
  • uv build

Dataset evidence

The documented audits cover all available Google shards. Remaining mismatches are malformed, contradictory, or annotation-artifact rows rather than ordinary missing representations.

Target branch: epic/realizer-edge-cases.

@aryamantodkar
aryamantodkar merged commit 9ef4371 into epic/realizer-edge-cases Aug 29, 2026
@aryamantodkar
aryamantodkar deleted the fix/realizer-edge-cases/decimal branch August 29, 2026 07:29
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