Skip to content

Emit the clean decimal multiple, always; require openapi-contract ^0.12.1 (0.15.1) - #131

Merged
rasuvaeff merged 2 commits into
masterfrom
fix/clean-decimal-multiples
Sep 19, 2026
Merged

rasuvaeff merged 2 commits into
masterfrom
fix/clean-decimal-multiples

Conversation

@rasuvaeff

Copy link
Copy Markdown
Owner

Follow-up to openapi-contract#151 / its 0.12.1: multipleOf is judged on the decimals a message spells, so a generated multiple is the clean decimal it means — 64.1, never 64.10000000000001. 0.15.0 emitted that float product wherever the contract's old float path demanded it (from about 64 upward for multipleOf: 0.1), and 0.12.1 rejects the product as the specification does.

  • ScalarArbitraries::multipleOf() is round($k * $m, $decimals) again, with no validator-agreement branch.
  • precise.get in the zoo carries step (multipleOf: 0.1) again; the contract's corpus was re-recorded from it in openapi-contract#153.
  • WireAgreementTest no longer skips the multipleOf datasets under ext-bcmath (the CI runners load it); a 100–200 window over 0.7 joins them.
  • bin/record-openapi-corpus (monorepo) mounts the monorepo root so a path-repository contract records too.
composer build   PASS (978 tests, against openapi-contract 0.12.1 from Packagist)
composer rector  PASS
package-audit    0 errors, 0 warnings

…12.1

The contract judges multipleOf on the decimals a message spells since
0.12.1 (openapi-contract#151): 64.1 is a multiple of 0.1 and
64.10000000000001 is not, on every machine. 0.15.0 emitted that float
product wherever the contract's old float path demanded it, and 0.12.1
rejects it as the specification does. The zoo's precise.get carries a
decimal multipleOf again; the tests that pinned the agreement no longer
skip under ext-bcmath.
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: eb322ec8-1be2-45fe-907e-6ca9e076afec


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rasuvaeff
rasuvaeff merged commit 8aa3fa8 into master Sep 19, 2026
11 checks passed
@rasuvaeff
rasuvaeff deleted the fix/clean-decimal-multiples branch September 19, 2026 16:08
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