Skip to content

xprof: name the type of each integer component parameter - #547

Merged
TApplencourt merged 1 commit into
develfrom
fix-timeline-offset-type
Sep 21, 2026
Merged

TApplencourt merged 1 commit into
develfrom
fix-timeline-offset-type

Conversation

@TApplencourt

Copy link
Copy Markdown
Collaborator

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.

@TApplencourt
TApplencourt force-pushed the fix-timeline-offset-type branch from d23fe18 to e59cf72 Compare September 21, 2026 22:21
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
TApplencourt force-pushed the fix-timeline-offset-type branch from e59cf72 to bff17c1 Compare September 21, 2026 22:23
@TApplencourt
TApplencourt merged commit 7ffe1bd into devel Sep 21, 2026
27 checks passed
@TApplencourt
TApplencourt deleted the fix-timeline-offset-type branch September 21, 2026 22:42
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