chore: remove dead code and finish the incomplete fixes - #89
Draft
pixincreate wants to merge 1 commit into
Draft
Conversation
Shell::as_str, OutputFormat::as_str, ExitMode::as_str and KeywatchConfig::load had no call sites anywhere in src/ or tests/. --update-baseline loaded and parsed the same baseline file twice per run, once to filter and once to update. is_baseline_file ran realpath(2) on every scanned file now that baseline discovery is the default; it compares file names first, so only candidates that could possibly be the baseline pay for the syscall. The broken-pipe fix only covered the scan summary, so 'hook install | head' and 'init | head' still panicked. The writer moved to utils and is used by every command. update_with_findings only ever appends, so entries for deleted files and rotated credentials suppressed findings forever, and the update-baseline workflow could only produce additive diffs. --prune-baseline rebuilds from what the scan actually found.
pixincreate
force-pushed
the
fix/scan-mode-consistency
branch
from
August 26, 2026 17:32
2eccaf5 to
9798514
Compare
pixincreate
force-pushed
the
chore/cleanup
branch
from
August 26, 2026 17:32
93353a1 to
93b4574
Compare
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.
Stacked on #88.
Summary
Dead code, duplicated work, and two fixes from earlier PRs that only covered part of their surface.
Changes
Shell::as_str,OutputFormat::as_str,ExitMode::as_strandKeywatchConfig::loadhad zero call sites insrc/ortests/.Baseline::loadran twice per--update-baseline— once to filter, once to update — reparsing the same JSON.is_baseline_filedid arealpath(2)on every scanned file now that baseline discovery is the default. It compares file names first, so only real candidates pay for the syscall.key-watch hook install pre-commit | headandkey-watch init bash | headstill panicked. The writer moved toutilsand every command uses it.update_with_findingsappends, and findings are filtered against the baseline before the update, so entries for deleted files and rotated credentials suppressed forever — meaning theupdate-baselineworkflow could only ever produce additive diffs. New--prune-baselinerebuilds from what the scan actually found.Tests
187 pass. New:
--prune-baselinedrops an entry for a deleted file while a plain--update-baselinekeeps it.