Type
Bug
Severity
High
Modules
Evidence
spawn-docker-jdk/src/main/java/build/spawn/docker/jdk/command/StartExecution.java:111-128
- The code contains
TODO: establish PipedWriter for stdin.
getInputWriter() returns NullWriter.get() even when terminalRequired is true.
Why this matters
- Docker exec sessions are a common place where callers expect genuine interactivity.
- Returning a terminal with a no-op writer breaks that expectation and can lead to confusing hangs.
Expected behavior
- If
terminalRequired is true, stdin should be usable.
Actual behavior
- Callers may receive
Optional.of(terminal), but that terminal is effectively output-only.
Suggested reproduction
- Start an exec session that waits for input.
- Request
terminalRequired=true.
- Write to the terminal input writer.
- Observe that the exec session never receives the input.
Suggested fix
- Wire stdin to the Docker exec stream.
- If the implementation cannot support stdin yet, return
Optional.empty() or document the limitation explicitly.
Suggested tests
- Add an integration test for interactive
docker exec behavior.
Issue body ready to paste
StartExecution can return Optional.of(terminal) for exec sessions, but the terminal input side is not implemented. The code still returns NullWriter, so terminalRequired=true currently produces a read-only terminal rather than a truly interactive exec session.`
Type
Bug
Severity
High
Modules
Evidence
spawn-docker-jdk/src/main/java/build/spawn/docker/jdk/command/StartExecution.java:111-128TODO: establish PipedWriter for stdin.getInputWriter()returnsNullWriter.get()even whenterminalRequiredis true.Why this matters
Expected behavior
terminalRequiredis true, stdin should be usable.Actual behavior
Optional.of(terminal), but that terminal is effectively output-only.Suggested reproduction
terminalRequired=true.Suggested fix
Optional.empty()or document the limitation explicitly.Suggested tests
docker execbehavior.Issue body ready to paste
StartExecutioncan returnOptional.of(terminal)for exec sessions, but the terminal input side is not implemented. The code still returnsNullWriter, soterminalRequired=truecurrently produces a read-only terminal rather than a truly interactive exec session.`