analyze_logs() was reading the original log file from disk and sending its
full contents to external AI providers, completely bypassing the redaction
pipeline. The redacted flag in log_files and the .redacted file on disk were
written by apply_redactions() but never consulted on the read path.
Fix: query the redacted column alongside file_path. If the file has not been
redacted, return an error to the caller before any AI provider call is made.
When redacted, read from {path}.redacted instead of the original.
Adds redacted_path_for() helper and two unit tests covering the rejection
and happy-path cases.
|
||
|---|---|---|
| .. | ||
| ai | ||
| audit | ||
| commands | ||
| db | ||
| docs | ||
| integrations | ||
| ollama | ||
| pii | ||
| lib.rs | ||
| main.rs | ||
| state.rs | ||