From d925c71e3fa73e4d575a2d56a519bf794ffbc91e Mon Sep 17 00:00:00 2001 From: Felipe Date: Tue, 28 Apr 2026 01:55:47 -0300 Subject: [PATCH] fix(ci): pin COLUMNS=80 to stabilize visual snapshot tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test/visual/tui-snapshot.test.tsx renders OpenTUI components without forcing an explicit terminal width — OpenTUI auto-detects from $COLUMNS. Local developer terminals default to 80 cols (where the committed snapshots were originally captured); Blacksmith CI runners default to ~100+ cols, producing wider card borders that break every visual snapshot diff. Diagnosis: identical failure pattern across 3 unrelated open PRs (#1432 channel-envelope, #1435 partition-default-drain, #1440 tui-overlay-narrow-pane) — all fail the same 5 visual snapshot tests plus the same Quality Gate umbrella job. Code in those PRs is fine; the env was inconsistent between snapshot capture and CI render. Snapshot diff signature: - ╭──── 80 chars ────╮ (left-padded, expected) + ╭──── 100+ chars ────╮ (unpadded, actual) Fix: pin COLUMNS=80 at the workflow level so every step in every job (unit-tests > Visual regression, pg-tests > Test) inherits the same render width as the snapshots. After this lands, the 3 open PRs should rerun CI green via rebase or re-push trigger. Future visual tests inherit the pin without per-step plumbing. --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c37c9502..4457aa765 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,20 @@ concurrency: group: ci-${{ github.ref }} cancel-in-progress: true +# Pin terminal width for the test process. test/visual/tui-snapshot.test.tsx +# (and any future visual regression test) renders OpenTUI components without +# forcing an explicit width — OpenTUI auto-detects from $COLUMNS. Local +# developer terminals default to 80 cols (snapshots were captured at 80); +# Blacksmith CI runners default to ~100+ cols, which produces wider card +# borders and breaks every visual snapshot. +# +# Pin COLUMNS=80 at the workflow level so every job/step inherits the same +# render width as the snapshots. Both `unit-tests > Visual regression` and +# `pg-tests > Test` run test/visual/* and need the same value, so a single +# workflow-level env is the right scope. +env: + COLUMNS: "80" + jobs: secrets-scan: name: Secrets Scan (GitGuardian)