A 12-PR sprint: copilot/codex data-loss, gain accuracy, diff compat, security pass #1989
Replies: 2 comments
-
Update — 2026-05-21Quick status pulse on the sprint plus a second batch landed this morning. Sprint 1 status
Sprint 2 — five smaller PRs landed todayEach is independent, no stacking. Quality bar identical to sprint 1 (
What I deliberately did not PR
Numbers (sprint 2)
Happy to split or rework any of these if the direction looks off. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Final update — 2026-05-21 (later)Closing the loop on this sprint with two threads of additional work, then standing down. Community PR review batchFive rtk PRs that had been sitting in the queue without an outside review — I went through each, traced the diff against current
All five are MERGEABLE today and have at least one outside One more sprint-2-style fix landedWhile triaging the active issue list one more time, #2009 turned out to be a real data-correctness P0 that nobody else had picked up yet — and the diagnosis pointed straight at code I'd just been working in. #2016 —
Fix is a pure helper
Status snapshot
Standing downGoing to stop opening new PRs and let the queue settle. The merge cadence on Thanks for the time, and for the LGTM on #1976 — that one alone was satisfying to ship. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi RTK community 👋
Sharing a batch of contributions I just pushed for
develop. Goal was to land the most user-visible bugs and the secret-bearing surfaces in one focused pass. Twelve PRs total — three groups.Group 1 · P0 data-loss / config-poisoning (2 PRs)
Both were silently destroying user files on every
rtk init. Sticky and bad enough to lead the batch.fix(hooks/init): preserve user content in copilot-instructions.md(Fixes copilot-instructions.md overwrite #1964, URGENT : rtk overwrite the copilot / claude.md #1891)Routes the Copilot path through the same
<!-- rtk-instructions -->marker-block helper already used for CLAUDE.md / AGENTS.md. User content outside the block is preserved byte-for-byte; malformed pre-existing blocks are refused with a remediation message instead of silently rewritten.fix(hooks/codex): write RTK reference to AGENTS.override.md, not AGENTS.md(Fixes Codex rtk init edits .codex/AGENTS.md instead of .codex/AGENTS.override.md #1943)Codex's layering convention: tools should write to the local-override layer (
AGENTS.override.md), not the base layer. Legacy installs with RTK content already inAGENTS.mdare migrated cleanly; uninstall scrubs both files.Group 2 · P1 analytics, discover, diff (3 PRs)
fix(analytics/gain): cap per-call saved tokens at Claude tool-result ceiling(Fixes Misleading analytics: gain over-counts "tokens saved"; discover under-counts adoption when hook rewrites are in play #1973, rtk gain hallucinates massive token usage and savings on one day using rtk gain --daily #1935)Per-call "saved" attribution is capped at
CLAUDE_TOOL_RESULT_CAP = 25_000. Write-side caps new rows; read-side migration clamps historical rows in place. The "saved 12M tokens on onertk read" hallucination goes away — the dashboard now reflects actual Claude-quota savings rather than local processing volume.fix(discover): reclassify universal-passthrough git subcommands and flag pre-hook nature(Fixes rtk discover: false positives for git subcommands (checkout, clone, remote) #1897, refs Misleading analytics: gain over-counts "tokens saved"; discover under-counts adoption when hook rewrites are in play #1973 / rtk discover reports false missed savings — reads pre-hook transcript commands, not executed ones #1929)~30 git subcommands (checkout, clone, remote, reset, merge, rebase, etc.) move from "Unsupported" to "Supported + Passthrough". And when the RTK PreToolUse hook is detected, the report now warns that transcripts capture the pre-hook command (the full post-hook fix needs upstream Claude Code coordination).
fix(cmds/git/diff): preserve POSIX/git contract for programmatic consumers(Fixes rtk diff and rtk git diff produce output that breaks programmatic consumers (patch, git apply, --name-only, exit codes) #1918, rtk diff produces cascading false positives on insertions/deletions #1869; refs rtk git diff prepends diffstat, breaking git apply #1081)Non-TTY stdout + ~12 machine-friendly flags (
--name-only,--check,--exit-code,-z,--raw, etc.) trigger byte-for-byte passthrough sogit apply,patch, and shell loops round-trip again.rtk diff(file compare) now follows GNU exit-code convention (0 / 1 / 2).Group 3 · P2 ecosystem polish (4 PRs)
fix(cmds/ruby): accept version-only JSON from rubocop/rspec --version(Fixes rubocop/rspec --version parser rejects pure version JSON #1946)fix(hooks/rewrite): restore php → rtk php rewrite rule(Fixes php command is no longer rewritten to rtk php #1892, regression)fix(cmds/go): surface failure context inline instead of hiding in tee file(Fixes go test filter hides failure details, shows only summary + tee file path #1882)fix(hooks/exclude): match multi-token entries against command prefix(Fixes [hooks] exclude_commands does not cover subcommands (e.g. "git diff") #1919)Group 4 · Security & privacy (3 PRs, stacked) — Refs #1875
A focused three-PR pass on the four findings in #1875. Findings 2 + 3 share a call site and ship together.
fix(aws): redact secretsmanager get-secret-value payload(Finding 1)Default output emits Name + 8-hex SHA-256 prefix + (for JSON) top-level keys. Escape hatches:
RTK_REVEAL_SECRETS=1env /--reveal-secretflag. One-shot stderr warning on first redaction so the change isn't silent.feat(tracking): honour tracking.enabled and redact sensitive args(Findings 2 + 3)Introduces
src/core/redact.rswith alazy_static-cached regex bundle (URL userinfo, Bearer,--token=, inline env,ghp_/sk-/AKIA…heuristics).Tracker::recordis now gated ontracking.enabled+RTK_TRACK=0. Project paths default to<basename>#<8-hex-sha256>. One-shot migration viaPRAGMA user_version 0→2rewrites the last 90 days of rows.feat(tee): redact sensitive output and add per-command opt-out(Finding 4, stacked on feat(tracking): honour tracking.enabled and redact sensitive args #1987)Three layers: (1) slug blocklist (
aws_secretsmanager*,kubectl_get_secret*,gh_secret*,op_*,vault_*,git_config*, etc. refuse to persist), (2) content redactor reuses the regex bundle from feat(tracking): honour tracking.enabled and redact sensitive args #1987 and prepends--- rtk: N credential-like patterns redacted ---when matches found, (3)tee_and_hint_sensitivevariant forces redaction at 9 call sites in aws/curl/psql.Merge order matters: #1987 before #1988 (stacked).
Outside reviews
Also left LGTM / coordination comments on six in-flight community PRs:
periodfield) — LGTM, readyNumbers
cargo fmt --check,cargo clippy --all-targets(zero warnings),cargo test --bin rtk -- --test-threads=8(clean)Cargo.lockchanges committed (the existing0.34.3↔0.36.0toml/lock drift is unrelated and left for whoever does the next release bump)Heads-up on the current state
The 12 PRs are all currently blocked at CLA Assistant — the bot doesn't recognise my commit author name. I'll be sorting that out shortly (adding the commit email as a verified secondary on my GitHub account); once signed, all 12 should clear in one go. No code-level blockers as of writing — every PR is
MERGEABLEagainstdevelop, no failing CI checks, no requested changes.What's deliberately not in this batch
Listed in the spec for #1875 §6 (full design doc lives locally, can share if useful):
get-parameter --with-decryption/kubectl get secret -o yaml(file persistence is covered by the tee blocklist in feat(tee): redact sensitive output and add per-command opt-out #1988; the stdout-redaction parallel needs a per-filter pass)rtk privacymeta-command (users can still nuke~/.local/share/rtk/manually)Happy to split any of these into follow-up PRs once the current batch lands. Open to feedback on direction, scope, or anything that should be re-shaped.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions