Skip to content

Preserve source navigation list gaps#618

Merged
chubes4 merged 1 commit into
trunkfrom
fix/617-navigation-list-gap
Jul 16, 2026
Merged

Preserve source navigation list gaps#618
chubes4 merged 1 commit into
trunkfrom
fix/617-navigation-list-gap

Conversation

@chubes4

@chubes4 chubes4 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the resolved gap from a direct navigation list child when the outer navigation does not define blockGap.
  • Keep an explicit outer navigation gap authoritative.
  • Add deterministic contract coverage for zero-gap projection and outer-gap precedence.

Closes #617
Relates to Automattic/static-site-importer#489

How to test

  1. Run composer --working-dir=php-transformer test. Confirm all unit and contract checks, 235 parity fixtures, and package-install proof pass.
  2. Review the navigation assertions in php-transformer/tests/contract/run.php. Confirm a direct list gap of 0 is projected and an explicit outer navigation gap retains precedence.
  3. Run git diff --check origin/trunk...HEAD. Confirm it exits successfully with no whitespace errors.

Backwards compatibility

Backwards compatible for callers. Existing outer navigation blockGap remains authoritative; output changes only when a direct list child supplies spacing that was previously dropped.

Evidence bounds

  • Change kind: Runtime fix
  • Discriminator: A direct navigation list child has an explicit computed gap while the outer navigation has no mapped blockGap.
  • Nearby contract preserved: Explicit outer navigation blockGap retains precedence.
  • Why this is bounded: The change reads only the direct list child used as core/navigation content and only supplies blockGap when the outer navigation did not already define one.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode with openai/gpt-5.6-sol
  • Used for: Investigated the visual parity defect and drafted the implementation and tests; Chris reviewed and owns the change.

@chubes4
chubes4 merged commit f156020 into trunk Jul 16, 2026
1 check passed
@chubes4
chubes4 deleted the fix/617-navigation-list-gap branch July 16, 2026 23:09
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.

Preserve source list gap on converted core/navigation wrappers

1 participant