You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: address audit round 3 findings P1, B1, P2, R1
P1 (HIGH): the PTY reader cloned the whole parser grid into latest_grid on
every output burst. Apply only the changed rows onto a persistent snapshot
instead (Grid::apply_dirty_row), syncing cursor and hyperlinks since GridDiff
carries neither. A criterion bench (nexterm-vt/benches/grid_snapshot) shows a
single-row update drop from ~19.1us to ~0.53us (~36x) for the common partial
-update case.
B1 (MEDIUM): std::sync::Mutex sites used .expect("...poisoned"), so one panic
while holding a lock cascaded into a panic on every later access. Add
lock_recover() which recovers the inner value and logs, and route the plugin
manager, web session/OAuth/TOTP-setup locks through it.
P2 (MEDIUM): Screen::take_dirty_rows now sizes the result Vec once from the
dirty-row count instead of reallocating as rows are pushed.
R1 (MEDIUM): glyph atlas LRU capacity math used unchecked u32 multiplication;
a large user-configured gpu.atlas_size (>= 65536) could overflow. Use
saturating u64 math with a non-zero fallback.
Tests: Grid::apply_dirty_row parity/bounds tests, lock_recover poison-recovery
test, glyph atlas overflow/zero-dimension tests. cargo test / clippy -D
warnings / fmt --check all green. The attach regression test
(make_full_refresh_reflects_pty_output_emitted_before_attach) is
cfg(not(windows)) and runs in Linux/macOS CI.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
* style: fix import ordering in grid_snapshot bench
The editor hook's rustfmt reordered the criterion import differently from the
workspace `cargo fmt --all`, which the CI `fmt --check` leg enforces. Normalize
with the workspace formatter.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
0 commit comments