Skip to content

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

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

andrexibiza wants to merge 1 commit into
NousResearch:mainfrom
andrexibiza:gfg/tui-test-r5-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 s5 of the 5×2×3 double-blind decomposition: the browser-cdp-connect and config-indicator test families move verbatim into focused observable modules.

  • Moved (18 tests, byte-verbatim):
    • browser-cdp-connect family (11 tests) → tests/tui_gateway/test_browser_manage.py
    • config-indicator family (7 tests) → tests/tui_gateway/test_config_indicator.py
  • Zero behavior change: pure test refactor (test-file godfile — no runtime code touched). The _stub_urlopen helper stays in the godfile (retained browser.manage tests still use it) and is copied byte-identically into the c1 module as its required local seam.

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_browser_manage.py tests/tui_gateway/test_config_indicator.py
# expected: 18 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 18 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 (_stub_urlopen helper fidelity)
  • Focused suite: 18 passed / 0 failed (both witnesses)
  • git diff --check clean; py_compile clean

Witness verdicts: C:/tmp/tg-campaign/godfile/tui_test/extraction/ew2/s5-w2a.json, s5-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

This test-suite refactor is recorded at current head ccdcf12b7ef1db159c2dc39e283496ec206c8ab2. Eighteen tests move verbatim from tests/test_tui_gateway_server.py into two focused modules: eleven browser-CDP-connect tests in tests/tui_gateway/test_browser_manage.py and seven config-indicator tests in tests/tui_gateway/test_config_indicator.py. The retained _stub_urlopen helper remains available to the browser-management tests and is copied byte-for-byte where the new module needs its own seam. No runtime code is changed; the concrete benefit is independently runnable, debuggable coverage without changing what any test asserts. The covered commit is ccdcf12b7ef1db159c2dc39e283496ec206c8ab2. Exact-head check rollup: SUCCESS.

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