Repository navigation
Normalise xsd:double text entry answers for Perseus derivation - #6259
Merged
Merged
Conversation
rtibblesbot
marked this pull request as ready for review
October 1, 2026 05:16
rtibblesbot
force-pushed
the
issue-6224-b06411
branch
from
October 1, 2026 05:25
e0f5a3e to
2879106
Compare
5 tasks
Contributor
Author
|
Outside this PR's scope — tracked under #5998:
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly How was this generated?
|
`+5` and `1E3` are valid numeric answers that `extract_value` rejects; strip the sign and lowercase the exponent before deriving. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rtibblesbot
force-pushed
the
issue-6224-b06411
branch
from
October 2, 2026 22:22
2879106 to
3797e73
Compare
rtibbles
approved these changes
Oct 5, 2026
rtibbles
left a comment
Member
There was a problem hiding this comment.
Clear test cases - simple normalization code fix.
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.
Summary
Text entry answers like
+5and1E3are validxsd:doublebutextract_valuerejects them, so Perseus derivation emitted"answers": []._perseus_numberstrips a leading+and lowercasesEwhen the result parses as a finiteextract_valuenumber._derive_textemits the normalised answer, or the original when none exists.INF,NaNand overflow (1e400) have no normalised form.+5%and+1/2also normalise (to5%,1/2), since the check isextract_value, not xsd:double.extract_valuenot widened, to avoid changing legacyinput_questionbehaviour.References
Fixes #6224. Related: #6103, #6150, #6222.
Reviewer guidance
_all_numeric) is not onunstable; once merged it should call_perseus_number.AI usage
Implemented with Claude Code from a pre-approved plan. Verified with TDD and manual review of the generated code.
🤖 Generated with Claude Code
Deviations from the issue spec
INF,NaN) derive a Perseus itemnumeric-inputandextract_valuehave no representation for them@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-10-02 22:23 UTC