Skip to content

Commit 320be76

Browse files
committed
stdin: drop env-var tip from no-data warning (cubic P2)
The cause-neutral wording from 8eac6fa still kept the `set ALTIMATE_STDIN_TIMEOUT_MS=N` tip. cubic flagged that the tip points users at timeout tuning even when the real cause is a stream error or the dominant inherited-idle subprocess case. Drop the tip; the env var stays documented in code/docs for the rare slow-producer scenario. Final wording: "altimate-code: stdin produced no data; proceeding without it."
1 parent 8eac6fa commit 320be76

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

packages/opencode/src/util/stdin.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,12 @@ export async function readStdinIfAvailable(deps: ReadStdinDeps = {}): Promise<st
9999

100100
if (result === "") {
101101
// An empty result can come from the timer firing (slow producer), a
102-
// clean `end` with zero bytes (intentionally empty pipe), or an error
103-
// event. Wording is cause-neutral; the env-var tip is still useful for
104-
// the slow-producer case and harmless otherwise.
105-
warn(
106-
`altimate-code: stdin produced no data; proceeding without it. ` +
107-
`Tip: set ${STDIN_TIMEOUT_ENV}=N (ms) higher if upstream is a slow producer.`,
108-
)
102+
// clean `end` with zero bytes (intentionally empty pipe), or a stream
103+
// error. The previous version included a `set ${STDIN_TIMEOUT_ENV}=N`
104+
// tip; cubic-dev-ai flagged it as misleading for the error and the
105+
// dominant inherited-idle subprocess cases. The env var stays
106+
// documented in code/docs for the rare slow-producer scenario.
107+
warn(`altimate-code: stdin produced no data; proceeding without it.`)
109108
}
110109

111110
return result

packages/opencode/test/util/stdin.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ describe("readStdinIfAvailable", () => {
173173
expect(out).toBe("")
174174
expect(seen).toHaveLength(1)
175175
expect(seen[0]).toContain("stdin produced no data")
176-
expect(seen[0]).toContain("ALTIMATE_STDIN_TIMEOUT_MS")
177176
})
178177

179178
test("does NOT warn when isTTY (no pipe to drop in the first place)", async () => {

0 commit comments

Comments
 (0)