feat(mvn): enrich test output with Surefire/Failsafe XML reports#3
Open
feat(mvn): enrich test output with Surefire/Failsafe XML reports#3
Conversation
Co-Authored-By: ahundt <ATHundt@gmail.com>
+ remove unused import
What changed:
- Add `run_claude()` with permissions check, audit logging, tool_input
preservation, and Ask/Allow/Deny support
- Add `run_cursor()` with flat JSON format (`permission`/`updated_input`)
- Add `audit_log()` (best-effort append when RTK_HOOK_AUDIT=1)
- Fix `run_gemini()` to load exclude_commands from config
- Convert all hook stdout to `writeln!` with `#[deny(clippy::print_stdout)]`
to prevent JSON protocol corruption (Claude Code bug #4669)
- Replace string-based heredoc detection with lexer-based `has_heredoc()`
(quote-aware: `<<` inside quotes no longer false-positives)
- Add shell prefix peeling (noglob, command, builtin, exec, nocorrect)
to `rewrite_segment()` in registry.rs
- Fix python3 -m pytest pattern, add pip show, add gt (Graphite) to RULES
- Remove `command ` from IGNORED_PREFIXES (was blocking `command git status`)
- Register `rtk hook claude`/`rtk hook cursor` binary commands in
settings.json instead of writing bash script files
- Add legacy script migration (deletes old rtk-rewrite.sh on `rtk init`)
- Simplify hook_check and integrity for script-free model
Integrates ~30 develop commits (PR rtk-ai#997): AWS expansion (8→25 cmds), SSH signing for git commit/push, go test context, grep stdin leak fix, default-to-ask permissions, gh pr merge passthrough. Conflict resolution (4 files): - git.rs: kept .output()+stdin(inherit) for commit/push (SSH/GPG signing) - go_cmd.rs: accepted incoming + added pub(crate) visibility - hook_check.rs: merged binary_hook_registered + other_integration_installed - hook_cmd.rs: fixed permissions path, println→writeln for Gemini deny Verified: 1445 tests pass, 0 clippy errors, all manual integration tests pass. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…r, signal guard, pipe rewrite
- pipe_cmd: fix panic on multi-byte UTF-8 at 1024 byte boundary (floor_char_boundary in auto_detect_filter)
- pipe_cmd: cap stdin at 10 MiB to prevent OOM (reuses RAW_CAP)
- stream: hoist RAW_CAP to pub const at module level
- hook_cmd: check deny before get_rewritten in handle_vscode
(matches handle_copilot_cli and run_claude order)
- hook_cmd: escape backslash and pipe in audit log sanitizer
- tsc_cmd: hoist duplicate TSC_ERROR regex to single module-level
lazy_static
+ trigger feat release tag
4 fixes applied (all confirmed introduced by PR rtk-ai#956, all tests pass): - P0 NEW-passthrough — pipe_cmd.rs: passthrough before cap read - P1 BUFFERED-panic — stream.rs: catch_unwind on Buffered filter - P1 STREAM-postcap — stream.rs: stop feeding filter after cap - P2 OFFBYONE-rawcap — stream.rs: 5 cap boundary checks fixed 5 findings dropped (not introduced by PR or not bugs): - DENY-claude: pre-existing on master - AUDIT-asymmetry: intentional scope choice, not a bug - GEMINI-test: pre-existing test pattern from master - SAVINGS-threshold: 40% is correct (filters achieve ~46%) - STDERR-test: cosmetic CI, not correctness
- handle npm exec|run and their aliases - handle pnpm exec|run and their aliases like npm - handle pnpx and its alias like npx - handle all forms of js script/package execution Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
…npm test` commands as we don't know which test framework is used under the hood Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
…jest Also remove duration computation as there's no endTime attribute in json output Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
This reverts commit 94a3532. Build is no longer a pnpm command with specific handling. Signed-off-by: Nicolas Le Cam <niko.lecam@gmail.com>
feat(discover): handle more npm/npx/pnpm/pnpx patterns
fix(docs): use release please changelog no manual
feat(refacto-core): binary hook w/ native cmd exec + streaming
b64e6a1 to
5a71041
Compare
Add Java ecosystem support with state-machine parsers for mvn test, compile, checkstyle:check, and dependency:tree (97-99%+ token savings). Enrich test failure output with structured details from Surefire/Failsafe XML reports: stack traces segmented on Caused-by with framework frames collapsed, root-cause preserved, captured stdout/stderr per failing test. Autodetect application package from pom.xml groupId for frame classification (override via RTK_MVN_APP_PACKAGE). Time-gated report reads skip stale files. Red-flag heuristic for zero-test runs.
2a1eea8 to
b128e95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SurefireReportParser+StackTraceProcessorto Rust.pom.xml<groupId>autodetect for framework-frame classification.target/surefire-reports/andtarget/failsafe-reports/XMLs (time-gated bystarted_at) and appends structured failure details to the rtk mvn output.no tests runwith no fresh reports now surfaces a diagnostic instead of silently pretending everything is fine.RTK_MVN_APP_PACKAGEenv var.Spec:
docs/superpowers/specs/2026-04-15-mvn-surefire-xml-enrichment-design.mdPlan:
docs/superpowers/plans/2026-04-15-mvn-surefire-xml-enrichment.mdStacks on
feat/mvn-rust-module(upstream PR rtk-ai#1089).Test plan
cargo test --all— 1548 passed, 6 ignored (incl. new stack_trace, surefire_reports, pom_groupid, mvn_cmd tests)cargo fmt --all --check— cleancargo clippy --all-targets -- -D warnings— 6 pre-existing warnings on branch baseline (main.rs function_casts, hooks/ unused items); none introduced by this PR