Preview filter patterns
log10x_preview_filterPreview which log patterns a chosen enforcement mode would affect on a service before applying it, returning a ranked impact table and a CSV export.
Instructions
CALL THIS AFTER log10x_explain_mode when the user picks Preview. Shows the list of patterns that would be affected by applying a given enforcement mode to a service, before any action is taken. Returns a fixed-width plain-text table (no markdown pipes) with columns: rank, descriptor, volume, %, service, severity, first seen, trend sparkline. Writes a CSV to /tmp/log10x-preview--.csv. must_ask_user offers: drill into pattern #N (calls log10x_pattern_detail), Apply, or go back to pick a different mode. forbidden_next_actions locks log10x_configure_engine, log10x_pattern_mitigate, and log10x_advise_retriever until the user commits.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | The enforcement mode being previewed. Controls which patterns are highlighted as affected. | |
| top_n | No | Number of patterns to surface. Default 20. | |
| service | Yes | Service to scope the preview to. | |
| environment | No | Environment nickname for multi-env setups. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| tool | Yes | ||
| view | No | summary | |
| images | No | ||
| actions | No | ||
| summary | Yes | ||
| warnings | No | ||
| truncated | No | ||
| next_cursor | No | ||
| render_hint | No | ||
| generated_at | Yes | ||
| schema_epoch | Yes | ||
| schema_version | Yes |