Skip to content

chore(smoke): run smoke:tui for real in GitHub CI - #2489

Merged
cliffhall merged 1 commit into
v2/mainfrom
v2/chore/2408-tui-smoke-in-ci
Sep 24, 2026
Merged

cliffhall merged 1 commit into
v2/mainfrom
v2/chore/2408-tui-smoke-in-ci

Conversation

@cliffhall

Copy link
Copy Markdown
Member

Closes #2408

What changed

smoke:tui self-skipped whenever process.env.CI was set, so CI gave no signal on TUI regressions. This PR removes that skip, so the smoke now runs in the build job's existing npm run smoke step. The workflow's steps are unchanged; only its comments move.

Why removing the skip alone was not enough

The PTY wrapper from #2147 had already removed the original blocker, a headless runner with no TTY, and ubuntu-latest ships util-linux script(1). But with the skip removed, the smoke failed on Linux under CI=true:

  • The TUI entered the alt screen (\e[?1049h) and never painted "MCP Servers", even with a 40s budget.
  • The cause was Ink, not the pty. Ink reads is-in-ci, and when CI or CONTINUOUS_INTEGRATION is set to anything but 0/false it suppresses every interactive frame and writes only the last one on unmount.
  • Bisected in ubuntu:24.04 (util-linux 2.39.3) with the same spawn: CI=true gave 0 marker hits and CI=false gave 1. The pty's 0×0 window size was ruled out: it renders fine unsized.

So the smoke now pins CI: "false" and CONTINUOUS_INTEGRATION: "false" in the child's env. It uses "false" rather than deleting the keys because is-in-ci treats exactly that value as not-CI, whatever else the runner exports.

Verification

  • Linux, same util-linux as ubuntu-latest: in ubuntu:24.04 with CI=true CONTINUOUS_INTEGRATION=true, 3/3 runs smoke:tui OK — rendered "MCP Servers" at ~270ms and was still running 2000ms later. The survival and raw-mode-error assertions from smoke:tui reports success for a TUI that crashed: it asserts first paint, not survival #2147 still apply.
  • macOS: npm run local:gate passed (EXIT=0), including smoke:tui OK.
  • The first real proof on a GitHub runner is this PR's own build job.

Docs

Everything that described smoke:tui as local-only or self-skipping is updated: docs/quality-gate.md (the canonical CI-vs-local split), the pre-push-gate skill, AGENTS.md, README.md, clients/launcher/README.md, and the workflow-gate header and test name. The local gate now has one local-only step (Firefox) where it had two.

The publish job's comment is also corrected: it claimed smoke:tui self-skipped inside pack:verify, but pack:verify only runs --tui --help.

No screenshots: this changes CI and smoke tooling, not the TUI itself.

🤖 Generated with Claude Code

Drop the process.env.CI self-skip, which left the TUI with no end-to-end
CI signal. The PTY from #2147 already removed the TTY blocker, and
ubuntu-latest ships util-linux script(1).

Removing the skip alone is not enough: Ink detects CI via is-in-ci and
suppresses every interactive frame, so under CI=true the TUI enters the
alt screen and paints nothing (verified in ubuntu:24.04, util-linux
2.39.3). The smoke now pins CI/CONTINUOUS_INTEGRATION=false for the
child; with that it passes 3/3 in the container under CI=true.

Docs that described smoke:tui as local-only are updated; the local gate
now has one local-only step (Firefox). Also corrects the publish job
comment — pack:verify never ran smoke:tui.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: cliffhall <cliff@futurescale.com>
@cliffhall cliffhall added the v2 Issues and PRs for v2 label Sep 24, 2026
@cliffhall
cliffhall requested a balanced review from Copilot September 24, 2026 06:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Add regression coverage proving both CI variables are forced to "false" in the spawned child.

Review effort: Balanced
Findings: None

What changed in this PR

Enables the PTY-backed TUI smoke test in GitHub CI by preventing Ink from suppressing interactive rendering.

Changes:

  • Removes the CI self-skip and overrides child CI variables.
  • Updates workflow-gate tests, comments, and documentation.
  • Corrects CI and publish workflow guidance.
File Description
scripts/​smoke-tui.mjs Enables CI execution; the environment override lacks regression coverage.
scripts/​lib/​workflow-gate.test.mjs Updates the TUI smoke test description.
scripts/​lib/​workflow-gate.mjs Documents the revised CI/local split.
README.md Updates the local-gate summary.
docs/​quality-gate.md Documents TUI smoke coverage in CI.
clients/​launcher/​README.md Documents CI execution and environment handling.
AGENTS.md Updates mandatory gate guidance.
.github/​workflows/​main.yml Corrects smoke and publishing comments.
.claude/​skills/​pre-push-gate/​SKILL.md Updates gate procedure guidance.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@cliffhall

Copy link
Copy Markdown
Member Author

Copilot review round 1 — closed. Findings: none, no inline comments, no suppressed block.

The headline suggestion (regression coverage proving CI/CONTINUOUS_INTEGRATION are forced to "false" in the child) is declined: this PR's own CI is that coverage. ubuntu-latest exports CI=true, so if either pin were dropped, Ink would suppress its interactive frames, the TUI would never paint the "MCP Servers" marker, and smoke:tui would fail in the build job. I reproduced exactly that in ubuntu:24.04 before adding the pin. A unit test would mean moving the env construction into a separate tested module just to assert a literal the smoke already exercises end to end.

Loop stopped per the round-exit rule: the only item was declined, so another round would only re-argue it.

@cliffhall
cliffhall merged commit 56ba766 into v2/main Sep 24, 2026
5 checks passed
@cliffhall
cliffhall deleted the v2/chore/2408-tui-smoke-in-ci branch September 24, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Issues and PRs for v2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI real-terminal smoke test self-skips in CI — regressions ship with zero CI signal

2 participants