Skip to content

test(minesweeper): strict .image for content snapshot suites (#487, #517) - #586

Merged
wei18 merged 2 commits into
mainfrom
feat/517-487-snapshot-text-gate
Jun 21, 2026
Merged

wei18 merged 2 commits into
mainfrom
feat/517-487-snapshot-text-gate

Conversation

@wei18

@wei18 wei18 commented Jun 21, 2026

Copy link
Copy Markdown
Owner

What

Minesweeper used .tolerantImage (0.95/0.95) for all snapshot suites — including content views (Completion / DailyHub / Home). That loose tolerance absorbed entire new labels (#487: a Failed badge shipped against stale baselines, suite stayed green), and the _subtreeDescription structure-gate added to compensate is vacuous for scroll-hosted content (#517: CompletionView collapses into an empty DocumentView).

Fix (mirrors Sudoku, already strict for content)

Flip MS content suites (Completion / DailyHub / Home) to the default strict .image (precision 1.0) so adding a visible element changes pixels and fails without re-record — closing #487's acceptance and #517 (Completion now caught by strict pixels). AA-heavy board suites (MinesweeperBoard*, terminal overlay) keep .tolerantImage (strict false-fails on dozens of antialiased cells, per the 0.99 calibration history).

Existing content baselines pass bit-exact (no re-record). SCOPE doc notes updated in both SnapshotConfigs.

Investigation note

Spiked headless text extraction via the accessibility tree (the general fix that would catch new labels in scroll content) — it's empty on both bare and windowed NSHostingView (SwiftUI builds AX lazily, needs an AX client). So AX extraction is a dead end; strict pixels on content is the chosen fix.

Tests / review

MinesweeperKit 177/177 (content strict + boards tolerant). SwiftLint clean. Single-Sonnet CR: ship (confirmed classification, verified BoardTerminalOverlay correctly stays tolerant as a composition-guard whose text is covered by the strict Completion suite; trimmed a doc comment for file-length margin).

The assertViewStructure structure-gate on DailyHub/Home is now redundant with strict pixels (kept as a harmless card-list secondary; removal is a follow-up cleanup).

Closes #487, closes #517.

🤖 Generated with Claude Code

wei18 and others added 2 commits June 21, 2026 23:08
)

Minesweeper used .tolerantImage (0.95/0.95) for ALL snapshot suites, incl.
content views (Completion / DailyHub / Home). That loose tolerance absorbed
entire new labels (#487: a Failed badge shipped against stale baselines, suite
still green) and the view-structure gate is vacuous for scroll-hosted content
(#517: Completion content collapses into an empty DocumentView).

Fix mirrors Sudoku (already strict for content): flip Completion / DailyHub /
Home to the default strict `.image` (precision 1.0) so adding a visible element
changes pixels and FAILS without a re-record. AA-heavy BOARD/grid suites
(MinesweeperBoard*, terminal overlay) keep .tolerantImage — strict false-fails
on dozens of antialiased cells (per the 0.99 calibration history). Existing
content baselines pass bit-exact (no re-record needed). Doc/SCOPE notes updated
in both SnapshotConfigs.

Verified: MinesweeperKit 177/177 (content strict + boards tolerant). The
structure-gate on DailyHub/Home is now redundant with strict pixels (kept as a
harmless card-list secondary; removal is a follow-up cleanup).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@wei18
wei18 merged commit 603fe7e into main Jun 21, 2026
4 checks passed
@wei18
wei18 deleted the feat/517-487-snapshot-text-gate branch June 21, 2026 15:26
wei18 added a commit that referenced this pull request Jun 24, 2026
…ec (#600)

* docs(skills): sync skill set with shipped GC pipeline / snapshot / l10n / mise work

Reconcile .claude/skills against what shipped in the #579 GameCenter-pipeline +
test-infra/L10n hardening session:

- telemetry-facade-pattern: add the "wiring traps" the #579 dual-Sonnet CR
  surfaced — existing-but-unwired sink = dead code, read/write sink ordering,
  non-blocking I/O on the gameplay completion path (DeferredSink late-binding),
  and "the sink firing != the terminal GameKit call working" (device-gate it).
- swift-testing-baseline: add the snapshot-gate strategy (#586) — strict .image
  for content suites / .tolerantImage for AA-heavy board suites, baselines are
  truth (red = behavior changed, do not re-record), and the headless AX
  text-extraction dead end.
- ai-translated-localization + mise-task-operations: document the scan:l10n
  shared-code dotted-key gate (#594) and its two blind spots (a required key
  being absent; pre-#594 shared-target keys), plus the xcstrings text-splice
  footgun.
- mise-tool-management: add the macOS-only-tool os-guard deviation (#597) —
  unguarded macOS tools fail mise install on Linux CI before any gate runs.
- game-factory-composition (new): codify the SDD-005 shipped composition
  template — GameConfig + makeGameApp backbone, <Game><Concern> naming, shared
  Home/DailyHub-skeleton/board-redirect/GC-dashboard, capabilities-are-universal,
  and the 5x "audit the real code, the spec's near-identical claim is optimistic"
  lesson; index it in README x2 + cross-link from swiftpm-modularization.

Docs only; no runtime change.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

* docs(spec): apple-dev-skills shared-plugin extraction design

Design for extracting the 26 portable skills into a separate apple-dev-skills
repo packaged as a Claude Code skills-directory plugin, consumed back here as a
git submodule under .claude/skills/apple-dev-skills/ (namespaced
apple-dev-skills:<skill>); the 8 project-bound skills stay flat. Includes the
verified depth-1/plugin-namespace discovery mechanics, the move/stay
classification, the genericize-during-move principle, cross-ref rewrite, and the
history-preserving git filter-repo migration. Awaiting writing-plans.

Co-Authored-By: Claude Opus 4.8 <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 <[email protected]>
wei18 added a commit that referenced this pull request Jul 8, 2026
The #723 banner-reserved fixtures captured BannerSlotView's live
ProgressView, whose indeterminate spin animation is timing-dependent —
#714 verification found pixel drift on an unmodified commit across
worktree runs. Add a `bannerSlotLoadingPreview` environment override on
BannerSlotView (default nil, production spinner unchanged) so these
fixtures can inject a static placeholder from outside the view tree,
and keep the existing `.tolerantImage` (#586 board-suite convention) as
a second line of defense. Re-recorded the 4 affected PNGs (MS + Sudoku,
light + dark); each filter passed 3 consecutive local runs.

closes #732

Co-authored-by: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant