Repository navigation
Commit bd24f54
committed
fix(state): treat invalid UTF-8 in the journal tail as a torn line
A crash can tear the last journal line inside a multi-byte character
(a path with non-ASCII text). read_to_string then failed with
InvalidData before per-line recovery ran, so ShellState::new failed and
the workspace could not be reopened. The journal is now read as bytes
and each line parsed with serde_json::from_slice, so an invalid tail
ends replay like any other torn line. Codex review on #229.
Regression test fails without the fix. cargo test 838 passed; stress
suite 11 passed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J4QvDjNR1ZoYKEPxSKE2nq1 parent 2273913 commit bd24f54
1 file changed
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
843 | 843 | | |
844 | 844 | | |
845 | 845 | | |
846 | | - | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
847 | 851 | | |
848 | | - | |
| 852 | + | |
849 | 853 | | |
850 | 854 | | |
851 | | - | |
| 855 | + | |
852 | 856 | | |
853 | 857 | | |
854 | 858 | | |
| |||
1804 | 1808 | | |
1805 | 1809 | | |
1806 | 1810 | | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
1807 | 1835 | | |
1808 | 1836 | | |
1809 | 1837 | | |
| |||
0 commit comments