xprof: name the type of each integer component parameter - #547
Merged
Merged
Conversation
TApplencourt
force-pushed
the
fix-timeline-offset-type
branch
from
September 21, 2026 22:21
d23fe18 to
e59cf72
Compare
A component parameter's type is declared in its `*_params.yaml`, but Ruby has a single Integer type, so `BTValue.from_value()` has to guess which `bt_value` to build: it picks unsigned above 2**63 and signed below it, whatever the component actually expects. That guess is wrong for the timeline's `offset`, declared `integer_unsigned` and read into a `uint64_t`: every realistic value is below 2**63, so it was sent as a signed value. metababel 1.1.4 generated no type check, so it went unnoticed; 2.0.0 validates the type and rejects it: Bad value for command line argument 'offset' the value must be 'integer_unsigned'. Both of THAPI's integer parameters now name the type their model declares, through the `BTValue` passthrough `from_value()` already offers. The tally's `display_name_max_size` is unchanged in behaviour -- signed is what the guess happened to pick -- but it no longer depends on the guess being right. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TApplencourt
force-pushed
the
fix-timeline-offset-type
branch
from
September 21, 2026 22:23
e59cf72 to
bff17c1
Compare
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.
A component parameter's type is declared in its
*_params.yaml, but Ruby has a single Integer type, soBTValue.from_value()has to guess whichbt_valueto build: it picks unsigned above 2**63 and signed below it, whatever the component actually expects.That guess is wrong for the timeline's
offset, declaredinteger_unsignedand read into auint64_t: every realistic value is below 2**63, so it was sent as a signed value. metababel 1.1.4 generated no type check, so it went unnoticed; 2.0.0 validates the type and rejects it:Bad value for command line argument 'offset' the value must be
'integer_unsigned'.
Both of THAPI's integer parameters now name the type their model declares, through the
BTValuepassthroughfrom_value()already offers. The tally'sdisplay_name_max_sizeis unchanged in behaviour -- signed is what the guess happened to pick -- but it no longer depends on the guess being right.