Skip to content

chore(handbook): drop legacy Maestro screenshots, source from goldens#573

Merged
TaprootFreak merged 5 commits into
developfrom
chore/handbook-drop-maestro-screenshots
May 25, 2026
Merged

chore(handbook): drop legacy Maestro screenshots, source from goldens#573
TaprootFreak merged 5 commits into
developfrom
chore/handbook-drop-maestro-screenshots

Conversation

@TaprootFreak
Copy link
Copy Markdown
Contributor

@TaprootFreak TaprootFreak commented May 25, 2026

Summary

Macht die visual-regression Goldens zur alleinigen Quelle der handbook.realunit.app-Screenshots und räumt die Maestro-Tier-3-Pipeline so auf, dass keine zwei Pipelines mehr auf denselben Pfad schreiben. Bestandsaufnahme vor diesem PR:

  • #541 hat die 57 Goldens eingeführt
  • #568 hat scripts/assemble-handbook-screenshots.sh + handbook-build-check.yaml etabliert; Dockerfile.handbook baut die 26 Slots seither aus test/goldens/screens/ zusammen
  • Aber: die 26 alten Maestro-PNGs lagen weiter unter docs/handbook/screenshots/, hatten gegenüber den Goldens drifted (md5 mismatch auf jedem File), und Tier-3 schrieb seine Captures in genau dieses Verzeichnis — also zwei Pipelines, ein Pfad, mehrdeutige Bedeutung

Was ändert sich

Commit 1 — git rm der 26 duplizierten Maestro-PNGs unter docs/handbook/screenshots/

