Skip to content

golden_export: Java GoldenCheck mirrors diff_records (Part of #4052, slice 16) - #8262

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/4052-20261111T0252Z
Nov 11, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/4052-20261111T0252Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4052 (slice 16). Follow-up to #8259.

What

The generated GoldenCheck.java now mirrors diff_records for a dataset whose field layout the golden export carries (slice 15). golden.index gains C dd reclen and K dd lo hi lines (the byte ranges only a FILLER covers, from filler_spans); Java recordsEqual pairs 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

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 11, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 11, 2026 03:03
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 11, 2026 03:07
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant