Skip to content

fix: stream partial line output, no wait for sentinel#35

Merged
Beforerr merged 1 commit into
mainfrom
push-oznuruurxzmu
Jun 14, 2026
Merged

fix: stream partial line output, no wait for sentinel#35
Beforerr merged 1 commit into
mainfrom
push-oznuruurxzmu

Conversation

@Beforerr

Copy link
Copy Markdown
Owner

scanToSentinel read line-by-line. print no newline + \r progress bar buffer
til eval end. background output file empty whole time, then dump all at once.

now read byte-wise, drain buffered burst, emit safe prefix now. hold back only
trailing bytes that could start sentinel. byte-wise read so \r/print stream live.

add session_test.go: stream partial, hold sentinel prefix, lines+tail, eof flush.

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.12195% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
go/session.go 95.12% 1 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
go/session.go 76.39% <95.12%> (+1.04%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

scanToSentinel read line-by-line, so newline-less output (print w/o newline, \r
progress bar) buffered til eval end — background output file empty whole time,
then dumped at once. now read byte-wise: drain buffered burst, emit safe prefix
immediately, hold back only trailing bytes that could start the sentinel.

byte-wise read changed python startup-stderr chunk boundaries, exposing a
windows-only prompt leak (first eval replays captured startup chunks as its
stderr). root cause: runtime loaded over stdin AFTER the REPL already printed
default >>> prompts. fix at source — load runtime via python -i -c so it sets
ps1/ps2="" and the no-op displayhook before the interactive loop prints any
prompt. no prompts ever emitted; deletes all prompt-stripping code.

tests: stream partial line, hold sentinel prefix, lines+tail, eof flush.
@Beforerr Beforerr force-pushed the push-oznuruurxzmu branch from 6075439 to 5f873fb Compare June 14, 2026 18:01
@Beforerr Beforerr merged commit d0fc5c3 into main Jun 14, 2026
4 checks passed
@Beforerr Beforerr deleted the push-oznuruurxzmu branch June 14, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant