{"record":{"id":"2cd020b2c7b745c7","repo":"rtk-ai/rtk","slug":"unknown-filter-available-cargo-test-pytest-go-test-go-build","errorCode":null,"errorMessage":"Unknown filter '{}'. Available: cargo-test, pytest, go-test, go-build, ctest, tsc, vitest, grep, rg, find, fd, git-log, git-diff, git-status, log, mypy, ruff-check, ruff-format, sqlfluff-lint, prettier, phpunit, pest, paratest, php-test, ecs, phpstan, pint","messagePattern":"Unknown filter '(.+?)'\\. Available: cargo-test, pytest, go-test, go-build, ctest, tsc, vitest, grep, rg, find, fd, git-log, git-diff, git-status, log, mypy, ruff-check, ruff-format, sqlfluff-lint, prettier, phpunit, pest, paratest, php-test, ecs, phpstan, pint","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cmds/system/pipe_cmd.rs","lineNumber":274,"sourceCode":"pub fn run(filter_name: Option<&str>, passthrough: bool) -> Result<()> {\n    if passthrough {\n        std::io::copy(&mut std::io::stdin(), &mut std::io::stdout())\n            .map_err(|e| anyhow::anyhow!(\"Failed to relay stdin: {}\", e))?;\n        return Ok(());\n    }\n\n    let mut buf = String::new();\n    std::io::stdin()\n        .take((RAW_CAP + 1) as u64)\n        .read_to_string(&mut buf)\n        .map_err(|e| anyhow::anyhow!(\"Failed to read stdin: {}\", e))?;\n    if buf.len() > RAW_CAP {\n        anyhow::bail!(\"stdin exceeds {} byte limit\", RAW_CAP);\n    }\n\n    let filter_fn = match filter_name {\n        Some(name) => resolve_filter(name).ok_or_else(|| {\n            anyhow::anyhow!(\n                \"Unknown filter '{}'. Available: cargo-test, pytest, go-test, go-build, \\\n                 ctest, tsc, vitest, grep, rg, find, fd, git-log, git-diff, git-status, \\\n                 log, mypy, ruff-check, ruff-format, sqlfluff-lint, prettier, phpunit, pest, \\\n                 paratest, php-test, ecs, phpstan, pint\",\n                name\n            )\n        })?,\n        None => auto_detect_filter(&buf),\n    };\n\n    let output = apply_filter(filter_fn, &buf);\n    let shown = never_worse(&buf, &output);\n    print!(\"{}\", shown);\n    Ok(())\n}\n\n#[cfg(test)]\nmod tests {","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/rtk-ai/rtk/blob/0924356b4caba4989607227b7c8824d3d8098719/src/cmds/system/pipe_cmd.rs#L256-L292","documentation":"rtk's `rtk pipe <filter>` runs stdin through a named output filter. If the filter name passed after `pipe` does not exactly match one of the registered filter names, `resolve_filter` returns None and run() bails with this error listing every valid filter name.","triggerScenarios":"Running `rtk pipe <name>` (or invoking the pipe command programmatically via run()) with a name that is not in the resolver's table — e.g. a typo like 'cargo_test' instead of 'cargo-test', a removed/renamed filter like an old 'jest' alias, or a filter added in a newer rtk version than the installed binary.","commonSituations":"Shell scripts or agent configs written against a different rtk version; users guessing filter names instead of consulting the list; underscore vs hyphen mistakes; docs referencing filters that were consolidated into other names.","solutions":["Run the command again using one of the exact names printed in the error message (hyphenated, lowercase).","Check `rtk pipe --help` or the docs for the canonical filter list for your installed version.","Upgrade or downgrade rtk so the binary version matches the filter name your script expects.","If the command is not covered, use `rtk proxy <cmd>` or raw execution instead of a nonexistent filter."],"exampleFix":"// before\nrtk pipe cargo_test < output.txt\n// after\nrtk pipe cargo-test < output.txt","handlingStrategy":"validation","validationCode":"const VALID_FILTERS: &[&str] = &[\"cargo-test\",\"pytest\",\"go-test\",\"go-build\",\"ctest\",\"tsc\",\"vitest\",\"grep\",\"rg\",\"find\",\"fd\",\"git-log\",\"git-diff\",\"git-status\",\"log\",\"mypy\",\"ruff-check\",\"ruff-format\",\"sqlfluff-lint\",\"prettier\",\"phpunit\",\"pest\",\"paratest\",\"php-test\",\"ecs\",\"phpstan\",\"pint\"];\nfn is_valid_filter(name: &str) -> bool { VALID_FILTERS.contains(&name) }\n// call before rtk pipe <name>","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy filter names from the error message or --help rather than typing them from memory","Pin the rtk version in scripts so filter names stay in sync","Prefer hyphens over underscores in filter names"],"tags":["cli","filter","invalid-argument"],"backgroundTag":"invalid-cli-argument","analyzedSha":"0924356b4caba4989607227b7c8824d3d8098719","analyzedAt":"2026-09-19T19:25:29.612Z","contentChangedAt":"2026-09-19T19:25:29.612Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}