Skip to content

test(tui): shard tui gateway test suite s4 clusters (tests/test_tui_gateway_server.py, tracker #78647) - #80540

Open
andrexibiza wants to merge 1 commit into
NousResearch:mainfrom
andrexibiza:gfg/tui-test-r4-w1-20260806
Open

andrexibiza wants to merge 1 commit into
NousResearch:mainfrom
andrexibiza:gfg/tui-test-r4-w1-20260806

Conversation

@andrexibiza

@andrexibiza andrexibiza commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What changed and why

Shard slice for the tests/test_tui_gateway_server.py large-file decomposition (tracker #78647, tracker #78629). This is region s4 of the 5×2×3 double-blind decomposition: the model-switch-deferral and pending-respond test families move verbatim into focused observable modules.

  • Moved (5 tests, byte-verbatim):
    • model-switch-deferral family (4 tests) → tests/tui_gateway/test_model_switch_deferral.py
    • pending-respond family (1 test) → tests/tui_gateway/test_pending_respond.py
  • Zero behavior change: pure test refactor (test-file godfile — no runtime code touched).

How to test

HERMES_PYTHON="C:/Users/andre/AppData/Local/hermes/hermes-agent/venv/Scripts/python.exe" scripts/run_tests.sh tests/tui_gateway/test_model_switch_deferral.py tests/tui_gateway/test_pending_respond.py
# expected: 5 passed, 0 failed

Footgun Gate

git diff --check is clean on each branch. The newly added modules each scan clean (check-windows-footguns.py: 0 findings). The retained godfile carries 10 pre-existing bare Path.read_text/write_text encoding findings; a pristine pin scan reproduced the same 10 findings. No slice-introduced footgun exists; the retained-godfile baseline debt is outside these extracted test windows and remains staged for a later test-hygiene class fix.

Verification (blind, 5×2×3)

Double-blind witnesses w2a + w2b (independent, forbidden from each other's outputs and from W1 artifacts) both VERIFIED:

  • Byte-fidelity: all 5 moved defs AST-slice-identical to pin 9d4ef04ed00 source
  • Orphan gate: 0 moved defs remain in the godfile; each exists exactly once in its module
  • Seam check: PASS
  • Focused suite: 5 passed / 0 failed (both witnesses)
  • git diff --check clean; py_compile clean; working tree clean at commit 0fdec7e7df4

Witness verdicts: C:/tmp/tg-campaign/godfile/tui_test/extraction/ew2/s4-w2a.json, s4-w2b.json (schema tui-test-extraction-w2-witness/1.0, both VERIFIED).

Platforms tested

Windows (git-bash host), repo main venv python 3.11.

Why this matters to users

No user-visible change — large-file decomposition: the 16,245-line test monolith shrinks, each focused module is independently runnable and debuggable, and the 2K-law kill track advances. Test-file slices are behavior-neutral by construction (epic method 3).

Part of #78647
Part of #78629

Links

Signed-off-by: Andrex Ibiza, MBA <84248988+andrexibiza@users.noreply.github.com>
@andrexibiza

Copy link
Copy Markdown
Contributor Author

TUI gateway test families separated by behavior

At exact head 0fdec7e7df45112609db190bc92a683a0bb4d980, commit 0fdec7e7df45 moves five tests out of tests/test_tui_gateway_server.py: four model-switch-deferral cases go to their focused module and the pending-respond case goes to its own module. Because this is test-only relocation, no runtime code or production behavior changes; the focused files make each family independently runnable and keep the original assertions available at a smaller ownership boundary.

For test(tui): shard tui gateway test suite s4 clusters (tests/test_tui_gateway_server.py, tracker #78647), GitHub reports check rollup SUCCESS on exact head 0fdec7e7df45112609db190bc92a683a0bb4d980.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have type/test Test coverage or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants