Skip to content

fix: choose safe default input stream - #622

Closed
MilesCranmerBot wants to merge 4 commits into
astroautomata:masterfrom
MilesCranmerBot:bot/autoselect-devnull-input-stream
Closed

fix: choose safe default input stream#622
MilesCranmerBot wants to merge 4 commits into
astroautomata:masterfrom
MilesCranmerBot:bot/autoselect-devnull-input-stream

Conversation

@MilesCranmerBot

@MilesCranmerBot MilesCranmerBot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • choose stdin by default only for POSIX TTY sessions where interactive input should be safe
  • fall back to devnull by default for Windows, WSL, non-TTY, closed, or unreadable streams
  • preserve explicit input_stream=stdin / input_stream=devnull overrides
  • add targeted option tests for WSL detection, default selection, and explicit overrides
  • remove the ad hoc WSL CI job since the unit tests now cover the policy without a flaky Windows/WSL setup step

Tests

  • julia --project=. -e 'using Pkg; Pkg.test(; test_args=["unit/basic"])'

@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 2a347d3... master / 2a347d3...
search/multithreading 15.2 ± 0.58 s 14.8 ± 0.28 s 1.03 ± 0.044
search/serial 32.1 ± 0.21 s 32.2 ± 0.06 s 0.998 ± 0.0066
utils/best_of_sample 1.86 ± 0.58 μs 1.69 ± 0.37 μs 1.1 ± 0.42
utils/check_constraints_x10 17.2 ± 4.4 μs 17.2 ± 4.4 μs 0.998 ± 0.36
utils/compute_complexity_x10/Float64 2.14 ± 0.09 μs 2.16 ± 0.09 μs 0.991 ± 0.059
utils/compute_complexity_x10/Int64 2.04 ± 0.09 μs 2.08 ± 0.08 μs 0.981 ± 0.057
utils/compute_complexity_x10/nothing 1.55 ± 0.09 μs 1.55 ± 0.09 μs 1 ± 0.082
utils/insert_random_op_x10 5.13 ± 1.6 μs 5.08 ± 1.7 μs 1.01 ± 0.46
utils/next_generation_x100 0.439 ± 0.024 ms 0.443 ± 0.025 ms 0.991 ± 0.079
utils/optimize_constants_x10 0.0332 ± 0.0077 s 0.0333 ± 0.0072 s 0.996 ± 0.32
utils/randomly_rotate_tree_x10 8.29 ± 0.94 μs 8.28 ± 0.94 μs 1 ± 0.16
time_to_load 2.68 ± 0.091 s 2.72 ± 0.0084 s 0.984 ± 0.033
Memory benchmarks
master 2a347d3... master / 2a347d3...
search/multithreading 0.204 G allocs: 52.6 GB 0.205 G allocs: 53.5 GB 0.983
search/serial 0.209 G allocs: 56.7 GB 0.209 G allocs: 56.7 GB 1
utils/best_of_sample 0.038 k allocs: 3.25 kB 0.038 k allocs: 3.25 kB 1
utils/check_constraints_x10 0.034 k allocs: 0.875 kB 0.034 k allocs: 0.875 kB 1
utils/compute_complexity_x10/Float64 0 allocs: 0 B 0 allocs: 0 B
utils/compute_complexity_x10/Int64 0 allocs: 0 B 0 allocs: 0 B
utils/compute_complexity_x10/nothing 0 allocs: 0 B 0 allocs: 0 B
utils/insert_random_op_x10 0.041 k allocs: 1.62 kB 0.041 k allocs: 1.62 kB 1
utils/next_generation_x100 4.62 k allocs: 0.275 MB 4.63 k allocs: 0.276 MB 0.998
utils/optimize_constants_x10 24.3 k allocs: 25.1 MB 23.8 k allocs: 24.8 MB 1.01
utils/randomly_rotate_tree_x10 0.042 k allocs: 1.34 kB 0.042 k allocs: 1.34 kB 1
time_to_load 0.145 k allocs: 11 kB 0.145 k allocs: 11 kB 1

@MilesCranmerBot
MilesCranmerBot force-pushed the bot/autoselect-devnull-input-stream branch 7 times, most recently from 6b4615a to a3545b4 Compare June 21, 2026 20:08
Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmerBot
MilesCranmerBot force-pushed the bot/autoselect-devnull-input-stream branch from a3545b4 to be02121 Compare June 21, 2026 20:31
MilesCranmerBot and others added 2 commits June 23, 2026 12:41
TestItemRunner is a test-only dependency. Aqua correctly flags it
as stale in the main Project.toml [deps]. Moving it to test deps only.

Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-authored-by: Miles Cranmer <miles.cranmer@gmail.com>
@MilesCranmerBot MilesCranmerBot changed the title fix: default input stream to devnull on Windows and WSL fix: choose safe default input stream Jul 8, 2026
@MilesCranmer

Copy link
Copy Markdown
Member

Not needed anymore due to #623 #562

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.

2 participants