Skip to content

Conversation

@timmilesdw
Copy link
Contributor

@timmilesdw timmilesdw commented Oct 8, 2025

Overview

Architectural overhaul of the shell-operator filter system that introduces pre-compilation of JQ expressions during configuration, eliminating runtime compilation overhead. The refactoring replaces the complex interface-based design with a simplified functional approach and consolidates all filtering logic.

Key changes:

  • Performance: JQ expressions now compiled once at configuration time instead of on every filter operation
  • Architecture: Replaced Filter interface with functional Run(expression, filterFn, obj) API
  • Consolidation: Consolidated pkg/filter/jq/ subdirectory into main pkg/filter/ package
  • Precedence: Implemented explicit filter precedence: custom filter function > JQ expression > no filter
  • Testing: Added comprehensive test suite covering all scenarios

Benefits:

  • Simplified architecture and maintenance
  • Clear filter precedence rules
  • Consolidated codebase
  • 100% backward compatibility maintained

Special notes for your reviewer

Internal refactoring - no breaking changes. Major code simplification while preserving functionality.

Signed-off-by: Timur Tuktamyshev <[email protected]>
Signed-off-by: Timur Tuktamyshev <[email protected]>
Signed-off-by: Timur Tuktamyshev <[email protected]>
@timmilesdw timmilesdw self-assigned this Oct 8, 2025
@timmilesdw timmilesdw added the enhancement New feature or request label Oct 8, 2025
Signed-off-by: Timur Tuktamyshev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants