Skip to content

Fix all-masks overlay CI regression and cover every view - #1599

Closed
shurkanTwo wants to merge 1 commit into
storytold:mainfrom
shurkanTwo:fix/all-masks-overlay
Closed

shurkanTwo wants to merge 1 commit into
storytold:mainfrom
shurkanTwo:fix/all-masks-overlay

Conversation

@shurkanTwo

Copy link
Copy Markdown
Contributor

Summary

cargo xtask ci fails on main (b3d392b4) because Show All Mask Overlays repaints the entire image for each mask. Later masks erase earlier regions in the black/white views and compound tint in the colour views.

- Paint the image separately for each visible mask.
+ Combine matching-size alpha planes with per-pixel maximum.
+ Paint the selected overlay view once.

Also correct the existing hidden-mask assertion: in White on Black, that region becomes black. Missing or mismatched planes continue to leave the image unchanged.

Fixes #1457. Related fixes: #1456 and #1494. This independent alternative includes explicit pixel regressions across all five views, mask order, feathered overlap at 50% opacity, empty coverage, and missing/mismatched planes.

Evidence

  • Before: the original all_masks_overlay_shows_every_visible_mask_at_once test fails (left mask region painted: black instead of white). The new feathered-overlap regression also fails because tint compounds.
  • After: cargo test -p lightcraft-pipeline --lib visualize::tests — 6 passed, 0 failed, including the original regression.
  • Full CI: cargo xtask ci — all 8 steps passed: fmt, Clippy, HEIF, workspace tests, parity, layers, assets, WASM. Run locally on Linux; optional craft-fonts input was not installed.
  • Native headless captures use the same two visible radial masks in White on Black mode. All control requests succeeded, the loupe settled without errors, and inspected frame times were about 1 ms.

Click either image to open its inline viewer.

Before — only the right region painted After — both regions painted
Before After

Merge Danger

Door: Two-way; no settings or file-format changes.

Blast Radius: Overlays. One pipeline file; the corrected painter is shared by CPU and GPU. The union adds one temporary alpha plane while this diagnostic overlay is enabled. Mask adjustments remain independent.

Fix the failing all-masks overlay regression on main by painting the per-pixel maximum alpha once. Correct the hidden-mask background expectation and cover all five views, mask order, overlap, and missing or mismatched planes.

Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@csy2006

csy2006 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Heads up — this is the same #1457 fix as #1494 (which I opened earlier). #1494 now covers the same ground: all five MaskViews, the feathered-overlap union, order-independence, opacity applied once, and the empty/missing-plane cases (plus a test that opacity only affects the colour views). To avoid two PRs for one issue, happy to coordinate — either can be the one that lands.

Omninovas pushed a commit to Omninovas/lightcraft that referenced this pull request Oct 14, 2026
Treat a zero-width feather transition as a hard edge so exact-radius pixels remain unchanged, including at zero opacity. Add actual image regressions for all spot modes, image corners and two clone output sizes.

Validation: both new regressions failed on the original implementation and pass here. Formatting, workspace Clippy, HEIF and a generated-photo app smoke test pass. The unfiltered workspace gate remains blocked by the existing all-masks overlay test tracked by storytold#1599; later parity, layers, assets and WASM stages are pending. This is a source checkpoint, not a green release candidate.

Contributor: @eliets2
@csy2006

csy2006 commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

@shurkanTwo Thanks for landing this — the union-max fix for Overlay::AllMasks (#1457) with full per-view coverage is exactly the regression I was chasing in #1494.

Heads-up so reviewers don't close either as a duplicate: I opened #1494 before main merged the fix (via 5e9a1b6), so I've since narrowed it to test-only — the boundary cases main is still missing (all five MaskViews painted from one union, no-matching-plane leaves the image untouched, opacity only touching the colour views). The two don't overlap on the fix itself; #1494 just adds coverage on top of #1599 / main.

Linking them for traceability. 🤝

@shurkanTwo

Copy link
Copy Markdown
Contributor Author

Thanks, @csy2006, for coordinating and carrying the regression coverage forward. One status clarification: #1599 has not been merged; the production fix landed through #1456 in batch #1682.

I checked the current #1494 diff: it is test-only and includes both regression tests from this PR, plus the additional opacity check. I’m closing #1599 as superseded by #1456 for the fix and #1494 for the follow-up coverage. The cross-references preserve the history and give reviewers one coverage PR to consider.

@shurkanTwo shurkanTwo closed this Oct 14, 2026
bogusyogi pushed a commit to Orthic-Labs/ember that referenced this pull request Oct 14, 2026
Treat a zero-width feather transition as a hard edge so exact-radius pixels remain unchanged, including at zero opacity. Add actual image regressions for all spot modes, image corners and two clone output sizes.

Validation: both new regressions failed on the original implementation and pass here. Formatting, workspace Clippy, HEIF and a generated-photo app smoke test pass. The unfiltered workspace gate remains blocked by the existing all-masks overlay test tracked by storytold#1599; later parity, layers, assets and WASM stages are pending. This is a source checkpoint, not a green release candidate.

Contributor: @eliets2
(cherry picked from commit 3ad5ead)
csy2006 added a commit to csy2006/lightcraft that referenced this pull request Oct 15, 2026
Cross-reference the union-max fix on main (5e9a1b6) and storytold#1599, and spell
out what gap these three tests close so reviewers know they are supplementary
test coverage rather than a competing fix.
eliets2 added a commit to eliets2/lightcraft that referenced this pull request Oct 18, 2026
17 mask regressions pass; formatting and independent review pass.
Full workspace CI remains blocked by the existing all-masks overlay failure on b3d392b (tracked in storytold#1599). Checkpoint backup only; no PR readiness claimed.
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.

Test failure on main: all_masks_overlay_shows_every_visible_mask_at_once paints the left mask black

2 participants