Skip to content

feat(gradle): TEST filter + stack trace truncation#4

Merged
Nava2 merged 6 commits intomasterfrom
rtk-gradle/test-filter
Mar 16, 2026
Merged

feat(gradle): TEST filter + stack trace truncation#4
Nava2 merged 6 commits intomasterfrom
rtk-gradle/test-filter

Conversation

@Nava2
Copy link
Collaborator

@Nava2 Nava2 commented Mar 16, 2026

Summary

  • Stack trace truncation: keep exception message + first assertion frame + up to 3 user-code frames, drop framework frames with ... N more summary
  • User frames kept regardless of position (not shadowed by framework frames in deep traces)
  • Passing test removal, JUnit discovery noise, STANDARD_OUT/ERR block removal
  • Configurable framework frame dropping via drop_frame_packages config:
    • Built-in (hardcoded): java.*, kotlin.*, sun.*, javax.*, jdk.*, jakarta.*, android.*, *.internal.*
    • Configurable defaults: org.gradle, org.junit.platform, org.junit.jupiter.engine, org.springframework, com.google.inject, io.grpc, org.mockito, io.mockk, org.eclipse.jetty
    • Unknown frames (not framework, not user) are kept — could be useful third-party code
  • Configurable user_packages from config.toml (default: empty, uses com.example.* fallback)
  • Caused by: chain handling with separate frame limits
  • No built-in INTEGRATION_NOISE — verified against real --console plain output (Hibernate/HikariPool/etc. don't appear in Gradle's console stream, only in JUnit reports)

Stack

scaffold <- global-filters <- compile <- test-filter <- detekt <- batch
                           ├── deps
                           └── health-proto

Test plan

  • Snapshot tests (success/failure/integration/with-packages), token savings >=60%
  • Stack trace truncation, caused-by chains, deep framework frames
  • Framework regex: builtin, internal, configured, user code exclusion
  • cargo fmt --all --check && cargo clippy --all-targets && cargo test --all

🤖 Generated with Claude Code

Copy link
Collaborator Author

Nava2 commented Mar 16, 2026

@Nava2 Nava2 force-pushed the rtk-gradle/compile branch from dfb3da9 to b7fcccc Compare March 16, 2026 13:55
@Nava2 Nava2 force-pushed the rtk-gradle/test-filter branch from f6341e7 to 64d745f Compare March 16, 2026 13:55
@Nava2 Nava2 force-pushed the rtk-gradle/compile branch from b7fcccc to 9fbe61d Compare March 16, 2026 14:08
@Nava2 Nava2 force-pushed the rtk-gradle/test-filter branch from 64d745f to 11e7cae Compare March 16, 2026 14:08
@Nava2 Nava2 force-pushed the rtk-gradle/compile branch from 9fbe61d to 5de49f4 Compare March 16, 2026 14:18
@Nava2 Nava2 force-pushed the rtk-gradle/test-filter branch from 11e7cae to acfa5c4 Compare March 16, 2026 14:18
@Nava2 Nava2 force-pushed the rtk-gradle/compile branch 2 times, most recently from 5386a79 to 6dad4f6 Compare March 16, 2026 14:23
@Nava2 Nava2 force-pushed the rtk-gradle/test-filter branch from acfa5c4 to f4c2e05 Compare March 16, 2026 14:23
@Nava2 Nava2 changed the base branch from rtk-gradle/compile to graphite-base/4 March 16, 2026 14:25
Nava2 and others added 5 commits March 16, 2026 14:25
Add src/gradle/test_filter.rs with:
- Passing test line removal (PASSED lines dropped)
- JUnit discovery/execution noise removal
- STANDARD_OUT/STANDARD_ERR block removal
- Integration test extra noise: Hibernate, HikariPool, Docker/Testcontainers, Spring
- Stack trace truncation: keep exception message + first assertion frame + up to 3
  user-code frames, drop framework frames with "... N more" summary
- Caused by: chain handling with separate frame limits
- Configurable user_packages from config.toml (default: empty, uses com.example.* fallback)

Token savings >=60% on test failure fixture. All failures preserved.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ON_NOISE

- Remove INTEGRATION_NOISE patterns from built-in (verified: not present in
  Gradle --console plain output, only in JUnit reports)
- Make framework frame drop list configurable via drop_frame_packages config
- Built-in hardcoded: java.*, kotlin.*, sun.*, javax.*, jdk.*, jakarta.*,
  android.*, *.internal.*
- Configurable defaults: org.gradle, org.junit.platform, org.junit.jupiter.engine,
  org.springframework, com.google.inject, io.grpc, org.mockito, io.mockk,
  org.eclipse.jetty
- Unknown frames (not framework, not user) are now kept instead of dropped

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Nava2 Nava2 force-pushed the rtk-gradle/test-filter branch from f4c2e05 to f0f8b76 Compare March 16, 2026 14:25
@Nava2 Nava2 force-pushed the graphite-base/4 branch from 6dad4f6 to d2efd00 Compare March 16, 2026 14:25
@graphite-app graphite-app bot changed the base branch from graphite-base/4 to master March 16, 2026 14:25
- ASSERTION_FRAME: narrowed org.assertj to org.assertj.core.api (keep API
  entry points as assertion frames, drop internals)
- Added org.assertj.core.internal to default drop_frame_packages
- Fixture: replaced synthetic Spring/Hibernate STANDARD_OUT content with
  realistic test logger output (these don't appear in --console plain)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Nava2 Nava2 force-pushed the rtk-gradle/test-filter branch from f0f8b76 to 1a4e2d9 Compare March 16, 2026 14:26
@Nava2 Nava2 merged commit fa8f2b7 into master Mar 16, 2026
0 of 2 checks passed
Copy link
Collaborator Author

Nava2 commented Mar 16, 2026

Merge activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant