test(fuzz): compare an INVALID_DURATION suggestion up to its trailing zeros #294
No reviewers
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram!294
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/fuzz-normalize-duration-suggestion"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fuzz
format-preserves-meaning … at $.warnings[].dataon~{1.30% h}(seed 2474233830, index 19881), dev/1.6 only: theINVALID_DURATIONsuggestion added by #277 quotes the source spelling (1.30 h), like itsmessage, and rule 4 trims the zero (1.3 h). The duration is unread either way: a canonicalization, not a change of meaning.fuzz/src/normalize.ts: forINVALID_DURATIONonly,data.suggestionis compared once its trailing decimal zeros are removed, with the formatter's own rule 4 regex (a fraction's terms and a1,000keep theirs). The field is still compared: any other difference counts. Approved by the maintainer before wideningnormalize.ts.fuzz/tests/normalize.test.ts(zeros only; unit, digits, fraction,1,000and other codes still differ) andfuzz/regressions/277-invalid-duration-suggestion.gram(both fail without the rule).Checks: 4203 pass / 1 skip / 0 fail, conformance 148/148 and 24/24, typecheck, biome, deprecations:check, audit 127, fuzz 50k (seed 2004502776, 0 signature). Independent of #293 (no overlapping file).