From dec2b0f677b3dde3befbf0d83a1230a6d1a8c1a4 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN Date: Thu, 20 Aug 2026 09:19:58 -0400 Subject: [PATCH] Guard the v3 TUI test's textual import, as every other TUI test does MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `textual` is not a declared dependency — not in dependencies, not an extra, not in the dev group — so it is absent from any environment built from the lockfile. Every other TUI test opens with pytest.importorskip("textual") and skips. This file did not, so instead of skipping it failed COLLECTION, and a collection error takes the whole run down: the entire Python suite went red on Linux and macOS over a module no test here can rely on. The guard is the immediate fix. The larger finding is recorded in TODO.md: the whole TUI test surface has been passing by not running, and the step meant to catch that — `seedpass tui2 --check` — uses find_spec and reports "unavailable" with a zero exit, so it passes whether or not the TUI can start. A fresh install from the lockfile ships a TUI that does not work and nothing in CI says so. Which way to resolve that is a product call, so it is written down rather than decided here. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Vtx94nXDmNgXEeThUZP4QN --- TODO.md | 22 ++++++++++++++++++++++ src/tests/test_tui_v3_parity.py | 8 ++++++++ 2 files changed, 30 insertions(+) diff --git a/TODO.md b/TODO.md index 22cd58c6..1fa0bc5d 100644 --- a/TODO.md +++ b/TODO.md @@ -235,6 +235,28 @@ everything still open, in the order it should be tackled. It found one real defect — the config API accepting any key and any value, fixed in the same session — and one property worth recording rather than unilaterally changing, below. + - [ ] **`textual` is an undeclared dependency, so the entire TUI test + surface has never run in CI.** It appears in neither + `[tool.poetry.dependencies]`, `[tool.poetry.extras]`, nor the dev + group, so no environment built from the lockfile has it. Every + TUI test therefore begins `pytest.importorskip("textual")` and + SKIPS — v2 action matrix, parity scenarios, keyboard stress, + textual interactions, and now v3 parity. They have been passing + by not running. + + The check meant to notice this cannot: `seedpass tui2 --check` + uses `importlib.util.find_spec` and reports + `status: "unavailable"` with a zero exit, so the CI smoke step + passes whether or not the TUI can start. A fresh install from the + lockfile ships a TUI that does not work, and nothing in CI says + so. + + Decide which the TUI is: a supported feature, in which case + declare `textual` and let those tests actually run; or an + optional extra, in which case declare it as one, and make the + smoke step assert something that can fail. Do not leave it as a + dependency nobody declared and tests nobody runs. + (Found 2026-08-20 while fixing the first CI run of this branch.) - [ ] **A nested export path answers 500 instead of a refusal.** `POST /api/v1/entry/:id/document/export` with `{"path": "exports/nested/secret.txt"}` fails with an opaque diff --git a/src/tests/test_tui_v3_parity.py b/src/tests/test_tui_v3_parity.py index f713e050..12a6b33f 100644 --- a/src/tests/test_tui_v3_parity.py +++ b/src/tests/test_tui_v3_parity.py @@ -1,5 +1,13 @@ from __future__ import annotations import pytest + +# textual is not a declared dependency, so it is absent from any environment +# built from the lockfile. Every other TUI test guards its import this way; +# this file did not, so instead of skipping it failed COLLECTION, which takes +# the whole run down with it -- the entire Python suite went red on Linux and +# macOS over a module no test here can rely on. +pytest.importorskip("textual") + from unittest.mock import MagicMock from rich.text import Text from textual.widgets import DataTable