Repository navigation
golden_export: Java GoldenCheck mirrors diff_records (Part of #4052, slice 16) - #8262
Merged
Merged
Conversation
…asets pass (Part of #4052) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
This was referenced Nov 11, 2026
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.
Part of #4052 (slice 16). Follow-up to #8259.
What
The generated
GoldenCheck.javanow mirrorsdiff_recordsfor a dataset whose field layout the golden export carries (slice 15).golden.indexgainsC dd reclenandK dd lo hilines (the byte ranges only a FILLER covers, fromfiller_spans); JavarecordsEqualpairs records in order and requires every byte equal outside those ranges. A FILLER-only dataset no longer fails the unmutated port under prove-mutant.Design: on a same-page dataset a non-FILLER field differs exactly when its bytes differ (equal value with other bytes is a difference too, #3830), so a byte compare outside the FILLER-only ranges gives the Python verdict without porting
decode_field. A FILLER byte that a named field also covers (REDEFINES) stays compared. Never looser than Python: a missing, extra or partial record fails.Class / Sibling gaps
Class: golden-check comparison rules the harness applies that the generated Java check must also apply: exact bytes, C10 zoned-sign equivalence, SYSOUT by lines, record-level (this PR). All four members are now mirrored in Java. Sibling gaps: none: every member handled. Not run against real posttran (needs corpus clone and docker): unit tests with a real JDK only.
Tests
tests/tools/test_golden_export.py::test_the_generated_java_check_compares_records_like_the_python_check: 8 shapes (same, FILLER-only, field, REDEFINES-covered FILLER byte, byte outside layout, short, long, partial record); Java and Python verdicts equal, and only same and FILLER-only pass.Remaining slices
Re-run the golden-verify sweep for posttran with a corpus clone (no file change).
Hand-written files:
tests/tools/golden_export.py,tests/tools/test_golden_export.py(2).🤖 Generated with Claude Code