hooks: track_tee_read records a read for Ask outcomes the user may reject
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 81.1k
- Forks
- 5.1k
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 35
Description
src/hooks/rewrite_cmd.rs records a tee read before the outcome is known to be accepted:
let outcome = evaluate(cmd, &excluded, &transparent_prefixes);
if !matches!(outcome, RewriteOutcome::Deny) {
track_tee_read(cmd);
}
Deny is excluded, but Ask is not - the read is recorded for a command the user may still reject at the prompt. Recall counters then include reads that never happened, which matters now that those counters drive the per-filter efficiency reporting.
Surfaced during review of #3278.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/hooks/rewrite_cmd.rs and inspect how evaluate produces RewriteOutcome values before track_tee_read is called. Trace the existing tee-read tracking and related tests, if present. Done means rejected Ask outcomes no longer contribute to recall counters, while accepted outcomes retain the intended tracking behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 85/100