Skip to content

Preserve R echo while narrowing echo cleanup#59

Merged
t-kalinowski merged 3 commits into
mainfrom
preserve-r-echo-source-cleanup
May 8, 2026
Merged

Preserve R echo while narrowing echo cleanup#59
t-kalinowski merged 3 commits into
mainfrom
preserve-r-echo-source-cleanup

Conversation

@t-kalinowski
Copy link
Copy Markdown
Member

@t-kalinowski t-kalinowski commented May 8, 2026

Summary

This is an internal slice of the R output-ordering epic. It keeps the existing R echo UX intact while narrowing echo cleanup so IPC-owned prompt/readline facts only consume IPC-owned output, not raw child stdout.

Public changes

None intended.

Internal changes

  • Track text source (raw vs ipc) through output capture, pending output, pager replay, and echo collapse.
  • Carry echo source on readline echo facts.
  • Add regressions for multi-line R attribution and prompt-shaped child stdout.
  • Stabilize timeout-bundle and Python detached-tail regressions with explicit test gates.

Testing

Keep R-owned submitted-input echo on the visible IPC path while
making prompt/readline echo matching source-aware. This prevents raw
child stdout that looks like an R prompt from satisfying IPC-owned echo
facts, without changing large echo collapse behavior.

Validation:
- cargo check
- cargo build
- cargo clippy --all-targets --all-features -- -D warnings

- cargo test
- cargo +nightly fmt
The macOS ARM PR CI run failed in timeout_spill_recreates_deleted_transcript_without_replaying_old_text:
expected later small poll output to recreate the deleted spill file, got: "> "

The test used elapsed sleeps to make tail output arrive after transcript.txt was deleted. Gate the R-side tail emission on a test-created file instead, wait until the pre-delete spill has reached mid080, then release the gate after deleting the transcript.

Validation:
- cargo check
- cargo build
- cargo clippy --all-targets --all-features -- -D warnings
- cargo test
- cargo +nightly fmt
- codex review --base main
The macOS ARM PR CI run failed in python_idle_exit_preserves_detached_tail_before_respawn:
expected detached idle output to survive auto-respawn, got: "print('AFTER_RESPAWN')\r\nAFTER_RESPAWN\r\n>>> "

The test let the root Python worker exit immediately after the detached child reported that it had written IDLE_TAIL. Keep the root worker alive briefly after that marker so the server-side PTY reader can capture the detached tail before the auto-respawn path runs.

Validation:
- cargo check
- cargo build
- cargo clippy --all-targets --all-features -- -D warnings
- cargo test
- cargo +nightly fmt
- codex review --base main
@t-kalinowski t-kalinowski merged commit cea7478 into main May 8, 2026
5 checks passed
@t-kalinowski t-kalinowski deleted the preserve-r-echo-source-cleanup branch May 8, 2026 21:32
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