Assert the widened unix as a Long (#869 follow-up) - #1484
Merged
Conversation
#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.
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.
Follow-up to #869 (@vishk23), which widened the decoded
unixfromInttoLong.That widening is the whole point of it: a u32 with bit 31 set narrowed to a negative
Inton 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.UnmappedHistoricalLayoutTestasserts the decoded value with anIntliteral, soassertEqualscomparedIntegeragainstLongand failed on the box. Same number, wider type; the literal needs theL.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.
UnmappedHistoricalLayoutTest6.