Repository navigation
client: --value numbers in decimal only; refuse decimals too large for a number - #12
Merged
Merged
Conversation
…mber refused 0x1p3, Inf, NaN and 1_000 were read as numbers by strconv.ParseFloat; JSON has no such numbers, so they are text now, which OpenADR allows a value to be. A decimal no float64 holds, such as 1e400, was sent as text; it exits 3 invalid_input now. Points follow the same rule. v0.5.1 notes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to v0.5.0. Prepares v0.5.1.
--valueand--attributetreated anythingstrconv.ParseFloataccepts as a number, and quietly sent a number it could not hold as text:0x1p3Inf,NaN1_0001e400invalid_input0.35,-2,.5,1E5,true,1:2A number is now written in decimal, as JSON writes numbers. Anything else is text, which the OpenADR 3
valuesMapschema allows a value to be. The parts of anx:ypoint follow the same rule. CSV input was already parsed as JSON by go-openadr'stimeline.ReadCSV, so it does not change.Verified locally:
make check(coverage 94.6%) andmake e2e.FuzzFlagValues, now also checking that no NaN or Inf number comes out.scripts/interop.shandscripts/interop301.shagainst openadr-interop v0.6.3.The guide, docs/exitcodes.md and RELEASE.md are updated.
🤖 Generated with Claude Code