Skip to content

fix(execution): keep Python output that has no trailing newline - #2072

Open
eersnington wants to merge 1 commit into
mainfrom
fix/python-trailing-output
Open

eersnington wants to merge 1 commit into
mainfrom
fix/python-trailing-output

Conversation

@eersnington

@eersnington eersnington commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Python output without a trailing newline was lost, and blank lines were dropped.

python3 -c … main This PR
print('a'); print(); print('b', end='') a\n a\n\nb
sys.stderr.write('err') nothing err
  • The runner used Pyodide's line-batched stdout and stderr handlers, which only forward output at a newline, and its stdout filter dropped blank lines and appended a newline to every write.
  • stdout and stderr now go through Pyodide's raw write mode, byte for byte. fix(execution): give Python SystemExit Linux exit codes #2069's main runner flushes Python's own buffers at exit.
  • The filter's remaining job, hiding "Loading micropip" progress, moves to the source: runner-owned loadPackage calls pass a silent messageCallback. Load errors still reach stderr.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

📟 Pip-Boy · dce29ea

📦 Packages

Skipped: this PR doesn't change any published package.

🧹 Rust dependencies · cargo deny + cargo shear

check new in this PR fixed existing on base
advisories ✅ 0 0 25
licenses ✅ 0 0 0
sources ✅ 0 0 0
bans ✅ 0 0 0
unused ✅ 0 0 16

🦀 Binaries · publish Dockerfiles, --release

Base: main@9413c84, the merge base.

artifact npm @latest base this PR Δ vs base
agentos-native-sidecar linux-x64-gnu 143.6 MB 143.7 MB 143.7 MB +104 B (+0.0%)

⏱ Timing

job wall time slowest step
changes 27s checkout · 24s
zizmor 11s checkout · 3s
hygiene 1m04s checkout · 24s
native · linux-x64-gnu 10m28s Build with the publish Dockerfile · 9m50s
⏭ footprint — skipped
⏭ self-test — skipped
report 22s setup-node · 7s
🔭 Full CI trace for this commit

One OpenTelemetry trace of CI and Pip-Boy for dce29ea: every job and step, with the sizes above attached. Run after CI finishes.

pnpm install --frozen-lockfile --filter 'pipboy...'
pnpm --filter pipboy pipboy trace --sha dce29eac3c18d3b12d6e8b294f60aff30f67cff4

Add --otlp <url> to send it to any OTLP/HTTP collector.

Agent instruction: From a rivet-dev/agentos checkout, run the commands above, then read the trace file the last command prints. List the slowest jobs and steps and explain where CI time went.

Base automatically changed from fix/python-exit-codes to main October 21, 2026 15:04
The Python runner used Pyodide's line-batched stdout and stderr handlers. They dropped a final partial line and blank lines, and re-added a newline to every write, so print('x', end='') printed nothing.

Write guest stdout and stderr as raw bytes. Silence package-load progress at its source with a loadPackage messageCallback instead of filtering stdout lines.
@eersnington
eersnington force-pushed the fix/python-trailing-output branch from fd006a3 to dce29ea Compare October 21, 2026 15:06

This branch has not been deployed

No deployments
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