Skip to content

Comments

fix: handle compound shell commands in output filter matchers#481

Merged
bug-ops merged 3 commits intomainfrom
feat/m26.1/fix-tui-filter-metrics
Feb 17, 2026
Merged

fix: handle compound shell commands in output filter matchers#481
bug-ops merged 3 commits intomainfrom
feat/m26.1/fix-tui-filter-metrics

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 17, 2026

Summary

  • Fix output filter matchers not triggering when LLMs generate compound shell commands like cd /path && cargo test 2>&1 | tail -80
  • CommandMatcher::matches now extracts the last command segment from &&/; chains, stripping trailing pipes and redirections before matching
  • Root cause of filter metrics not appearing in TUI despite fix: propagate filter_stats to TUI metrics in native tool path #480 fix: filters never matched because the first token was cd, not cargo

Changes

  • zeph-tools/filter/mod.rs — split matches into matches_single + compound fallback via extract_last_command; 4 new tests

Test plan

  • cargo nextest run -p zeph-tools --lib — 344 passed, 0 failed
  • cargo clippy --workspace -- -D warnings — clean
  • Manual: run with --tui, verify filter stats appear in Resources panel for LLM-generated compound commands

@github-actions github-actions bot added bug Something isn't working size/M rust documentation Improvements or additions to documentation and removed bug Something isn't working labels Feb 17, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 17, 2026 17:44
CommandMatcher now extracts the last command segment from compound
expressions (cd /path && cargo test 2>&1 | tail) before matching.
This fixes filters not triggering when LLMs prepend cd or append
pipes/redirections to commands.
@bug-ops bug-ops force-pushed the feat/m26.1/fix-tui-filter-metrics branch from c6a6efb to 3eb3719 Compare February 17, 2026 17:46
@bug-ops bug-ops merged commit 3e56114 into main Feb 17, 2026
20 checks passed
@bug-ops bug-ops deleted the feat/m26.1/fix-tui-filter-metrics branch February 17, 2026 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation rust size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant