Skip to content

fix: treat negative age sentinels as missing - #455

Merged
yakew7 merged 1 commit into
yakew7:mainfrom
be-student:codex/431-negative-age-sentinels
Sep 6, 2026
Merged

fix: treat negative age sentinels as missing#455
yakew7 merged 1 commit into
yakew7:mainfrom
be-student:codex/431-negative-age-sentinels

Conversation

@be-student

Copy link
Copy Markdown
Contributor

Summary

Treats negative numeric and signed-string ages as missing in both profiler engines instead of assigning them to 75+. The shared spec and Python/JavaScript parity coverage now enforce the boundary.

Type

  • Bug fix

Linked issue

Closes #431

Testing

  • python -m pytest tests/ -q (219 passed, 34 skipped)
  • em-dash, link, and Ruff checks

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@be-student is attempting to deploy a commit to the yashkewlani2020-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

@yakew7 @Shreyash0712 @ahmdkaml - new PR touching a path you own, please review.

@yakew7
yakew7 merged commit 42e79fb into yakew7:main Sep 6, 2026
17 of 18 checks passed
yakew7 added a commit that referenced this pull request Sep 6, 2026
PR #455 and #456 both added a new test function at the exact same
insertion point in tests/test_js_parity.py, and the merge that landed
both spliced their bodies together wrong:
test_python_js_profiler_parity_detects_dates_appended_after_numeric_ages
lost its entire body (profile() call, node subprocess, comparison) after
its setup lines, silently passing with zero assertions ever executed -
while test_python_js_profiler_parity_rejects_negative_age_sentinels
picked up an extra, contradictory assertion
(`all(dim["name"] != "age" ...)`) that belongs to the other test and
directly conflicts with its own next line, making it fail outright.

Verified against each PR's original individual commit (f071a2b, 6ed1369)
to reconstruct the correct, complete body for both functions rather than
guessing. Both now pass, restoring real coverage for the date-sampling
fix (#432) that this exact splice had been silently not testing at all.
yakew7 added a commit that referenced this pull request Sep 6, 2026
….2.0)

#439, #440, #441, and #433 (PRs #451-454) shipped with no CHANGELOG entry
at all; #431 and #432 (PRs #455-456) had entries but no by-@handle/PR
credit, unlike every other external contributor's fix in this same
section. All six credited now, same version already shipping.
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.

profiler.py's age-band classifier silently absorbs negative age sentinels into the '75+' band

2 participants