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
Investigate visible shell-integration echo in raw terminal #66
On the signed alpha.13 owner device, after running ordinary transcript commands (pwd, cd /tmp, pwd) and opening the raw terminal, the visible scrollback contains large builtin eval / Threadline shell-integration invocations with literal escaped newlines. The actual prompts and command output still appear, but the integration text overwhelms the terminal view.
Investigation
SessionManager already has InternalInputEchoFilter, which hides only an exact PTY echo of Threadline-authored input. The owner-device result suggests that this exact match is not occurring for at least some generated invocations. Determine the actual echo shape and when it reaches the terminal. Do not infer raw bytes from the screenshot alone.
Acceptance
On a signed device, short transcript commands followed by a switch to raw terminal do not leave large Threadline-authored integration invocations in visible scrollback when their echo can be proven exact.
Ambiguous or mismatched remote bytes still pass through unchanged and in order, per the product invariant.
Add focused coverage for the observed PTY behavior and check structured commands plus direct raw-terminal input on the same session.
No hostnames, key material, or raw command payloads should be added to public diagnostics while investigating.
Reproduced on the disposable API 35 emulator with the real OpenSSH fixture while validating #48. fixtures/openssh/test-android-structured.sh stopped at the existing bootstrap raw-terminal assertion in AndroidStructuredShellIntegrationTest.productionSessionRetainsStateAndReportsCommandLifecycle (before the reply cases):
The shared prefix covers the authored input plus the PTY line ending. This supports the owner-device screenshot finding, but does not yet establish why InternalInputEchoFilter failed to omit it. A separate targeted real-SSH reply test passed without changing the raw-byte assertion. No fixture credentials or captured terminal payloads are attached.
The real OpenSSH fixture reproduced this on the API 35 emulator. A temporary test-only probe counted two exact CRLF-normalized copies of the bootstrap line in SSH output and one remaining copy in terminal history after filtering:
The probe recorded counts without publishing terminal payloads and has been removed. A JVM regression using the same duplicate-echo shape failed on the old filter.
PR #70 permits at most two exact bootstrap echoes until the existing lifecycle cancellation or bootstrap timeout. Ordinary command wrappers keep the single-echo limit. Focused tests preserve surrounding output, mismatched bytes, partial matches, and direct raw input.
./gradlew test lint assembleDebug passed, and the full fixtures/openssh/test-android-structured.sh gate now passes all three cases, including the formerly failing bootstrap assertion and a raw command followed by a structured command on the same session.
Signed owner-device acceptance remains pending, so this issue stays open.
Activity
R055LE commentedon Sep 29, 2026
Reproduced on the disposable API 35 emulator with the real OpenSSH fixture while validating #48.
fixtures/openssh/test-android-structured.shstopped at the existing bootstrap raw-terminal assertion inAndroidStructuredShellIntegrationTest.productionSessionRetainsStateAndReportsCommandLifecycle(before the reply cases):Bootstrap input reached terminal history: inputBytes=1492, sharedBytes=1493The shared prefix covers the authored input plus the PTY line ending. This supports the owner-device screenshot finding, but does not yet establish why
InternalInputEchoFilterfailed to omit it. A separate targeted real-SSH reply test passed without changing the raw-byte assertion. No fixture credentials or captured terminal payloads are attached.R055LE commentedon Oct 1, 2026
The real OpenSSH fixture reproduced this on the API 35 emulator. A temporary test-only probe counted two exact CRLF-normalized copies of the bootstrap line in SSH output and one remaining copy in terminal history after filtering:
inputBytes=1492, sharedBytes=1493, sshExactEchoes=2, terminalExactEchoes=1The probe recorded counts without publishing terminal payloads and has been removed. A JVM regression using the same duplicate-echo shape failed on the old filter.
PR #70 permits at most two exact bootstrap echoes until the existing lifecycle cancellation or bootstrap timeout. Ordinary command wrappers keep the single-echo limit. Focused tests preserve surrounding output, mismatched bytes, partial matches, and direct raw input.
./gradlew test lint assembleDebugpassed, and the fullfixtures/openssh/test-android-structured.shgate now passes all three cases, including the formerly failing bootstrap assertion and a raw command followed by a structured command on the same session.Signed owner-device acceptance remains pending, so this issue stays open.