Commit 2 — Goldens als kanonische Quelle verdrahten

  • .gitignore: docs/handbook/screenshots/ (jetzt reines Local-Preview-Verzeichnis, vom Assemble-Script befüllt)
  • .github/workflows/handbook-deploy.yaml: Path-Trigger um test/goldens/screens/** + scripts/assemble-handbook-screenshots.sh erweitert — Golden-Bumps lösen jetzt einen Deploy aus (das war eine latente Lücke: vorher hat ein Golden-Update den Handbook-Deploy nicht erreicht)
  • Dockerfile.handbook Header bereinigt
  • docs/handbook/README.md: Top-Statement, "Lokal lesen", "Screenshots regenerieren" und "Einen neuen Handbook-Eintrag hinzufügen" auf den golden-driven Workflow umgeschrieben

Commit 3 — Konsistenz-Audit (nach User-Feedback "ich will alles professionell und konsistent")

  • Tier-3-Diagnostik-Captures wandern nach build/handbook-captures/ (klar getrennt vom Local-Preview-Pfad):
    • scripts/run-handbook-flows.sh Header neu geschrieben + SCREENS_DIRCAPTURES_DIR
    • .github/workflows/tier3-handbook.yaml Artifact-Pfad nachgezogen
  • .maestro/handbook/*.yaml (26 Flows): falsche # Captures docs/handbook/screenshots/NN-*.png-Header gegen "Tier-3 navigation smoke; handbook screenshot is the Golden mapped in ..."-Header getauscht
  • README.md Workflow-Tabelle: tier3-handbook.yaml als "navigation/tap-routing smoke" beschrieben mit expliziter Note dass Pixel-Drift Sache von Visual Regression ist
  • docs/testing.md Tier-3-Abschnitt: alte Aussage "uploads docs/handbook/screenshots/ as a build artifact so reviewers can spot visual drift" rausgenommen — Drift gehört den Goldens, Tier-3 catched Tap-Routing/Navigation/Locale/iOS-Build
  • docs/screens.md: "Handbook"-Spalte erklärt jetzt das Golden-Mapping; "Handbook numbering"-Note führt mit Goldens und nennt Tier 3 als parallelen Smoke
  • docs/handbook/de/index.html: Hero-Lede + #architecture-Section komplett umgeschrieben, Pipeline-Diagramm jetzt page-edit → --update-goldens auf dfx01 → commit → handbook-deploy.yaml; Meta-Description nachgezogen
  • scripts/assemble-handbook-screenshots.sh Header: Wort "legacy" raus — docs/handbook/screenshots/ ist jetzt explizit das Local-Preview-Ziel

Commit 4 — Subagent-Code-Review-Findings adressiert

  • docs/handbook/de/index.html: Typo "committee Repo" → "eingecheckte Repo" (rendert auf handbook.realunit.app)
  • .github/workflows/tier3-handbook.yaml: "Why no pixel-diff" + "Why iPhone 17" Header-Kommentare neu gefasst — Pixel-Drift jetzt explizit Visual-Regression-Job zugeordnet; iPhone-17-Begründung jetzt über Tap-Koordinaten + Safe-Area-Assertions statt der stalen Screenshot-Capture-Begründung
  • scripts/assemble-handbook-screenshots.sh: Beispiel-Pfad in Header präzisiert (../screenshots/... statt screenshots/...)
  • docs/handbook/README.md: Anglizismus "Page-Render" → "Seitenrendering"

Bewusst akzeptiertes Trade-off

Der handbook-deploy.yaml-Path-Trigger feuert bei jeder Änderung unter test/goldens/screens/** — also auch bei den 9 Feature-Verzeichnissen, die NICHT in die 26 Handbook-Slots mappen (buy/, sell/, kyc/, hardware_connect_bitbox/, receive/, sell_bitbox/, debug_auth/, …). Über-Trigger statt fehlende Trigger ist hier bewusst gewählt: die Mapping-Tabelle in assemble-handbook-screenshots.sh zu duplizieren wäre Wartungslast bei jeder Handbook-Erweiterung; ein concurrency: handbook-deploy, cancel-in-progress: false-Block serialisiert die Deploys, und das Image-Build ist <10 s + ~30 s Rollout. Worst case sind 1-2 unnötige Deploys pro Sprint — billiger als ein stiller Drift wenn jemand das Mapping erweitert und den Trigger vergisst.

Verifiziert

  • bash scripts/assemble-handbook-screenshots.sh /tmp/x → 26/26 PNGs sauber aus den committeten Goldens assembliert (keine fehlenden Sources)
  • python3 yaml.safe_load(...) auf alle berührten Workflows → OK
  • bash -n auf beide Scripts → OK
  • grep "Captures docs/handbook/screenshots" → null Treffer im ganzen Repo
  • Mapping ↔ Goldens-Existenz: 26/26 ✅ · Mapping ↔ Maestro-Flow-Existenz: 26/26 ✅ · Semantischer Cross-Check Maestro-Assertion ↔ Golden-Inhalt: matched bei allen 26
  • Subagent-Code-Review (general-purpose Agent, model: opus): keine BLOCKER/MAJOR; 3 MINORs + 2 NITs gefunden, alle in Commit 4 adressiert
  • CI auf Commits 2 + 3: Analyze & Test ✅ · Coverage Floor Gate ✅ · Visual Regression ✅ · BitBox quirks audit ✅ · Build handbook image + container smoke ✅
  • Tier-3 (Maestro handbook flows): Run 26397845244 auf Commit 3 läuft (Label tier3:full gesetzt); Commit 4 triggert eine neue Runde

Out of scope

  • Reduktion oder Abschaffung von tier3-handbook.yaml selbst — Tier 3 behält unique Wert als Navigation/Tap-Routing-Smoke + iOS-Build-/Install-Smoke + de_CH-Locale-Check. Separater Follow-up, sobald die Screenshot-Entkoppelung einen Release-Zyklus in PRD läuft.

Manual test plan

  • Nach Merge: handbook-deploy.yaml triggert auf den Merge-Commit
  • Auf dev-handbook.realunit.app: 3 repräsentative Screenshots (01-welcome.png, 12-settings.png, 26-terms.png) sind die Golden-Versionen, nicht die alten Maestro-Captures
  • Nach einem späteren Golden-Bump auf eine der gemappten Pages: Handbook-Deploy feuert tatsächlich (war vorher silent)
  • Nach einem späteren Tier-3-Run: Artifact handbook-captures enthält PNGs aus build/handbook-captures/, nicht aus docs/handbook/screenshots/

The 26 PNGs under docs/handbook/screenshots/ were Maestro Tier-3 captures
that have been redundant since PR #541 introduced visual-regression
goldens for every page. scripts/assemble-handbook-screenshots.sh and
Dockerfile.handbook already assemble the deployed handbook image from
test/goldens/screens/, so the committed PNGs are pure duplication and
diverge from the live goldens (md5 mismatch).

- git rm the 26 docs/handbook/screenshots/*.png
- .gitignore docs/handbook/screenshots/ (local-preview-only directory)
- handbook-deploy.yaml: add test/goldens/screens/** and
  scripts/assemble-handbook-screenshots.sh to the path-trigger so a
  golden bump actually rebuilds the handbook
- Dockerfile.handbook header: drop the obsolete "legacy directory still
  copied" note
- docs/handbook/README.md: replace the "scripts/run-handbook-flows.sh
  regenerates screenshots" workflow with the golden-driven one; rework
  "Einen neuen Handbook-Eintrag hinzufügen" around the goldens +
  assemble-script mapping; preserve the Maestro-flow guidance as
  optional Tier-3-smoke section
Follow-up to the previous commit's PNG removal:

- .gitignore: docs/handbook/screenshots/ — local preview output only,
  populated by scripts/assemble-handbook-screenshots.sh
- handbook-deploy.yaml path-trigger: add test/goldens/screens/** and
  scripts/assemble-handbook-screenshots.sh so a golden bump rebuilds
  the handbook (otherwise a screenshot update would be invisible to
  the deploy pipeline)
- Dockerfile.handbook header: drop the obsolete "legacy directory
  still copied" note
- docs/handbook/README.md: rewrite "Lokal lesen" + "Screenshots
  regenerieren" around the golden-driven workflow; rework "Einen
  neuen Handbook-Eintrag hinzufügen" around the goldens + assemble-
  script mapping; preserve the Maestro-flow guidance as an optional
  Tier-3-smoke sub-section
@TaprootFreak TaprootFreak marked this pull request as ready for review May 25, 2026 10:53
…eview dir

Follow-up audit on the screenshot-source decoupling. The first two commits
removed the duplicate Maestro PNGs and rewired the deploy trigger, but
`docs/handbook/screenshots/` was still doing double-duty: golden-assembly
preview output AND Tier-3 diagnostic capture sink. Two pipelines writing
to the same path is exactly the ambiguity this PR is meant to remove.

- scripts/run-handbook-flows.sh: capture sink moves to build/handbook-captures/
  (renamed SCREENS_DIR → CAPTURES_DIR, rewrote the script header to describe
  Tier-3 navigation smoke + diagnostic capture, not "re-capture every
  handbook screenshot")
- .github/workflows/tier3-handbook.yaml: artifact path follows the script
- .maestro/handbook/*.yaml (26 flows): rewrite the "# Captures docs/handbook/
  screenshots/NN-*.png" header to point at the Golden mapping +
  build/handbook-captures/ as the local capture target
- README.md: tier3-handbook.yaml row now says "navigation/tap-routing smoke"
  with explicit note that pixel drift is owned by Visual Regression
- docs/testing.md Tier-3 section: drop the "uploads docs/handbook/screenshots/
  as a build artifact so reviewers can spot visual drift" line — Goldens own
  drift now; Tier-3 catches tap-routing, navigation, locale, iOS-build only
- docs/screens.md: "Handbook" column header explains the Golden mapping +
  "Handbook numbering" note rewritten to lead with Goldens, Tier 3 as parallel
- docs/handbook/de/index.html: rewrite the hero lede and `#architecture`
  section around the Golden source; new pipeline diagram is page-edit →
  --update-goldens on dfx01 → commit → handbook-deploy.yaml; meta description
  updated
- scripts/assemble-handbook-screenshots.sh header: drop "legacy" wording —
  docs/handbook/screenshots/ is now an explicit local-preview target, not a
  vestigial path

Verified:
- bash scripts/assemble-handbook-screenshots.sh /tmp/x → 26/26 PNGs assembled
- python3 yaml.safe_load on all three modified workflows → OK
- bash -n on both scripts → OK
- grep for stale "Captures docs/handbook/screenshots" refs → zero hits
@TaprootFreak TaprootFreak added the tier3:full Opt-in: run Tier 3 Maestro handbook flows on this PR label May 25, 2026
- docs/handbook/de/index.html: typo "committee Repo" → "eingecheckte Repo"
  (renders on handbook.realunit.app — fixed before deploy)
- .github/workflows/tier3-handbook.yaml: rewrite the "Why no pixel-diff"
  + "Why iPhone 17" header comments. Pixel drift is now explicitly owned
  by the Visual Regression job; the iPhone-17 rationale now references the
  tap-coordinate + safe-area-assertion coupling of the flows rather than
  the stale "screenshots captured on it" reason.
- scripts/assemble-handbook-screenshots.sh: clarify the example src path
  is `../screenshots/NN-name.png` (relative from docs/handbook/de/).
- docs/handbook/README.md: replace Anglizismus "Page-Render" with
  "Seitenrendering".

The accepted trade-off — handbook-deploy.yaml path-trigger fires on any
test/goldens/screens/** change, including the 9 non-handbook feature
dirs — stays as cheap insurance against missed deploys. Documented in
the PR body. Build cost is bounded by `concurrency: handbook-deploy,
cancel-in-progress: false`.
- docs/handbook/de/index.html:603: golden count 57 → 68 (the 57 was the
  rendered-page count from PR #541's description; the actual PNG count
  under test/goldens/screens/ is 68 — verified via `find`). Renders on
  handbook.realunit.app, same risk class as the round-1 typo fix.
- docs/handbook/de/index.html:638: rephrase Tier-3 / Goldens linking —
  previous wording read as if Tier-3 itself were documented in
  visual-regression-tests.md. Now: Tier-3 catches the smoke part inline,
  visual-regression-tests.md is the Goldens reference.
- .github/workflows/tier3-handbook.yaml:3-5: stale top-of-file header
  sentence updated — "uploads the captured PNGs as a build artifact"
  is now "uploads the per-flow diagnostic captures … for forensic
  inspection", with forward-reference to the "Why no pixel-diff here"
  section that owns the full explanation.
@TaprootFreak TaprootFreak merged commit b311bf3 into develop May 25, 2026
6 checks passed
@TaprootFreak TaprootFreak deleted the chore/handbook-drop-maestro-screenshots branch May 25, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tier3:full Opt-in: run Tier 3 Maestro handbook flows on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant