You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(ci): tests render CLI help at the same width locally and in github ci, so the gate catches width-dependent failures #1041
priority/p2-mediumPriority P2: standard workscope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnerstype/bugType bug: the code does not do what it must
The local gate passed PR #1039 (#950), and GitHub CI then failed it on tests/test_data_dir_worktrees.py::test_dataset_help_says_a_relative_dataset_is_under_the_main_worktree. The test reads a phrase from devops ai prompt-eval --help; in CI the help wrapped at 80 columns and a table border split the phrase.
The cause is the test environment, not the CLI:
tests/conftest.py sets COLUMNS=250, NO_COLOR=1 and TERM=dumb for every test (_TERMINAL_ENV).
Typer sets FORCE_TERMINAL = True at import when GITHUB_ACTIONS is set (typer/rich_utils.py).
A Rich console that is forced to be a terminal and has TERM=dumb reports a size of 80x25, whatever COLUMNS says. Without GITHUB_ACTIONS the console is not a terminal, and Rich uses COLUMNS.
So the same test renders at 250 columns in the devcontainer and in the pre-push gate, and at 80 in GitHub CI. Reproduced at a99dd4e: the test passes with no extra environment and fails with CI=true GITHUB_ACTIONS=true uv run pytest tests/test_data_dir_worktrees.py -k dataset_help. #1039 fixed that one test by reading the phrase with table borders removed; the mismatch remains for every other help or table assertion.
Acceptance criteria
Tests see one terminal width in every environment: tests/conftest.py stops Typer's GitHub Actions detection from forcing a terminal for test consoles (for example by setting typer.rich_utils.FORCE_TERMINAL = None before any app is built, or by not using TERM=dumb with a forced terminal), so Rich always reads COLUMNS.
A test asserts that, with GITHUB_ACTIONS=true in the environment, a CliRunner render of a help panel uses the conftest width (no line of the help is wrapped at 80 columns).
The full suite passes with CI=true GITHUB_ACTIONS=true set locally, and without them.
changelog.d/1041.md records the fix under ### Fixed. CHANGELOG.md is not edited.
uv run devops ci passes.
Key questions
Make the local gate run with GITHUB_ACTIONS=true instead? (proposed) No. Tests should not depend on CI detection at all; removing the forced terminal makes both environments the same.
Depends on: none.
Order: any time.
Related: #1039 (where it surfaced), #843 (GitHub CI runs the gate through devops ci).
Placed in v0.2.31 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: finding identity v2, URL credential masking, tests that leave no state, the Docker endpoint check and the Argo CD/OTel perimeters. Position 4 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
Acceptance Criteria of docs/agent/tasks/task-1041-ci-test-terminal-width.md:
Tests see one terminal width in every environment: tests/conftest.py stops Typer's GitHub Actions detection from forcing a terminal for test consoles by clearing typer.rich_utils.FORCE_TERMINAL = None, so Rich always reads COLUMNS.
A test asserts that, with GITHUB_ACTIONS=true in the environment, a CliRunner render of a help panel uses the conftest width (no line of the help is wrapped at 80 columns): test_cli_help_panel_renders_at_conftest_width_under_github_actions in tests/test_output.py.
The full suite passes with CI=true GITHUB_ACTIONS=true set locally, and without them.
changelog.d/1041.md records the fix under ### Fixed. CHANGELOG.md is not edited.
priority/p2-mediumPriority P2: standard workscope/ciGitHub Actions workflows, pre-commit hooks, CI gates, and runnerstype/bugType bug: the code does not do what it must
Activity
dan-petty commentedon Oct 8, 2026
Placed in v0.2.31 on 2026-10-08 at the owner's request ("Populate 10 security and ci issues into each v0.2.30, v0.2.31, and v0.2.32 milestone"). This is a person's placement. Release theme: finding identity v2, URL credential masking, tests that leave no state, the Docker endpoint check and the Argo CD/OTel perimeters. Position 4 of 10 in the release's planned merge order. Its board Status is set to Ready, so the release-start fill keeps it.
fix(ci): tests render CLI help at the same width locally and in githu…
dan-petty-bot commentedon Oct 9, 2026
What changed
#1475, merged into
release/v0.2.31as acfbdee.4 file(s) changed.
How it was verified
Check runs at 9ddd69c:
Acceptance Criteria of
docs/agent/tasks/task-1041-ci-test-terminal-width.md:tests/conftest.pystops Typer's GitHub Actions detection from forcing a terminal for test consoles by clearingtyper.rich_utils.FORCE_TERMINAL = None, so Rich always readsCOLUMNS.GITHUB_ACTIONS=truein the environment, aCliRunnerrender of a help panel uses the conftest width (no line of the help is wrapped at 80 columns):test_cli_help_panel_renders_at_conftest_width_under_github_actionsintests/test_output.py.CI=true GITHUB_ACTIONS=trueset locally, and without them.changelog.d/1041.mdrecords the fix under### Fixed.CHANGELOG.mdis not edited.uv run devops cipasses.feat(release): v0.2.31 (#1490)