feat(pipe): apply arbitrary TOML filter file via --toml - #3474
Open
schatt wants to merge 1 commit into
Open
Conversation
Enable draft filter preview without trusting the file into the agent path: `rtk pipe --toml draft.toml < captured.txt`. Complements name-based trusted lookup (rtk-ai#2999) for filter-authoring workflows. Refs rtk-ai#3473
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
rtk pipe --toml <path>to compile a TOML filter file and apply it to stdin — without consulting the trust store or writing trust entries.-f <name>with--tomlselects among filters in that file; a single-filter file needs no-f.compile_filters_from_path/compile_filters_from_str/select_compiled_filterfor this preview path (hard-fail on compile errors so draft iteration isn't silent).-f); this covers untrusted draft files by path for filter-authoring / dashboard preview workflows.Closes #3473
Trust model
--toml PATHis an opt-in preview: the user pointed at the file..rtk/filters.toml/ global filters into the agent rewrite path.RAW_CAP, panic catch, andnever_worse.Test plan
cargo fmt --all && cargo clippy --all-targets -- -D warnings && cargo test --alltests/pipe_toml_test.rs: single filter,-fselection, multi-filter requires-f, missing file, no trust requiredprintf 'a\nNOISE\nb\n' | rtk pipe --toml /tmp/draft.toml