Skip to content

docs(push): fix stale TargetSize NOTE — no swap, [width, height] - #153

Merged
saadqbal merged 1 commit into
developfrom
fix/145-targetsize-note-comment
Jul 7, 2026
Merged

docs(push): fix stale TargetSize NOTE — no swap, [width, height]#153
saadqbal merged 1 commit into
developfrom
fix/145-targetsize-note-comment

Conversation

@saadqbal

@saadqbalsaadqbal commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Comment-only fix. The TargetSize field NOTE in internal/push/spec.go still described the old #25/[H,W] behavior:

stored [W, H] here, but EMITTED as [height, width] by Build … buildImage does the swap.

That is wrong on both counts now. buildImage emits [TargetSize[0], TargetSize[1]] = [width, height] with no swap — the state #147 (landed via #149) deliberately reverted to. The stale NOTE contradicted the inline comment right next to the emit and risked a future reader "re-fixing" it back to [H,W], which is exactly what failed every non-square dataset in-cluster.

Ground truth (verified against tracebloc/data-ingestors):

  • ingest.v1.json: target_size is [width, height], "matches PIL.Image.size and what ImageResolutionValidator expects".
  • image_validator.py: img.size is (width, height); compares actual[0]↔expected[0] (width), actual[1]↔expected[1] (height).

Rewrote the NOTE to state stored-and-emitted [width, height], no swap, and warn against re-introducing the swap.

Rolls up under #145/#147 — no new kanban ticket.


Note

Low Risk
Comment-only change to field documentation; no executable code or emitted spec behavior is modified.

Overview
Updates the TargetSize field NOTE on SpecArgs in internal/push/spec.go so it matches current behavior and the ingest contract.

The old NOTE claimed values are stored as [W, H] but emitted as [height, width] with a swap in buildImage. That was outdated after #147: buildImage emits [width, height] with no dimension swap, aligned with ingest.v1 and ImageResolutionValidator (PIL img.size order). The revised NOTE documents stored-and-emitted [width, height], references the mistaken [H,W] swap from PR #22 that broke non-square datasets in-cluster, and warns against re-introducing a swap—consistent with the inline comment beside the emit in buildImage.

No runtime or spec-building logic changes—documentation only.

Reviewed by Cursor Bugbot for commit f26798a. Bugbot is set up for automated code reviews on this repo. Configure here.

…] emit
The TargetSize field NOTE still described the old #25/[H,W] behavior
("EMITTED as [height, width] ... buildImage does the swap"), which #147
(landed via #149) deliberately reverted. buildImage now emits
[TargetSize[0], TargetSize[1]] = [width, height] with no swap — the order
ingest.v1.json documents ("matches PIL.Image.size and what
ImageResolutionValidator expects") and the order image_validator.py
compares against verbatim.
Rewrite the NOTE to state stored-and-emitted [width, height], no swap,
and warn against re-introducing the swap (which failed every non-square
dataset). Comment-only; rolls up under #145/#147.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@saadqbalsaadqbal self-assigned this Jul 7, 2026
@saadqbal
saadqbal merged commit efa84f4 into developJul 7, 2026
20 checks passed
@saadqbal
saadqbal deleted the fix/145-targetsize-note-comment branch July 10, 2026 10:37
Sign up for freeto 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.

2 participants

@saadqbal@LukasWodka