You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit aa574fc
Browse filesBrowse the repository at this point in the historyBrowse files
Reject the ttyd transport structurally, not silently (ttyd retirement stage 3/7)
Closes R-05. Before this stage, an unrecognised value for `transport` —
including the retired `ttyd` — silently resolved to `pty`, both in the
request body (_resolve_transport fell through to a default) and via the
STUDYLOOP_TRANSPORT env-var kill switch. A caller asking for a transport
that no longer exists got a different one with no error, which is worse
than a clean rejection: it hides the fact that the thing asked for is gone.
`StartSessionRequest.transport` is now `Literal["pty", "acp"] | None`, so
Pydantic itself 422s an unrecognised body value before the handler runs.
`_resolve_transport()` raises the new `UnsupportedTransportError` for any
non-empty `STUDYLOOP_TRANSPORT` other than "pty"; `start_session()` catches
it and returns 422. Both paths are fixed in this one commit, per
REMEDIATION-PLAN's Gate 1 amendment #2, with a mandatory test for each:
`{"transport": "ttyd"}` -> 422, and `STUDYLOOP_TRANSPORT=ttyd` -> 422 (not
silently pty).
Deletes `_start_ttyd_session()` and `_ttyd_credentials()` (_start.py) — the
dispatcher's fallback branch that reached the legacy tmux+ttyd path is gone
along with them. `app.state.lan_username`/`lan_password` (web/app.py) are
removed too: `_ttyd_credentials()` was their only reader, and the plan's own
instruction is to leave no false authority markers rather than keep unread
state whose documented purpose no longer applies. Real LAN Basic-Auth is
unaffected — `create_app()` still wires `BasicAuthMiddleware` directly from
its username/password parameters, which never went through app.state.
Test reconciliation, beyond the manifest's literal line numbers where its
granularity didn't reach: TestLanCredentialsOnAppState (test_lan_auth.py,
5 tests) is deleted as one unit — its whole premise (app.state as the
ttyd/app auth divergence guard) is gone; test_start_rejects_no_tmux
(test_web_session.py) is deleted since no surviving transport touches tmux,
so its 503-on-no-multiplexer assertion has no home. Full ledger and
rationale for each in evidence/M1/stage-3/04-manifest.md. Pass count 3875 ->
3870, exactly at the strict-manifest floor (3877 - 4 - 3 = 3870).
Docs describing the ttyd server transport as still available to maintainers
(system-overview.md, architecture/current.md:149, cli-reference.md,
troubleshooting.md) are now stale and deliberately left for stage 7 per
PLAN-retire-ttyd.md's cut-point rule ("not shippable in doc terms mid-flight
... never cut 0.1.0 mid-flight").
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
0 commit comments