Commit Graph

1133 Commits

Author SHA1 Message Date
aesoft 047f4545ce Merge pull request #1956 from vdufloth/feat/mvn-rust-module
feat(mvn)!: Rust module replacing TOML filter, adds test phase support
dev-0.43.0-rc.271
2026-06-08 13:41:34 +02:00
Vinicius Dufloth f8bc856078 style(mvn): align overflow tail with canonical '… +N more {label}' shape
Match the join_with_overflow convention (ellipsis char, '+N more' label)
used by container, aws, gh and glab so the LLM sees one consistent
overflow style. The tee '[full output: …]' recovery hint already comes
from core tee_and_hint via RunOptions::with_tee, so capped failure output
carries the canonical recovery path unchanged.
2026-06-07 14:36:46 -03:00
Vinicius Dufloth 3c0ee949d4 refactor(mvn): bind failure cap to truncate::CAP_WARNINGS, drop config knob
Replace the per-filter LimitsConfig::mvn_max_failures field with a local
const MAX_MVN_FAILING_CLASSES = CAP_WARNINGS, matching the canonical cap
binding used by pytest/rspec/rake/runner. Align cap = 0 semantics with the
core policy (summary-only: no blocks emitted, tail still counts) instead
of the old opt-out meaning, so the future config surface lands without a
special case.
2026-06-07 14:35:41 -03:00
Vinicius Dufloth f026cfd750 Merge branch 'develop' into feat/mvn-rust-module 2026-06-07 14:30:38 -03:00
aesoft 63a76dedff Merge pull request #1645 from KuaaMU/master
fix(filters): remove max_lines cap from helm filter that truncates template output
dev-0.42.4-rc.270
2026-06-07 15:36:42 +02:00
aesoft 9574007f77 Merge pull request #2135 from dessite/fix/aws-json-preserves-values-for-unsupported-subcommands
fix(aws): preserve values in JSON output for unsupported subcommands
2026-06-07 15:32:47 +02:00
aesoft 35273c2dc1 Merge pull request #2181 from rtk-ai/fix/curl-binary-passthrough-1087
fix(curl): passthrough binary downloads to prevent UTF-8 corruption (#1087)
dev-0.42.4-rc.268
2026-06-07 15:20:08 +02:00
Vinicius Dufloth df76528dd3 fix(mvn): strip post-failure help boilerplate in non-quiet mode
filter_quiet already dropped the help block Maven emits after
'Failed to execute goal' (See ..., -> [Help 1], Re-run Maven, help
URLs, bare [ERROR] dividers); the non-quiet paths kept it via the
[ERROR] catch-alls — keep_outside_block for test/package and
filter_compile's own [ERROR] branch.

Promote QUIET_BOILER_PREFIXES to a shared BOILER_PREFIXES (+
is_boilerplate(), which also covers the bare [ERROR] divider lines,
matching filter_quiet's existing drop) and reject boilerplate before
each [ERROR] catch-all. The list deliberately keeps the resume hint
([ERROR] After correcting the problems... / [ERROR]   mvn <args>
-rf :module) — actionable signal for resuming a multi-module build —
and the Failed to execute goal terminator.

keep_continuation hygiene (defensive parity, not a demonstrated bug):
filter_surefire only reset the flag inside its kept branch, so a
dropped [ERROR] line would leave it stale and a following indented
line could be wrongly kept. No committed fixture exhibits the leak;
add the same end-of-loop fall-through reset filter_package already
has. filter_compile resets on its new boilerplate drop path.

Multifail-slice savings rise from 19.9% to 42.3%; threshold pinned
at >=30% to match the reactor-fail precedent. README: document the
stripping and drop the stale duration-normalisation bullet (that
behaviour was removed in 77e28d0).
2026-06-06 11:12:10 -03:00
Vinicius Dufloth be28a51179 fix(ci): pin fixture line endings, harden CRLF tests
test (windows-latest) failed on the two CRLF tests: with no
.gitattributes, the Windows runner's core.autocrlf=true checks fixtures
out with CRLF, include_str! embeds \r\n, and the tests'
replace('\n', "\r\n") synthesis produces \r\r\n. str::lines() strips
only the final \r\n of each pair, leaving a stray \r that $-anchored
regexes (MODULE_BANNER, BUILD_FOOT) reject — dropping the module banner
and BUILD SUCCESS in the CRLF leg only. Real Maven CRLF output (single
\r\n) was always handled; only the synthesized double-CR leg broke.

Root-cause fix: tests/fixtures/** -text — fixtures are byte-exact
filter inputs; eol conversion must never touch them. Defense-in-depth:
the two CRLF tests normalize the embedded fixture back to LF before
synthesizing, so they stay correct even on checkouts without
attributes (zip downloads, pre-existing autocrlf clones).

Also fixes the test doc comment, which claimed str::lines() keeps the
trailing \r of a \r\n pair — it strips it; the hazard is the doubled
\r\r\n, not single CRLF.
2026-06-06 11:07:46 -03:00
Vinicius Dufloth 1050cfeadc fix(mvn): re-arm failure trail on per-test sublines
Surefire 3.x emits one blank-separated detail block per failing test
under a single class close line. The trail previously ended at the
first blank line and never re-armed, so failures after the first lost
their exception message (unindented -> dropped) and leaked the full
junit/jdk framework stack (indented -> kept by keep_continuation).

SurefireBlock now remembers the trail's keep/drop decision when it
ends at a blank line (trail_rearm) and re-enters the trail on the next
per-test subline with the same decision — a capped class drops all its
per-test blocks, not just the first. Any other non-blank line disarms
re-entry; RUNNING/commit/drop clear it so an unrelated class can never
inherit the decision. Extra blanks between per-test blocks stay armed.

Per-test sublines use '<<< ERROR!' for thrown (non-assertion)
exceptions — accept both markers via a shared is_per_test_subline()
(also reused by filter_quiet, which already re-armed correctly), and
widen the CLOSE regex to tolerate an ERROR! marker defensively
(Surefire 3.5.5 emits FAILURE! even for errors-only classes, per the
fixture capture; detection keys off the counts, not the marker).

Fixture captured from real Maven 3.9.9 / Surefire 3.5.5 output against
the new tests/fixtures/multifail-skeleton/ (CalcTest: assertion failure
+ thrown exception in one class; BoomTest: errors-only class). A
byte-exact pin locks the single-failure path unchanged.
2026-06-06 11:05:05 -03:00
aesoft 0a630fe9ac Merge pull request #2289 from rtk-ai/refacto/strip-output-decorators
refacto(cmds): strip decorator noise from filter output
dev-0.42.4-rc.267
2026-06-05 18:31:39 +02:00
Adrien Eppling 16d6599b4c refacto(cmds): strip decorator noise from filter output
Separator lines (═══, ---) and an emoji status marker cost tokens
without adding signal for the LLM — RTK output must never add noise
over raw. Semantic labels are kept; the emoji is swapped for plain
monochrome unicode.
2026-06-05 17:41:53 +02:00
aesoft 98108bfcd7 Merge pull request #2288 from rtk-ai/chore/merge-master-into-develop
chore: merge master into develop
dev-0.43.0-rc.264
2026-06-05 17:14:38 +02:00
Adrien Eppling a1ef0ef036 chore: merge master into develop (security port + release bump) 2026-06-05 17:13:31 +02:00
aesoft e1cd274ab9 Merge pull request #2286 from rtk-ai/fix/cve-permission-hardening-port
fix(security): port permission hardening from master + Copilot CLI adaptation
dev-0.43.0-rc.263
2026-06-05 17:07:52 +02:00
Adrien Eppling 66d66b1fe6 fix: semgrep markers on test-fixture sensitive paths 2026-06-05 16:20:08 +02:00
Adrien Eppling 7a985c7b22 test(hook): Copilot CLI acceptance tests 2026-06-05 16:03:00 +02:00
aesoft f525ceecf4 fix(openclaw): no execSync to avoid async dangerous cmds 2026-06-05 14:03:49 +02:00
aesoft e16aa26162 fix(permissions): >&file redirect no allow + scope Gemini/Cursor config 2026-06-05 14:03:48 +02:00
aesoft f88b6bec13 fix(permissions): project-first config lookup for Gemini/Cursor 2026-06-05 14:03:46 +02:00
aesoft 4c9b14ef54 refacto(permissions): fmt 2026-06-05 14:03:45 +02:00
aesoft 1ccf6e3da7 fix(permissions): add test for cursor and gemini settings perm 2026-06-05 14:03:44 +02:00
aesoft a4bb55efa9 fix(permissions): cursor and gemini use correct permissions settings file
-
2026-06-05 14:03:42 +02:00
aesoft 952245d39d fix(permissions): never auto-allow not evaluable + defer to the agent
- Decompose compound commands for permission checks (newline, background &, subshell `( )`) in addition to &&, ||, ;, | so hidden segments are checked.
- `contains_unattestable_construct`: flag command/process substitution and file-target redirects (fd-dup `2>&1` and /dev/null exempt) — RTK can't decompose these, so they are never auto-allowed.
- Route every host hook (Claude, VS Code, Gemini, Cursor, Copilot CLI) through a single decision flow. Precedence: Deny → (defer if unattestable) → Allow → Ask → Default. Auto-allow only on a positive Allow; otherwise defer to the host's own engine.
- Gemini: ask_user instead of hardcoded allow. Cursor: empty `{}` delegation, since permission:"ask" is not enforced on its sandboxed shell.
2026-06-05 14:02:06 +02:00
aesoft c873e19b0d Merge pull request #2283 from rtk-ai/release-please--branches--master--components--rtk
chore(master): release 0.42.2
v0.42.2
2026-06-05 12:57:30 +02:00
rtk-release-bot[bot] 4be04e0bdc chore(master): release 0.42.2 2026-06-05 10:48:27 +00:00
aesoft e1bc0bd9d0 Merge commit from fork
fix(permissions): never auto-allow not evaluable cmds, defer to hosts
2026-06-05 12:47:41 +02:00
aesoft ce362970e5 fix(permissions): >&file redirect no allow + scope Gemini/Cursor config 2026-06-03 20:56:44 +02:00
aesoft 084fa84e9a fix(permissions): project-first config lookup for Gemini/Cursor 2026-06-03 18:55:00 +02:00
aesoft 86ebbb3c5e refacto(permissions): fmt 2026-06-03 18:28:20 +02:00
aesoft f181184b40 fix(permissions): add test for cursor and gemini settings perm 2026-06-03 18:20:37 +02:00
aesoft 6ab149ba3e fix(permissions): cursor and gemini use correct permissions settings file
-
2026-06-03 18:15:19 +02:00
aesoft cdcdb6863a fix(permissions): never auto-allow not evaluable + defer to the agent
- Decompose compound commands for permission checks (newline, background &, subshell `( )`) in addition to &&, ||, ;, | so hidden segments are checked.
- `contains_unattestable_construct`: flag command/process substitution and file-target redirects (fd-dup `2>&1` and /dev/null exempt) — RTK can't decompose these, so they are never auto-allowed.
- Route every host hook (Claude, VS Code, Gemini, Cursor, Copilot CLI) through a single decision flow. Precedence: Deny → (defer if unattestable) → Allow → Ask → Default. Auto-allow only on a positive Allow; otherwise defer to the host's own engine.
- Gemini: ask_user instead of hardcoded allow. Cursor: empty `{}` delegation, since permission:"ask" is not enforced on its sandboxed shell.
2026-06-03 17:57:29 +02:00
aesoft 4f4a6a02ae Merge pull request #1266 from shalk/fix/commit-multibyte-panic-rebased
fix(git): fix panic on multibyte chars in commit output
dev-0.43.0-rc.260
2026-06-03 17:20:40 +02:00
aesoft 57e935094b Merge pull request #2239 from KuSh/1669-restore_double_dash-fix
fix(grep): command token duplication in output withsame value filename or positional arg
dev-0.43.0-rc.259
2026-06-03 15:55:22 +02:00
aesoft f490ab7819 Merge pull request #2240 from rtk-ai/release-please--branches--master--components--rtk
chore(master): release 0.42.1
v0.42.1
2026-06-03 14:43:24 +02:00
rtk-release-bot[bot] 9664e27038 chore(master): release 0.42.1 2026-06-03 12:37:40 +00:00
aesoft b91541961b Merge commit from fork
patch(openclaw): no execSync to avoid async dangerous cmds
2026-06-03 14:36:43 +02:00
aesoft 1bb17f4fd1 fix(openclaw): no execSync to avoid async dangerous cmds 2026-06-03 14:32:05 +02:00
Nicolas Le Cam 89ae19b1cf fix(grep): command token duplication in output withsame value filename or positional arg 2026-06-03 14:01:32 +02:00
patrick szymkowiak 4c278d18c8 Merge pull request #2002 from YOMXXX/feat/msrv-1.91
chore(cargo): declare MSRV via rust-version = "1.91"
dev-0.43.0-rc.256
2026-06-01 18:44:39 +02:00
patrick szymkowiak 68737644b7 Merge pull request #2188 from jsiu93/fix/go-build-pattern-errors
fix(go): respect build failure exit status
dev-0.43.0-rc.255
2026-06-01 15:16:28 +02:00
xiaozh f69ad6ed6f fix(go): respect build failure exit status
Gate go build success output on the child exit code and surface unrecognized non-zero build output instead of reporting success.

Closes #2185.
2026-06-01 00:00:43 +08:00
patrick 41285725e4 fix(gh): show fallback note when PR/issue body is filtered to empty
When `filter_markdown_body()` strips a PR or issue body to empty
(body contained only badges, images, HTML comments, or horizontal
rules), `format_pr_view` and `format_issue_view` previously skipped
the body section silently. Users had no indication that body content
had been present and filtered.

Now both views emit a fallback note when the filtered body is empty
but the raw body was not:

  PR view:    (body contained only badges/images/comments)
  Issue view: Description: (body contained only badges/images/comments)

The 4 added tests cover:
- PR body with only badges/images/comments -> fallback note appears
- PR body with real content -> no fallback note (sanity)
- PR body empty (raw) -> no fallback note (no signal to give)
- Issue body badges-only -> fallback note appears

Closes #235

Co-authored-by: polaminggkub-debug <polaminggkub-debug@users.noreply.github.com>
dev-0.43.0-rc.254
2026-05-31 17:35:20 +02:00
Christian C. Berclaz f1474b4c12 fix(init): use fs::canonicalize for symlink resolution
Simplify resolve_atomic_target() per review feedback — fs::canonicalize
handles chained symlinks, relative paths, and all edge cases.

Co-authored-by: Roopesh <roopesh1724989@gmail.com>
dev-0.43.0-rc.253
2026-05-31 17:18:06 +02:00
Christian C. Berclaz 508192dbdc fix(init): preserve settings.json symlink during atomic write
atomic_write() replaced symlinked settings.json with a regular file.
Now resolves symlink targets before the tempfile+rename so the link
itself is preserved and the real file gets updated.

Covers both absolute and relative symlink targets.

Closes #653
2026-05-31 17:18:06 +02:00
Nicolas Le Cam 83cd93e7d7 chore(args): introduce a more generic solution for restoring double dashes in args
Fixes #1669
dev-0.43.0-rc.252
2026-05-31 17:06:26 +02:00
aesoft 653a209485 Merge pull request #2172 from KuSh/2150-encode_project_path
fix(provider): sanatize more chars when encoding claude code project pathes
dev-0.43.0-rc.251
2026-05-31 16:31:08 +02:00
aesoft e9f42e5404 Merge pull request #2173 from KuSh/supported-agents-fixes
doc(init): fix documentation inconsistencies arount `rtk init`
2026-05-31 16:30:10 +02:00
patrick a2a63e15f4 fix(curl): passthrough binary downloads to prevent UTF-8 corruption
`rtk curl <binary-url>` silently corrupted any binary download
(tarballs, zip, png, pdf, ELF, ...) because the response body was
captured via `String::from_utf8_lossy` in `core::stream::exec_capture`.
Every non-UTF-8 byte got replaced with U+FFFD (3 bytes: 0xEF 0xBF 0xBD),
so gzip magic 1f 8b 08 00 arrived at downstream consumers as
1f ef bf bd 08 00 and `tar -xzf` complained "not in gzip format".

Now `rtk curl` runs `Command::output()` directly to keep stdout as
`Vec<u8>`, then checks `std::str::from_utf8(&bytes).is_err()`. If the
response is not valid UTF-8 (i.e. the lossy conversion would corrupt
it), raw bytes are written through to stdout via `write_all` and
tracking is recorded as passthrough (0% savings — token counts over
binary content have no meaning). The text/JSON code path is unchanged.

Verified live on 18 real binary formats (rtk's own release artifacts,
ripgrep, bat, fd, hyperfine, gh, tokei, kubectl ELF 51MB, rustup-init
20MB, W3C PDF, ISO 9899 PDF 4MB, GitHub avatar PNG, Wikimedia GIF,
WebP sample, MP3/MP4/WAV samples) — all byte-identical to raw curl.
10 text regression tests (JSON/HTML/Markdown/Cargo.toml/RFC) confirm
the text path keeps its existing behavior.

Closes #1087
2026-05-31 11:06:53 +02:00