feat(zeph-tools): add declarative TOML-based output filter engine#734
Merged
feat(zeph-tools): add declarative TOML-based output filter engine#734
Conversation
Introduce a hybrid declarative filter system where generic strategies (strip_noise, truncate) are configured via TOML rules and compiled at startup. Hardcoded filters remain for complex logic; declarative rules cover common CLI tools (docker, npm, pip, make, pytest, go, terraform, kubectl, brew). - DeclarativeFilter implementing OutputFilter trait with compiled regexes - Embedded default-filters.toml with 10 pre-configured rules - User override via filters_path in FilterConfig - RegexBuilder with size_limit (1 MiB) and pattern length cap (512 chars) - File size limit (1 MiB) on user-provided filters.toml
…ngine Unify the output filter system by migrating all 6 hardcoded filters (cargo_build, test_output, clippy, git, dir_listing, log_dedup) into the declarative TOML-based engine as named built-in strategy types. Add 7 new strategies: keep_matching, strip_annotated, test_summary, group_by_rule, git_status, git_diff, dedup. Expand default-filters.toml from 10 to 19 rules. Simplify FilterConfig by removing 6 per-filter config structs. Security hardening: HashMap pre-allocation for dedup, NormalizeEntry replacement validation, empty patterns rejection, slice index guards. BREAKING: FilterConfig sub-structs (TestFilterConfig, GitFilterConfig, etc.) removed — filter parameters now live in TOML strategy fields.
This was referenced Feb 21, 2026
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
Test plan