Skip to content

Next Release - #3252

Merged
aeppling merged 17 commits into
masterfrom
develop
Jul 28, 2026
Merged

Next Release#3252
aeppling merged 17 commits into
masterfrom
develop

Conversation

@rtk-release-bot

@rtk-release-bot rtk-release-bot Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Feats

Fix

  • fix(cicd): git app token for next release #3250
  • fix(hook): detect Copilot CLI shell tool on Windows #3179
  • fix(search): display nb line only if requested #3182

Other

  • chore(deps): update colored to 3.1.1 #3249
  • refactor: replace lazy_static with LazyLock #3244
  • refactor: simplify regex initialization #3254

Adrien EPPLING and others added 10 commits July 23, 2026 12:54
show_line() emitted a `<lineno>:` prefix on every match by default,
suppressed only by -N. That diverges from grep (which shows line numbers
only with -n), so `cargo test | grep "test result:"` came back as
`266:test result: ...` and broke downstream parses like
`grep X | awk -F: '{print $1}'` -- violating RTK's transparency goal
(issue #1436) and driving agent retries in benchmarking.

Line numbers now appear only when the agent requests them (-n /
--line-number); -N / --no-line-number still force them off. grep -c and
exit codes are untouched (already faithful). Tests rebased onto the
plain-grep baseline.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EeBpaGF4TJsNWz12h6Sk3G
match_block hardcoded `path:line:content`, so overflow recovered via a
`+N more ... tail` hint carried a filename/line prefix the original grep
never showed (e.g. plain single-file grep). Mirror the primary output's
show_file/show_line so recovery is a faithful continuation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EeBpaGF4TJsNWz12h6Sk3G
Copilot CLI names its shell tool "powershell" on Windows, so detect_format
only ever matched "bash" and fell through to PassThrough. The native
CopilotCli branch — the one returning modifiedArgs without a permissionDecision
— was therefore unreachable on Windows, leaving only the Claude-compat
PreToolUse entry to answer, which emits "ask" and prompts on every command.

Verified against a live Copilot CLI 1.0.73 session on Windows 11: the payload
delivered is {"toolName":"powershell","toolArgs":"{\"command\":\"...\"}"} —
toolArgs is already the JSON-encoded string RTK expects, only toolName differed.

Refs #3178

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-powershell-tool

fix(hook): detect Copilot CLI shell tool on Windows
chore(deps): update colored to 3.1.1
fix(cicd): git app token for next release
TaKO8Ki and others added 5 commits July 28, 2026 04:22
…nitialization

refactor: simplify regex initialization
…line"

This reverts commit 792f432.

The tee block is recovery state, not command output. Mirroring the
display's show_file/show_line meant a plain `rtk grep pat file` that
capped at 25 of 100 matches wrote the 75 dropped ones to the tee as bare
content lines: no path, no line number, nothing to open. Nobody diffs the
tee against grep, so faithfulness buys nothing there and costs the one
property the tee exists for.

The display stays faithful, which was the point of 608e574: no -n means
no line numbers, -n means line numbers, byte-identical to grep both ways.
Only the recovery block goes back to being fully qualified.

Also:
- lock both halves with tests (match_block had none): show_line off by
  default / on for -n, --line-number and short clusters / off for -N,
  and match_block staying path:line:content when the display drops both
- fix the now-false module doc in grep_faithful_format_test.rs, which
  still claimed byte-identity with `grep -n` and "line number always",
  and drop the stale _grep_n suffixes from its test names
- drop a comment duplicating the show_file/show_line block above it
Strip the explanatory comments the branch accumulated and restore
match_block byte-for-byte to develop, so the diff is only what the
transparency fix needs: show_line() flips from opt-out to opt-in, plus
tests. Compression, capping and tee recovery are untouched.

Also drops a comment in run() that the flip made false.
Swapping the grep_n helper for grep_plain moved every scenario from the
-n path to the plain path, leaving exactly one assertion covering line
numbers. Both directions matter now that -n decides whether they appear,
so assert_eq_grep_with_and_without_n runs each case twice and the piped
stdin test loops over both forms.

Mutation-checked: reverting show_line to the old always-on form fails 10
of the 11 tests in this file.
fix(search): display nb line only if requested
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
4 out of 5 committers have signed the CLA.

✅ romain-cureau
✅ KuSh
✅ TaKO8Ki
✅ aeppling
❌ Adrien EPPLING


Adrien EPPLING seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@aeppling
aeppling merged commit a7fad1f into master Jul 28, 2026
37 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants