fix: v0.6.8 bug sweep — 14 fixes from second audit#36
Merged
Conversation
Critical: - scavenger.rs:91 atomic_write (was std::fs::write, crash = corruption) - scavenger.rs:80 10MB size guard (OOM risk on large files) - ux.rs:403 wrong table name (file_phrases -> file_map, status was always 0) - heal.rs:63 detect_test_command (cargo/pytest/npm/go) - antidecision.rs extract_sed_target rewrite (was capturing s/old/new/ pattern) High: - antidecision.rs grammar-free: 25-item keyword ban -> structural heuristics - routes.rs normalize_url: host-only anthropic check - init.rs uninstall: file-based Pi detection, no pi --version - README: document Claude Code 501 limitation - config.rs:122 default Strict (was Reactive, matches docs) Cleanup: - 3 SQL PRAGMA corruptions: mcp.rs:53, ux.rs:402, scavenger.rs:60 - reindex.rs:118 bitwise | -> || - daemon.rs MAX_FILE_SIZE pub const, proxy.rs uses shared - antidecision.rs: delete dead code (format_annotation, annotate_tool_result) Tests: 267 passing (was 178, added 10 inline regression tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second-pass audit of v0.6.7 found 14 more bugs. This PR fixes all of them with regression tests.
Critical bugs (data safety / correctness)
std::fs::write(non-atomic)SELECT COUNT(*) FROM file_mapHigh priority
contains('anthropic')false-positives pathspi --version(hangs)Code quality
Test coverage
10 new inline regression tests (heal test command, sed pattern detection, anthropic host check, default mode, MAX_FILE_SIZE, structural identifier extraction). Total: 267 tests passing.
CI verification
cargo build --release: cleancargo clippy --all-targets -- -D warnings: cleancargo test --release: 267 passed, 0 failed