Commit Graph

364 Commits

Author SHA1 Message Date
Florian BRUNIAUX f2985ac5b4 Merge pull request #1217 from ousamabenyounes/fix/issue-1215 2026-04-13 10:30:10 +02:00
Florian BRUNIAUX 1436c2d6bb Merge pull request #1188 from ousamabenyounes/fix/git-push-u-flag-conflict-1086 2026-04-13 10:30:07 +02:00
Florian BRUNIAUX 8126a20824 Merge pull request #1200 from ousamabenyounes/fix/issue-1105 2026-04-13 10:30:04 +02:00
Florian BRUNIAUX e3a86a463b Merge pull request #1199 from ousamabenyounes/fix/issue-1101 2026-04-13 10:30:00 +02:00
Florian BRUNIAUX 9be5cc23f3 Merge pull request #1239 from KuSh/fix-pnpm-list 2026-04-13 10:29:57 +02:00
Florian BRUNIAUX b61f672ab8 Merge pull request #1227 from davidalecrim1/fix/cc-economics-hang 2026-04-13 10:29:55 +02:00
Florian BRUNIAUX 3223c76338 Merge pull request #1172 from iRonin/fix/curl-json-schema-values 2026-04-13 10:18:44 +02:00
Florian BRUNIAUX 60c8416c9e Merge pull request #1214 from rtk-ai/fix/permission-compound-allow-escalation 2026-04-13 10:18:41 +02:00
Florian BRUNIAUX 8f28a05917 Merge pull request #1173 from iRonin/fix/hook-auto-allow-bypass 2026-04-13 10:18:38 +02:00
Florian BRUNIAUX b41be60dd7 Merge pull request #1072 from rtk-ai/fix/tee-utf8-panic 2026-04-13 10:18:35 +02:00
Florian BRUNIAUX e09a53e5f7 Merge pull request #1181 from rtk-ai/rgpd-telemetry 2026-04-13 09:26:46 +02:00
Florian BRUNIAUX 24875a2e0d Merge pull request #798 from mgierok/fix/golangci-lint-run-wrapper-develop 2026-04-13 09:26:16 +02:00
Florian BRUNIAUX a9e857e725 Merge pull request #1036 from s2005/feat/liquibase 2026-04-13 09:26:11 +02:00
Florian BRUNIAUX f86c1521cc Merge pull request #961 from chojs23/fix/invalid-gh-pr-status-json-field 2026-04-13 09:25:53 +02:00
Florian BRUNIAUX 3606bce216 Merge pull request #940 from niklasmarderx/fix/yadm-support-567 2026-04-13 09:25:41 +02:00
Florian BRUNIAUX aa54613df8 Merge pull request #935 from Bortlesboat/fix/empty-pr-issue-list-output 2026-04-13 09:25:32 +02:00
Ousama Ben Younes 6b76fdb87d fix(git): remove -u short alias from --ultra-compact to fix git push -u
The global --ultra-compact flag used -u as its short form which caused
`rtk git push -u origin <branch>` to silently consume -u as ultra-compact
mode instead of forwarding it to git as --set-upstream. The push succeeded
but the upstream tracking branch was never written to .git/config, causing
subsequent plain `git push` calls to fail with "no upstream branch".

Fixes #1086

