Skip to content

Implement CloudDistiller for processing Docker, Kubernetes, Terraform, Helm, and AWS outputs#49

Merged
fajarhide merged 9 commits intomainfrom
feature/sprint-1-coverage
Apr 7, 2026
Merged

Implement CloudDistiller for processing Docker, Kubernetes, Terraform, Helm, and AWS outputs#49
fajarhide merged 9 commits intomainfrom
feature/sprint-1-coverage

Conversation

@fajarhide
Copy link
Copy Markdown
Owner

@fajarhide fajarhide commented Apr 6, 2026

PR Auto Describe

Summary

This major update for the Omni CLI adds specialized output parsing for cloud, adds standardized CLI output filtering for 12+ dev tools, JS/TS, and system commands, revamps the stats reporting CLI, consolidates GitHub CI workflows for faster, more reliable runs, and adds session-aware toolchain processing. It also configures the AI PR Describer GitHub Action for automated PR summaries.


Key Changes

  • GitHub Workflows: Updated AI PR Describer action, consolidated CI jobs with concurrency cancellation
  • Filters: Added 12+ pre-built output filters to clean up noisy CLI tool output
  • Core Pipeline: Updated distiller trait for session-aware processing, added automatic toolchain detection
  • New Features: Added 3 new specialized distiller modules for cloud, JS/TS, and system command outputs
  • CLI Overhaul: Rewrote omni stats with 4 distinct reporting modes and improved formatted output

Detailed Breakdown

GitHub Workflows

  1. AI PR Describer: Expanded trigger events to opened/synchronize/labeled/reopened, bumped action to v1.1.3, enabled auto-updates
  2. CI Overhaul: Consolidated former fmt/clippy/test/security/binary-check jobs into a single canonical make ci Ubuntu job, added concurrency grouping to cancel in-progress runs, restricted workflow permissions, split cross-platform Windows/macOS tests into a fail-fast matrix

CLI Output Filters

Added 12 new validated filter profiles in filters/ for common dev tools: Black, Bun, Cypress, .NET, golangci-lint, Jest, mypy, PHPUnit, Playwright, pnpm, Prisma, and Ruff. Each filter strips non-critical noise (progress bars, success banners, dependency logs) while preserving errors, warnings, and critical summaries, with included test cases for valid behavior. The existing phpunit.toml was also updated to improve filtering logic.

Core Pipeline & Distillers

  1. Updated the Distiller trait to add an optional SessionState parameter to the distill method
  2. Updated all existing internal distiller implementations to match the new trait signature
  3. Fixed bench benchmark calls to pass the required new session parameter (None for bench contexts)
  4. Added automatic toolchain detection in session_start.rs for JS/Rust/Python based on working directory, stored in session state
  5. Updated post_tool.rs to pass session state to distiller calls

New Distillers

Added 3 full specialized distiller modules:

  1. Cloud: Parses docker, k8s, terraform, helm, and AWS CLI output with error highlighting and summary reporting
  2. JS/TS: Parses vitest, tsc, eslint, playwright, and prettier output, with session-aware noise filtering for package manager logs
  3. System Ops: Parses ls, grep, find, tree, and env output, with automatic sensitive data redaction for env variables

CLI Stats Rewrite

  1. Completely rewrote src/cli/stats.rs with 4 operational modes:
    • Default: High-level savings summary across time periods
    • Detail: Full command-by-command breakdown with latency and session insights
    • By-Type: Content type mapping and savings statistics
    • JSON: Machine-readable output for CI/CD integration
  2. Added new helper functions for formatting bytes/tokens, progress bars, truncated command lists, and section separators
  3. Updated all existing tests and added new test cases for the revised command structure
  4. Improved terminal output with colored formatting, progress bars, and better readability

Documentation & Tests

  1. Updated docs/DEVELOPMENT.md to reflect the new CI workflow and local run instructions
  2. Added comprehensive snapshot tests for all new distillers
  3. Updated existing test suites to match revised code signatures

Notes

  • All new distillers include comprehensive snapshot tests for common command outputs
  • Session-aware toolchain detection automatically filters out noisy package manager logs for JS/TS workflows
  • Consolidated CI jobs keep local and hosted CI runs perfectly aligned via the project Makefile

Breaking Changes

  1. Distiller Trait API: The Distiller::distill method now accepts an optional SessionState parameter, which will break external custom Distiller implementations
  2. CLI Stats Command: Removed legacy --passthrough and --session flags, replaced with new --detail, --by-type, and --json modes; output format has been completely revised
  3. CI Workflows: Local CI runs must now use make ci instead of individual cargo commands like cargo fmt --check

…Kubernetes, Terraform, Helm, and AWS outputs
…nd/tree/env handling

- Add src/distillers/system_ops.rs with SystemOpsDistiller
- grep/ripgrep: group matches by file, show top 10, surface error lines (70-90% reduction)
- ls -la: summarize items/files/dirs/links count (60-80% reduction)
- find: group by file extension with samples (50-70% reduction)
- tree: extract summary + top-level directories
- env: MANDATORY secret REDACTION for SENSITIVE_PATTERNS (Gate 6 security)
- Register SystemOpsDistiller replacing temporary GenericDistiller mapping
- Add 4 test fixtures + 4 insta snapshot tests + 7 unit tests
- All 198 tests pass, 0 clippy warnings, pipeline bench 24.9µs
- Add src/distillers/jsts.rs managing Vitest, TSC, Playwright, Eslint, Prettier
- Vitest: summary extraction + failed tests deep dive (file:line)
- TSC: group and sort errors by file, top 5 display
- Playwright: parses chromium/firefox split results and trace outputs
- Eslint: specific inline and file-grouped parsing with rule-specific counters
- Prettier: reformatted/unchanged file sum extraction
- Replace generic JsTs mapping with proper JsTsDistiller
- Add integration fixtures (vitest_mixed, playwright_fail)
- Update and auto-generate 4 snapshot tests for all types
- All 202 tests pass, 0 clippy warnings, pipeline stable at ~24µs
@fajarhide fajarhide merged commit f706863 into main Apr 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant