You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fa55089
Browse filesBrowse the repository at this point in the historyBrowse files
Closesrtk-ai#3184.
mvnd is a separate binary, not a mvn wrapper, so it gets its own
`rtk mvnd` entry point rather than folding into `rtk mvn`: a user who
typed `mvnd` must get the daemon, never `mvn` or a `./mvnw` wrapper
that happens to sit in the working directory.
Everything downstream is shared — phase detection and all four filters
are reused unchanged. mvnd's rolling/parallel console UI only engages
on a TTY, so the output rtk captures is plain Maven output; daemon
status chatter carries no [INFO]/[ERROR] prefix and is already dropped
by the existing keep-lists.
- src/main.rs: `Commands::Mvnd` -> `mvn_cmd::run_daemon`
- src/cmds/jvm/mvn_cmd.rs: thread a `daemon` flag through binary
selection; `run`/`run_daemon` share `run_tool`
- src/discover/rules.rs: rewrite rule so the hook maps `mvnd <goal>`
to `rtk mvnd <goal>` (the `mvn\b` pattern never matched `mvnd`)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|`gradlew_cmd.rs`|`./gradlew`, `gradlew.bat`, `gradle`| Build / Test / ConnectedTest / Lint / Dependencies — streaming line filter + passthrough |
8
-
|`mvn_cmd.rs`|`mvn`, `./mvnw`, `mvnw.cmd`| Test / Compile / Package / Passthrough — buffered single-pass filter per phase |
8
+
|`mvn_cmd.rs`|`mvn`, `./mvnw`, `mvnw.cmd`, `mvnd`| Test / Compile / Package / Passthrough — buffered single-pass filter per phase |
9
9
10
10
## Maven (`mvn_cmd.rs`)
11
11
@@ -28,14 +28,15 @@ Key behaviours:
28
28
-**`<<< ERROR!` markers** — per-test sublines use `<<< ERROR!` for thrown (non-assertion) exceptions; the close-line regex also tolerates an `ERROR!` marker defensively (Surefire 3.5.5 emits `FAILURE!` even for errors-only classes — failure detection keys off the `Failures`/`Errors` counts, not the marker).
29
29
-**Help-boilerplate stripping (all modes)** — the post-failure block Maven emits after `[ERROR] Failed to execute goal` (`See …`, `-> [Help 1]`, `Re-run Maven`, `To see the full stack trace`, `For more information`, help URLs, bare `[ERROR]` dividers) is dropped in quiet *and* non-quiet filters alike (shared `BOILER_PREFIXES`). Deliberately kept as signal: `Failed to execute goal` itself and the multi-module resume hint (`[ERROR] After correcting the problems…` + `[ERROR] mvn <args> -rf :module` — tells the user/agent how to resume the build). Real durations (`Time elapsed: … s`, `Total time: …`) ship untouched — the numbers are diagnostic signal.
30
30
-**Wrapper detection** — `./mvnw` (POSIX) and `mvnw.cmd` (Windows) detected via string-literal `Command::new` (semgrep-safe); falls back to `resolved_command("mvn")`.
31
+
-**Maven Daemon (`rtk mvnd`)** — `mvnd` is a separate entry point (`run_daemon`), not a `mvn` alias: it shares phase detection and every filter, but always executes `mvnd` and is never substituted by a `./mvnw` wrapper found in the working directory. Its rolling/parallel console UI only engages on a TTY, so the captured output rtk filters is plain Maven output. Daemon status chatter (`Connecting to daemon`, …) carries no `[INFO]`/`[ERROR]` prefix and is dropped by the existing keep-lists.
31
32
-**Reactor Summary preservation** — for multi-module builds, the trailing `Reactor Summary for <root>` block with per-module SUCCESS/FAILURE rows is kept (toggled by a `[INFO] Reactor Summary for ` header and cleared on `BUILD SUCCESS` / `BUILD FAILURE`).
32
33
-**Failure cap** — both the count of emitted failing test classes and the size of the `[ERROR] Failures:` summary block are bounded by `MAX_MVN_FAILING_CLASSES = CAP_WARNINGS` (the shared test-failure cap class from `src/core/truncate.rs`, same binding as pytest/rspec/rake/runner). Excess emissions are replaced by a single `… +N more failing test classes` / `… +N more failures` tail (canonical `join_with_overflow` shape) to keep large failure sets compact; the raw output stays recoverable via the tee `[full output: …]` hint. Per the core cap policy, a cap of `0` means summary-only: no blocks emitted, the tail still counts every dropped class.
33
34
34
35
Token-savings tests run inline as part of `cargo test --all` and verify ≥90% savings for `mvn test` and ≥85% for `mvn install` on full synthetic fixtures (gzipped, ~1100 lines each). The `flate2` dependency (already in `Cargo.toml`) decompresses the ~3 KB gzipped fixtures in milliseconds.
35
36
36
37
### Integrity-check whitelist
37
38
38
-
`Commands::Mvn`is intentionally omitted from `is_operational_command` in `src/main.rs`, matching the gradle precedent (`Commands::Gradlew` also omitted). The whitelist guards SHA-256 hook-integrity verification; filter modules invoked through an already-verified hook do not need a second check on their own dispatch path. Per the comment above the function, the whitelist is opt-in by design and a forgotten command fails open rather than creating false confidence about what's protected.
39
+
`Commands::Mvn`and `Commands::Mvnd` are intentionally omitted from `is_operational_command` in `src/main.rs`, matching the gradle precedent (`Commands::Gradlew` also omitted). The whitelist guards SHA-256 hook-integrity verification; filter modules invoked through an already-verified hook do not need a second check on their own dispatch path. Per the comment above the function, the whitelist is opt-in by design and a forgotten command fails open rather than creating false confidence about what's protected.
0 commit comments