Generated by Claude Code
Vibe coded by ousamabenyounes

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-12 21:34:52 +00:00
Ousama Ben Younes 3db8070b51 fix(permissions): glob_matches middle-wildcard matches commands without trailing args (#1105)
When glob_matches processed a pattern like "git -C * diff:*" (normalized
to "git -C * diff *"), middle segment " diff " requires a trailing space
to match. For "git -C /path diff" the remaining text is "/path diff"
which ends with " diff" — no trailing space — so .find(" diff ") returned
None and the command was incorrectly rejected.

Fix: in the middle-segment branch, if the full substring search fails,
also check if the remaining text ends with the trimmed (right-stripped)
segment. This handles commands that terminate at the middle token with
no trailing arguments.

Add regression test covering the exact reproduction case from the issue.

Closes #1105

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:33:44 +00:00
Ousama Ben Younes dbeeaed16a fix(find): include hidden files when pattern targets dotfiles (#1101)
rtk find used WalkBuilder with .hidden(true), which skips ALL hidden
files and directories. As a result, `rtk find . -name ".claude.json"`
always returned "0 for '.claude.json'" even when the files existed.

Fix: detect when the -name pattern starts with a dot and set
.hidden(false) for that walk, so hidden entries are visited.
Non-dotfile patterns keep the default .hidden(true) behaviour.

Add regression tests covering both cases.

Closes #1101

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-12 21:33:44 +00:00
mgierok 24f2adaf8f fix(golangci-lint): support inline global flags before run
Handle --flag=value forms consistently in both the runtime parser and discover rewrite logic.
Add regression coverage for classify and rewrite paths using inline global flag values before run.
2026-04-12 23:14:47 +02:00
mgierok d85303ec48 fix(discover): preserve golangci-lint flags in rewrite
Normalize golangci-lint global flags before run during classification and keep them in rewritten commands.
Add regression coverage for classify_command and rewrite_command with pre-run global flags.
2026-04-12 23:14:47 +02:00
mgierok 4f4e4d2b5a fix(golangci-lint): restore run wrapper and align guidance
Keep bare golangci-lint invocations as passthrough while preserving compact filtering for golangci-lint run.
Update discover/rewrite rules, regression tests, and docs to advertise only the supported compact run path.
2026-04-12 23:14:47 +02:00
s2005 630f0a2800 Add liquibase TOML filter 2026-04-12 22:25:04 +02:00
aesoft 8156081261 fix(telemetry): clean code 2026-04-12 15:28:25 +02:00
aesoft 7821e9872f fix(telemetry): non-terminal consent, single config load
- P0: non-terminal `rtk init` no longer writes consent_given=false leaves consent as None so next interactive run prompts normally
- P1: maybe_ping() loads Config once instead of twice per command
2026-04-12 15:05:58 +02:00
aesoft 2e4cc4bb52 fix(telemetry): consent, erasure, auth, docs 2026-04-12 12:59:22 +02:00
aesoft 57502a5bef Merge pull request #588 from GokhanKabar/fix/pytest-quiet-mode-no-tests-collected
fix(pytest): -q mode summary line not detected
2026-04-12 12:22:53 +02:00
Nicolas Le Cam ba235d8597 fix(pnpm): list command not working
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
2026-04-12 02:31:06 +02:00
David Alecrim f68fa0087c fix(ccusage): add --yes flag and warn when falling back to npx
Fixes silent hang when ccusage is not installed globally. npx prompts
for confirmation before installing the package, blocking the subprocess
indefinitely. Adding --yes auto-confirms and the info message sets user
expectations.

Fixes rtk-ai/rtk#1226
2026-04-11 12:43:54 -03:00
Ousama Ben Younes 9722d5ebd8 fix(go): prevent double-counting failures when package-level fail cascades from test failures (#958)
go test -json emits both a test-level {"action":"fail","Test":"..."}
and a trailing package-level {"action":"fail"} (no Test field) for
every failing test. The parser was counting both events, so a run with
1 failing test was reported as "2 failed" in the summary header.

Fix: total_pkg_fail now only includes packages where package_failed is
true AND there are no individual test- or build-level failures — i.e.
pure package-level failures such as timeouts and panics. Also exclude
such packages from the [FAIL] display section when test-level results
are already shown below.

Three new tests cover:
- no double-count on a regular test failure
- exact reproduction from issue #958 (signal: quit line)
- timeout with passing tests before the kill

Generated by Claude Code
Vibe coded by ousamabenyounes

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-11 10:30:03 +00:00
Ousama Ben Younes 9979c69930 fix(git): re-insert -- separator when clap consumes it from git diff args (#1215)
clap's trailing_var_arg=true silently drops -- when it appears as the first
positional argument. This caused `rtk git diff -- <path>` to arrive in
run_diff without the separator, making git treat the path as a revision and
emit "fatal: ambiguous argument". Adds normalize_diff_args() which re-inserts
-- before the first path-like argument (contains /, \, starts with . or ~)
when -- is absent from the args vec. The fix is a no-op when -- is already
present (e.g. rtk git diff HEAD -- file preserves the separator correctly).

Generated by Claude Code
Vibe coded by ousamabenyounes

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-11 10:27:12 +00:00
aesoft aaf4d1d9fe Merge pull request #422 from KuSh/cleanup-warnings
chore: apply clippy suggestions
2026-04-11 12:08:40 +02:00
aesoft 2ba8d372df Merge pull request #270 from KuSh/pnpm-filters
feat(pnpm): Add filter argument support
2026-04-11 10:42:36 +02:00
Patrick szymkowiak 40c9dbc7db fix(hooks): require all segments to match allow rules (#1213)
Compound commands (`&&`, `||`, `|`, `;`) previously received
PermissionVerdict::Allow when *any single segment* matched an allow
rule. This allowed a permission escalation where an LLM agent could
chain an allowed command with an unapproved one (e.g.
`git status && git add .`) to bypass user confirmation.

Replace the `any_allow` flag with `all_segments_allowed` logic: every
non-empty segment must independently match an allow rule for the chain
to receive Allow. If any segment fails to match, the verdict demotes to
Default (ask). Deny still short-circuits on any match, and Ask still
wins over a partial Allow.

Also add a `saw_segment` guard and a `!allow_rules.is_empty()` check to
prevent a vacuous Allow on empty commands or empty rule sets.

Add 6 regression tests covering the reproduction case from #1213, all
four compound separators, and ask-wins-over-partial-allow precedence.

Fixes #1213

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-11 09:54:57 +02:00
CK iRonin.IT 40462c05e6 fix(hooks): ensure default permission verdict prompts user for confirmation 2026-04-10 13:54:02 -04:00
CK iRonin.IT 577c311eca fix(curl): skip JSON schema conversion for internal/localhost URLs 2026-04-10 13:54:00 -04:00
aesoft 6a5bc847e0 fix(telemetry): RGPD-compliant, consent gate, erasure, privacy controls
+ docs update
2026-04-10 16:04:08 +02:00
aesoft 95d9d134b0 Merge pull request #1141 from ousamabenyounes/fix/issue-602
fix(clippy): show full error blocks instead of truncated headline
2026-04-10 14:20:39 +02:00
aesoft a2576883a2 Merge pull request #1096 from michaelschleiss/fix/codex-home-init-path
fix(init): install Codex global instructions in CODEX_HOME
2026-04-10 12:27:21 +02:00
Ousama Ben Younes f4074f898a fix(clippy): show full error blocks instead of truncated headline
Previously `filter_cargo_clippy` only captured the first line of each
error diagnostic (truncated to 160 chars), discarding the file location,
code snippet, `^` markers, and `= note:` context that developers need to
actually fix the issue. This made rtk unusable for `cargo clippy -- -D warnings`.

Now errors are collected as full multi-line blocks (up to 15 lines each,
up to 10 errors total), matching the approach used by `filter_cargo_build`.
Warning grouping by lint rule is unchanged.

Fixes #602

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:22:19 +00:00
aesoft c16713a973 Merge pull request #890 from rtk-ai/fix/filter-truncation-621
fix(json): rename --schema to --keys-only, closes #621
2026-04-09 20:17:15 +02:00
michaelschleiss d442799e34 fix(init): honor CODEX_HOME for Codex global paths 2026-04-09 10:32:43 +02:00
aesoft 66b90f1ed3 Merge pull request #802 from Yosoyepa/feat/add-new-agents
feat(init): add support for kilocode and antigravity agents
2026-04-09 09:28:11 +02:00
aesoft 0b1c32b3cc Merge pull request #959 from tmchow/osc/958-fix-timeout-summary
fix: report package-level failures (timeouts, signals) in go test summary
2026-04-09 09:14:07 +02:00
aesoft 644c50f786 Merge pull request #1001 from rtk-ai/feat/telemetry-enrichment
feat(telemetry): enrich daily ping with gap detection and quality metrics
2026-04-09 08:57:21 +02:00
yosoyepa d0a3797ec5 feat(init): add native support for Kilo Code and Google Antigravity
Add rtk init --agent kilocode and rtk init --agent antigravity commands.

Kilo Code: installs .kilocode/rules/rtk-rules.md (project-scoped)
Google Antigravity: installs .agents/rules/antigravity-rtk-rules.md (project-scoped)

Both follow the same prompt-level guidance pattern as Cline and Windsurf,
using rules files that instruct the agent to prefix shell commands with rtk.
2026-04-08 15:37:29 -05:00
aesoft 224461b27e Merge pull request #1029 from rtk-ai/feat/refac-doc
docs: consolidate to user-facing guide only (removes duplicates and legacy flat docs)
2026-04-08 20:53:28 +02:00
Patrick szymkowiak be5c0576d9 fix(docs): update TELEMETRY.md to match code after review fixes
- passthrough_top example: "npm ci:8" -> "npm:8" (first word only)
- estimated_savings_usd_30d: $5/Mtok -> $3/Mtok (input pricing)
- Remove needless borrow in build_meta_usage (clippy)

Signed-off-by: Patrick Szymkowiak <patrick@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-08 17:30:24 +02:00
Patrick szymkowiak 15f666dd8d fix(telemetry): 7 bugs in enrichment — privacy leak, broken meta_usage, pricing
P0 fixes:
- top_passthrough: GROUP BY first word only, not full command args (privacy leak)
- build_meta_usage: use dedicated count query instead of scanning deduplicated top list (was always returning 0 or 1)

P1 fixes:
- Single Tracker connection per ping (was opening 2 SQLite connections)
- first_seen_days: propagate DB errors instead of unwrap_or(None)
- ecosystem_mix: bound to 90 days instead of full table scan
- avg_savings_per_command: compute per-command mean, not per-row mean
- estimated_savings_usd_30d: use $3/Mtok (Sonnet input rate) not $5/Mtok

Signed-off-by: Patrick Szymkowiak <patrick@rtk-ai.app>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
2026-04-08 11:10:29 +02:00
Trevin Chow c85a387363 fix: report package-level failures (timeouts, signals) in go test summary
When go test times out or is killed by a signal, the JSON stream
contains a package-level {"action":"fail"} with no Test field and no
FailedBuild field. The parser only handled test-level and build-level
failures, so this event was silently dropped. The summary then saw
0 passes + 0 fails and reported "No tests found" instead of the
actual failure.

The fix adds handling for package-level failures: a new else branch
in the fail handler, package-level output capture in the output
handler, and inclusion in the summary count and display.

Before: "Go test: No tests found"
After:  "Go test: 0 passed, 1 failed in 1 packages" with the
        timeout output shown under the package name.

Fixes #958

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 14:10:12 -07:00