provide-terminal
2026-03-02
Shared input mode added, hijack module restructured into subpackages, and comprehensive test suites added with multiple race condition fixes
48 files · 3,985+ · 785-
Hijack Features
9 files changed
bridge.pyBridge updated for shared input mode and subpackage restructure__init__.pyHub subpackage init (restructured from hub.py)ownership.pyOwnership tracking extracted to submodulemodels.pyModels updated for shared input mode__init__.pyRoutes subpackage init (restructured)rest.pyREST routes extracted to subpackagewebsockets.pyWebSocket routes extracted to subpackagehijack.htmlHijack frontend updated for shared input modehijack.jsHijack JS updated for shared input mode
- Shared input mode added to the hijack control plane; hijack module restructured from flat files into subpackages (hub/, routes/) and coverage tests added.
instantiate
architectural
5 files
__init__.pyownership.py__init__.pyrest.pywebsockets.py
Tests
8 files changed
test_hypothesis_hub.pyHypothesis property-based, fuzz, and concurrency tests for TermHubtest_e2e_telnet_gateway.pyTelnet gateway E2E teststest_e2e_live_hub_ws.pyLive hub WebSocket E2E teststest_e2e_ssh_gateway.pySSH gateway E2E teststest_coverage_bridge.pyBridge coverage teststest_coverage_hub_routes.pyHub routes coverage teststest_hijack_shared.pyShared input mode teststest_zzz_playwright_hijack.pyPlaywright hijack E2E tests (comprehensive)
- Hypothesis property-based, fuzz, and concurrency tests added for TermHub to catch invariant violations under random inputs.
qualify
internal
1 file
test_hypothesis_hub.py
- Telnet gateway E2E tests added; review findings fixed; handoff updated.
qualify
internal
1 file
test_e2e_telnet_gateway.py
- Comprehensive E2E test suite added covering live hub WS, SSH gateway, and Playwright hijack flows.
qualify
internal
3 files
test_e2e_live_hub_ws.pytest_e2e_ssh_gateway.pytest_zzz_playwright_hijack.py
Hijack Race Condition Fixes
5 files changed
__init__.pyHub: TOCTOU re-check, dead-socket cleanup, broadcast fixownership.pyOwnership: guard resume against raced-in sessionsbridge.pyBridge: stale state cleared on worker reconnectwebsockets.pyWS routes: pause sent before claiming ownership in hijack_requestrest.pyREST routes: guard resume on rest_active; return None on snapshot timeout
- TOCTOU re-check added before resume in dead-socket and WS release paths.
remediate
internal
2 files
__init__.pywebsockets.py
- notify gated on
_do_resume; hijack state broadcast on worker disconnect. remediate behavioral1 file
__init__.py
- Resume guarded against raced-in sessions; stale state cleared on worker reconnect.
remediate
internal
2 files
ownership.pybridge.py
- WS hijack_request reordered to send pause before claiming ownership; browsers notified on dead-socket clear.
remediate
behavioral
2 files
websockets.py__init__.py
- Resume sent to worker when dead-socket cleanup clears hijack owner.
deprecate
errata
1 file
__init__.py
- Resume guarded on rest_active; None returned on snapshot timeout; linting fixed.
remediate
errata
1 file
rest.py
- Dead-socket hijack owner cleared in broadcast; session re-validated before send.
remediate
behavioral
2 files
__init__.pywebsockets.py
Code Quality
2 files changed
rest.pyhijack_step re-validation added; mypy clean; bandit cleanansi.pyANSI module quality cleanup
Dependencies
2 files changed
pyproject.tomlhypothesis added to dev dependenciesuv.lockLock updated for hypothesis