feat(mvn): add Maven filter module — test, build, dependency:tree#1089
Open
mariuszs wants to merge 1 commit intortk-ai:developfrom
Open
feat(mvn): add Maven filter module — test, build, dependency:tree#1089mariuszs wants to merge 1 commit intortk-ai:developfrom
mariuszs wants to merge 1 commit intortk-ai:developfrom
Conversation
45f64f3 to
290958d
Compare
State-machine parser for mvn test (Preamble → Testing → Summary → Done), line filter for build goals, and dependency:tree filter stripping duplicates and version-managed annotations. Streaming passthrough for unrecognized goals. Replaces mvn-build.toml with Rust module achieving 90-99%+ token savings. 21 tests against 8 real-world fixtures.
290958d to
d22f22b
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
Adds a Rust filter module for Maven (
mvn) commands, replacing the oldmvn-build.tomldeclarative filter with a state-machine parser that achieves 90-99%+ token savings on real-world output.Subcommands
mvn test— State-machine parser (Preamble → Testing → Summary → Done) extracts failure names, assertion details, and run counts. Caps output to 10 failures with truncated lines. Handles multi-module builds, ANSI-heavy output, and large suites (3000+ tests).mvn build(compile/package/clean/install/verify) — Line filter strips[INFO]noise, download progress, and Testcontainers chatter. Keeps errors, BUILD result, and total time.mvn dependency:tree— Strips boilerplate, "omitted for duplicate" lines, and "version managed from" annotations. Preserves tree structure and conflict markers.cmd.status()(safe for long-running goals likespring-boot:run), with usage tracking.Routing
Clap
Mvnsub-enum withTest,Build,DepTree, and#[command(external_subcommand)] Othervariants. Build-like goals inOtherare auto-routed to the build filter. Auto-detectsmvnwwrapper.Token savings (measured on real project logs)
mvn testmvn dependency:treeOutput examples
Success:
mvn test: 950 passed, 9 skipped (01:32 min)Failure:
Tests
21 tests against 8 real-world fixtures (1310 lines total):
mvn test