Skip to content

Assert the widened unix as a Long (#869 follow-up) - #1484

Merged
ryanbr merged 1 commit into
mainfrom
fix/oracle-unix-long-assertion
Aug 20, 2026
Merged

Assert the widened unix as a Long (#869 follow-up)#1484
ryanbr merged 1 commit into
mainfrom
fix/oracle-unix-long-assertion

Conversation

@ryanbr

@ryanbr ryanbr commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Follow-up to #869 (@vishk23), which widened the decoded unix from Int to Long.

That widening is the whole point of it: a u32 with bit 31 set narrowed to a negative Int on Kotlin, and the #547 plausibility gate then dropped the record — silently losing all history from 2038-01-19, and today on a future-dated strap.

UnmappedHistoricalLayoutTest asserts the decoded value with an Int literal, so assertEquals compared Integer against Long and failed on the box. Same number, wider type; the literal needs the L.

Nobody missed this

#869's own Android CI passed on 2026-07-29. The test it trips was created by #1101 on 2026-08-06 — eight days later. Git merges the two cleanly because the conflict is semantic, not textual: a new test asserting the type the older PR changes.

Neither the PR's green checks nor a clean merge can reveal that. Only building the merge result does — worth remembering for the other long-lived PRs in the queue.

Verification

Full Android unit suite: 4146 tests, 0 failures. UnmappedHistoricalLayoutTest 6.

#869 widened the decoded `unix` from Int to Long, which is the point of it: a
u32 with bit 31 set narrowed to a NEGATIVE Int on Kotlin, and the #547
plausibility gate then dropped the record - silently losing all history from
2038-01-19, and today on a future-dated strap.

UnmappedHistoricalLayoutTest asserts the decoded value with an Int literal, so
assertEquals compared Integer against Long and failed on the box. Same number,
wider type; the literal needs the L.

Nobody missed this. #869's own Android CI passed on 2026-07-29, and the test it
trips was created by #1101 on 2026-08-06 - eight days later. Git merges the two
cleanly because the conflict is semantic, not textual: a new test asserting the
type the older PR changes. Neither the PR's checks nor a clean merge can show
it, only building the merge result.

Verification: full Android unit suite 4146 tests, 0 failures;
UnmappedHistoricalLayoutTest 6.
@ryanbr
ryanbr merged commit 59c9571 into main Aug 20, 2026
3 checks passed
@ryanbr
ryanbr deleted the fix/oracle-unix-long-assertion branch August 20, 2026 07:51
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