Skip to content

v1.4: recover bare parent transform pairs in C_livery - #27

Draft
Datamining00 wants to merge 4 commits into
v1.4-baseline-warning-renderfrom
v1.4-bare-parent-transform-fix
Draft

v1.4: recover bare parent transform pairs in C_livery#27
Datamining00 wants to merge 4 commits into
v1.4-baseline-warning-renderfrom
v1.4-bare-parent-transform-fix

Conversation

@Datamining00

@Datamining00 Datamining00 commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Fix derivative of v1.4-baseline-warning-render, based on the real-save raw transform trace from Livery_0343_20260812130034 / C_livery.

Proven root cause

Immediately before the anomalous Right-side text group, the raw stream contains a sane 16-byte transform (x=-373.5, y≈4.0, scale=1, rotation=0) followed directly by the extended livery child-transform marker 00 02 00 01 00 00 00 03.

The pinned decoder did not recognize that bare parent transform. It therefore walked through those 16 bytes as control bytes, leaked an internal 0xff float byte into pending_flags, and then attached the following text groups directly to the Right section root. This explains both the observed flags=0xff anomaly and the missing outer placement transform.

The next two child groups are the rear text groups previously identified as FLAMEHAZE and THOSEWHOHUNTANDDESTROY; treating the bare transform as the existing two-child implicit transform-pair grammar moves those groups to the rear body location instead of over the character.

Fix

  • Add a conservative decoder patch that recognizes a bare 16-byte parent transform only when:
    1. the parser state is clean;
    2. the current bytes are not already a shape/logo/group;
    3. the 16-byte transform is finite/plausible;
    4. it is followed immediately by the exact extended FH6 child-transform marker; and
    5. the pinned read_livery_transform parser independently proves the following child group boundary.
  • The recovered parent is represented as a two-child implicit_bare_transform_pair, matching the decoder's existing implicit transform-pair ownership model.
  • No layer reversal, source-offset sort change, mask policy change, projection change, or hard-coded car/section/phrase/offset is used.
  • Render cache revision is bumped so corrected transforms cannot reuse stale PNGs.

Validation

  • Synthetic regression coverage verifies candidate detection, two-child ownership, composed final coordinates, and app wiring.
  • Windows CI: success.
  • Full regression suite: 168 tests, OK.
  • PyInstaller one-file build: success.
  • EXE SHA-256: 740fed2d1e87a3e3dab1ef413aa91d9d71af5de87753ef3b2a4dc839ef210710.
  • Artifact ZIP SHA-256: 52e70e4d4996a00f178adf052b9407d989aceca68365f79b77d191529e33abc6.

This PR remains draft until the supplied real livery is visually validated with the fix-test EXE.

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