rtk-ai / rtk-ai/rtk

hooks: track_tee_read records a read for Ask outcomes the user may reject

Open Beginner friendly
#3,953 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:cli bug good first issue priority:medium
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.