Skip to content

Truncate browser context hardwareConcurrency value#1446

Merged
Jethro Nederhof (jethron) merged 1 commit intorelease/4.6.6from
fix/AISP-629-trunc-hwc
Aug 19, 2025
Merged

Truncate browser context hardwareConcurrency value#1446
Jethro Nederhof (jethron) merged 1 commit intorelease/4.6.6from
fix/AISP-629-trunc-hwc

Conversation

@jethron
Copy link
Copy Markdown
Contributor

We have received reports of some UAs providing this value as a floating point rather than integral value (contrary to the web standards). This causes events from those agents to be invalid because the schema requires it to be an integer. To meet the documented behavior and schema expectations, floor the value to ensure it is a whole integer. If the UA doesn't have this value, Math.floor should return NaN which we will turn into undefined to exclude from the event. This will also occur with '0', which shouldn't be a valid value according to the standard anyway so is deemed acceptable.

Issue: AISP-629

We have received reports of some UAs providing this value as a floating point rather than integral value (contrary to the web standards). This causes events from those agents to be invalid because the schema requires it to be an integer. To meet the documented behavior and schema expectations, floor the value to ensure it is a whole integer. If the UA doesn't have this value, Math.floor should return NaN which we will turn into undefined to exclude from the event. This will also occur with '0', which shouldn't be a valid value according to the standard anyway so is deemed acceptable.

Issue: AISP-629
@jethron Jethro Nederhof (jethron) merged commit d395c12 into release/4.6.6 Aug 19, 2025
5 of 6 checks passed
@jethron Jethro Nederhof (jethron) deleted the fix/AISP-629-trunc-hwc branch August 19, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants