Skip to content

fix: don't fail importing unreadable history lines#710

Merged
reubeno merged 2 commits into
mainfrom
dont-fail-on-non-utf8-history-lines
Oct 14, 2025
Merged

fix: don't fail importing unreadable history lines#710
reubeno merged 2 commits into
mainfrom
dont-fail-on-non-utf8-history-lines

Conversation

@reubeno
Copy link
Copy Markdown
Owner

@reubeno reubeno commented Oct 14, 2025

There's more that we should do to ensure history importing isn't fatal, but this change at least ensures that history lines with bytes not parseable as UTF-8 won't cause brush to fail outright.

Also adds a test case that reproduced the reported issues and confirms that it's fixed now.

Resolves #702

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 14, 2025

Test Results

    3 files     23 suites   6m 12s ⏱️
  877 tests   877 ✅ 0 💤 0 ❌
2 611 runs  2 611 ✅ 0 💤 0 ❌

Results for commit 75fdf1b.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 14, 2025

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 17.70 μs 17.58 μs -0.12 μs 🟢 -0.66%
eval_arithmetic 0.15 μs 0.15 μs -0.00 μs ⚪ Unchanged
expand_one_string 1.95 μs 1.91 μs -0.04 μs ⚪ Unchanged
for_loop 22.43 μs 22.30 μs -0.12 μs ⚪ Unchanged
function_call 2.42 μs 2.54 μs 0.11 μs 🟠 +4.75%
instantiate_shell 58.62 μs 58.13 μs -0.49 μs 🟢 -0.84%
instantiate_shell_with_init_scripts 22389.82 μs 22407.98 μs 18.16 μs ⚪ Unchanged
parse_bash_completion 1664.25 μs 1684.87 μs 20.63 μs ⚪ Unchanged
parse_sample_script 1.77 μs 1.78 μs 0.01 μs ⚪ Unchanged
run_echo_builtin_command 15.92 μs 15.71 μs -0.21 μs ⚪ Unchanged
run_one_external_command 2363.34 μs 2855.34 μs 492.00 μs 🟠 +20.82%
tokenize_sample_script 2.75 μs 2.75 μs -0.00 μs ⚪ Unchanged

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-core/src/history.rs 🟠 68.1% 🟠 68.69% 🟢 0.59%
Overall Coverage 🟢 72.48% 🟢 72.49% 🟢 0.01%

Minimum allowed coverage is 70%, this run produced 72.49%

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1305 61.88
❗️ Error 233 11.05
❌ Fail 184 8.72
⏩ Skip 372 17.64
❎ Expected Fail 15 0.71
📊 Total 2109 100.00

@reubeno reubeno merged commit c5add15 into main Oct 14, 2025
42 checks passed
@reubeno reubeno deleted the dont-fail-on-non-utf8-history-lines branch October 14, 2025 16:02
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.

ERROR error: i/o error: stream did not contain valid UTF-8

1 participant