Skip to content

Commit 4ffef84

Browse files
dzmitrys-devclaude
andcommitted
fix(ci): robustify --skip-patch-agents help assertions against width truncation
The three smoke tests (install/repair/init) were red on GitHub Actions because Rich/Typer truncates long flag tokens with U+2026 at width-dependent boundaries. Locally COLUMNS=200 (set in _run) is honored; on CI under pytest stdout capture the effective width clips to ~80, rendering --skip-patch-agents as '--skip-patch-age…'. CI has been red on every push since 2b093dc (#08.1-04). Replace the literal-flag substring assertion with two width-stable anchors: - 'skip-patch-ag' — short prefix that survives any reasonable truncation - 'D-LOCK-06' — unique description tag that always renders intact via word-wrap This still verifies the flag is documented with the right rationale, without coupling the test to terminal width. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d4a6936 commit 4ffef84

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

tests/test_cli_smoke.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,24 +258,36 @@ def test_cmd_repair_help_shows_skip_models() -> None:
258258

259259

260260
def test_install_help_lists_skip_patch_agents_flag() -> None:
261-
"""Phase 08.1 D-LOCK-06: install --help advertises --skip-patch-agents."""
261+
"""Phase 08.1 D-LOCK-06: install --help advertises --skip-patch-agents.
262+
263+
Asserts on a stable short prefix + the description's unique tag rather than
264+
the full flag name: Rich/Typer truncates long flag tokens with U+2026 at
265+
width-dependent boundaries (COLUMNS=200 in _run is honored locally but not
266+
reliably on GitHub Actions runners under pytest stdout capture).
267+
"""
262268
r = _run("install", "--help")
263269
assert r.returncode == 0, (r.stdout, r.stderr)
264-
assert "--skip-patch-agents" in (r.stdout + r.stderr)
270+
out = r.stdout + r.stderr
271+
assert "skip-patch-ag" in out, out
272+
assert "D-LOCK-06" in out, out
265273

266274

267275
def test_repair_help_lists_skip_patch_agents_flag() -> None:
268276
"""Phase 08.1 D-LOCK-06: repair --help advertises --skip-patch-agents."""
269277
r = _run("repair", "--help")
270278
assert r.returncode == 0, (r.stdout, r.stderr)
271-
assert "--skip-patch-agents" in (r.stdout + r.stderr)
279+
out = r.stdout + r.stderr
280+
assert "skip-patch-ag" in out, out
281+
assert "D-LOCK-06" in out, out
272282

273283

274284
def test_init_help_lists_skip_patch_agents_flag() -> None:
275285
"""Phase 08.1 D-LOCK-06: init --help advertises --skip-patch-agents."""
276286
r = _run("init", "--help")
277287
assert r.returncode == 0, (r.stdout, r.stderr)
278-
assert "--skip-patch-agents" in (r.stdout + r.stderr)
288+
out = r.stdout + r.stderr
289+
assert "skip-patch-ag" in out, out
290+
assert "D-LOCK-06" in out, out
279291

280292

281293
def test_install_with_skip_patch_agents_emits_skip_message(tmp_path) -> None:

0 commit comments

Comments
 (0)