Skip to content

✨ Normalize grouped build context#315

Merged
Robdel12 merged 2 commits into
mainfrom
rd/grouped-build-context
Jul 22, 2026
Merged

✨ Normalize grouped build context#315
Robdel12 merged 2 commits into
mainfrom
rd/grouped-build-context

Conversation

@Robdel12

Copy link
Copy Markdown
Contributor

Why

Build context can arrive as either legacy flat comparisons or the API's grouped visual-review response. The human CLI currently understands only the flat shape, so grouped builds can hide review aggregates, variants, and failed captures even though the API returned those facts.

Approach

Use one normalization boundary for human build output. Explicit API aggregates remain authoritative—including false and 0—and missing values stay unknown unless the response contains the complete underlying data needed for an exact derivation.

The normalized records retain current, baseline, and diff asset identity; render dimensions and metadata; canonical review state; failed-capture errors; and compact Honeydiff evidence. Human output now presents screenshot groups in API order and reports failed captures with the evidence that is actually available.

Ordinary JSON and full agent JSON still return the raw API response. Compact agent JSON, auth, pagination, ordering policy, and dynamic-content behavior are intentionally unchanged.

Evidence

Coverage exercises complete legacy comparisons, partial grouped responses, aggregate-only groups, explicit false/zero values, missing aggregate facts, and failed captures. It verifies both the pure response contract and the terminal output users see. The full test suite and release-facing build, lint, type, and package checks pass.

Render grouped visual-review and complete legacy comparison responses through one factual adapter. Preserve explicit server aggregates, keep unknown facts absent, and leave raw JSON untouched.
@Robdel12
Robdel12 marked this pull request as ready for review July 22, 2026 02:46
Explain response precedence, completeness requirements, server authority, and the raw JSON boundary where the compatibility logic is defined.
@Robdel12
Robdel12 enabled auto-merge (squash) July 22, 2026 02:51
@Robdel12
Robdel12 merged commit 3ab92a2 into main Jul 22, 2026
28 of 30 checks passed
@Robdel12
Robdel12 deleted the rd/grouped-build-context branch July 22, 2026 02:53
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