Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
392 changes: 1 addition & 391 deletions AGENTS.md

Large diffs are not rendered by default.

792 changes: 2 additions & 790 deletions README.md

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions assets/filters/airflow.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[filters.airflow]
description = "Keep airflow task state transitions and errors, drop INFO setup logs"
match_command = "^airflow\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
]
keep_lines_matching = [
"Marking task as SUCCESS",
"Marking task as FAILED",
"Task exited with return code",
"(?i)error",
"(?i)exception",
"(?i)traceback",
]
max_lines = 80
on_empty = "airflow: task done"
token_budget = 2000

[[tests.airflow]]
name = "task state and error kept"
input = """
[2024-06-01 12:00:00] INFO - Executing task on 2024-06-01
[2024-06-01 12:00:01] INFO - Started process to run task
[2024-06-01 12:00:05] ERROR - Task failed with exception
[2024-06-01 12:00:05] INFO - Marking task as FAILED
"""
expected = """[2024-06-01 12:00:05] ERROR - Task failed with exception
[2024-06-01 12:00:05] INFO - Marking task as FAILED"""

[[tests.airflow]]
name = "clean run collapses"
input = """
[2024-06-01 12:00:00] INFO - Executing task on 2024-06-01
[2024-06-01 12:00:01] INFO - Started process to run task
"""
expected = "airflow: task done"
33 changes: 33 additions & 0 deletions assets/filters/alex.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[filters.alex]
description = "Keep alex insensitive-language warnings and totals, drop filenames"
match_command = "^(npx\\s+)?alex\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
]
keep_lines_matching = [
"\\d+:\\d+(-\\d+:\\d+)?\\s+(warning|error)",
"✖",
"problems?\\b",
"(?i)error",
]
max_lines = 100
on_empty = "alex: no issues"

[[tests.alex]]
name = "warnings and total kept"
input = """
README.md
5:10-5:18 warning `master` may be insensitive, use `main` master retext-equality

✖ 1 warning
"""
expected = """ 5:10-5:18 warning `master` may be insensitive, use `main` master retext-equality
✖ 1 warning"""

[[tests.alex]]
name = "clean run collapses"
input = """
README.md
"""
expected = "alex: no issues"
38 changes: 38 additions & 0 deletions assets/filters/ansible-galaxy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[filters.ansible-galaxy]
description = "Keep ansible-galaxy install results and errors, drop download progress"
match_command = "^ansible-galaxy\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
"^- downloading ",
"^Starting galaxy",
"^Process install",
]
keep_lines_matching = [
"was installed successfully",
"is already installed",
"(?i)error",
"(?i)\\[warning\\]",
]
max_lines = 80
on_empty = "ansible-galaxy: nothing installed"

[[tests.ansible-galaxy]]
name = "install results kept"
input = """
Starting galaxy role install process
- downloading role 'nginx', owned by geerlingguy
- geerlingguy.nginx (3.1.4) was installed successfully
- downloading role 'postgresql'
- geerlingguy.postgresql (3.4.0) was installed successfully
"""
expected = """- geerlingguy.nginx (3.1.4) was installed successfully
- geerlingguy.postgresql (3.4.0) was installed successfully"""

[[tests.ansible-galaxy]]
name = "install error kept"
input = """
Starting galaxy role install process
ERROR! - the role 'missing.role' was not found
"""
expected = "ERROR! - the role 'missing.role' was not found"
50 changes: 50 additions & 0 deletions assets/filters/argocd.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[filters.argocd]
description = "Keep argocd app sync/health status and errors, drop verbose resource tree"
match_command = "^argocd\\b"
strip_ansi = true
keep_lines_matching = [
"^Name:",
"^Project:",
"^Namespace:",
"Sync Status:",
"Health Status:",
"^Phase:",
"^Message:",
"OutOfSync",
"(?i)error",
"(?i)fail",
]
max_lines = 40
on_empty = "argocd: ok"

[[tests.argocd]]
name = "status fields kept, resource tree dropped"
input = """
Name: myapp
Project: default
Server: https://kubernetes.default.svc
Namespace: prod
URL: https://argocd.example.com/applications/myapp
Sync Status: Synced to main (abc1234)
Health Status: Healthy

GROUP KIND NAMESPACE NAME STATUS HEALTH
apps Deployment prod web Synced Healthy
Service prod web Synced Healthy
"""
expected = """Name: myapp
Project: default
Namespace: prod
Sync Status: Synced to main (abc1234)
Health Status: Healthy"""

[[tests.argocd]]
name = "out of sync kept"
input = """
Name: myapp
Sync Status: OutOfSync from main
Health Status: Degraded
"""
expected = """Name: myapp
Sync Status: OutOfSync from main
Health Status: Degraded"""
40 changes: 40 additions & 0 deletions assets/filters/astro.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[filters.astro]
description = "Keep astro build totals and errors, drop per-page generated lines"
match_command = "^(npx\\s+)?astro\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
"▶ ",
"└─ ",
"^\\s*generating ",
]
keep_lines_matching = [
"page\\(s\\) built",
"Complete!",
"Server built",
"built in",
"(?i)error",
"(?i)fail",
]
max_lines = 60
on_empty = "astro: build done"

[[tests.astro]]
name = "build totals kept, per-page dropped"
input = """
12:00:00 [build] Building static entrypoints...
▶ src/pages/index.astro
└─ /index.html (+12ms)
12:00:01 [build] 10 page(s) built in 1.23s
12:00:01 [build] Complete!
"""
expected = """12:00:01 [build] 10 page(s) built in 1.23s
12:00:01 [build] Complete!"""

[[tests.astro]]
name = "build error kept"
input = """
▶ src/pages/index.astro
[ERROR] Could not resolve "./missing"
"""
expected = """[ERROR] Could not resolve "./missing\""""
39 changes: 39 additions & 0 deletions assets/filters/atlas.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[filters.atlas]
description = "Keep atlas migration version/status and errors, drop raw SQL"
match_command = "^atlas\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
"^\\s*-> ",
"No migration files",
]
keep_lines_matching = [
"Migrating to version",
"migrating version",
"^\\s*-- ok",
"Current version",
"(?i)error",
]
max_lines = 80
on_empty = "atlas: schema up to date"

[[tests.atlas]]
name = "migration steps kept, sql dropped"
input = """
Migrating to version 20240101 (1 migrations in total):

-- migrating version 20240101
-> CREATE TABLE users (id int primary key);
-> CREATE INDEX idx ON users (id);
-- ok (12.3ms)
"""
expected = """Migrating to version 20240101 (1 migrations in total):
-- migrating version 20240101
-- ok (12.3ms)"""

[[tests.atlas]]
name = "up to date collapses"
input = """
No migration files to execute
"""
expected = "atlas: schema up to date"
40 changes: 40 additions & 0 deletions assets/filters/attw.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[filters.attw]
description = "Keep are-the-types-wrong problem rows, drop OK rows and box borders"
match_command = "^(npx\\s+)?attw\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
"^[┌├└╭╞╰][─┬┼┴┄]+",
"🟢",
]
keep_lines_matching = [
"💥",
"❌",
"⚠️",
"Masquerading",
"no problems found",
"(?i)error",
]
max_lines = 60
on_empty = "attw: no problems found"

[[tests.attw]]
name = "problem rows kept, ok rows dropped"
input = """
mypackage v1.0.0

┌───────────────────┬──────────────────────┐
│ node10 │ 🟢 │
├───────────────────┼──────────────────────┤
│ node16 (from CJS) │ 💥 Masquerading as ESM │
└───────────────────┴──────────────────────┘
"""
expected = """│ node16 (from CJS) │ 💥 Masquerading as ESM │"""

[[tests.attw]]
name = "clean package collapses"
input = """
mypackage v1.0.0
🟢 No problems found
"""
expected = "attw: no problems found"
42 changes: 42 additions & 0 deletions assets/filters/autoflake.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[filters.autoflake]
description = "Keep autoflake changed-file lines and diffs, collapse clean runs"
match_command = "^autoflake\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
]
keep_lines_matching = [
"^Fixing ",
"^---",
"^\\+\\+\\+",
"^@@",
"^[+-][^+-]",
"(?i)error",
]
max_lines = 100
on_empty = "autoflake: nothing to fix"

[[tests.autoflake]]
name = "fix diff kept"
input = """
Fixing src/app.py

--- original/src/app.py
+++ fixed/src/app.py
@@ -1,4 +1,2 @@
import os
-import sys
-import json
print(os.getcwd())
"""
expected = """Fixing src/app.py
--- original/src/app.py
+++ fixed/src/app.py
@@ -1,4 +1,2 @@
-import sys
-import json"""

[[tests.autoflake]]
name = "clean run collapses"
input = ""
expected = "autoflake: nothing to fix"
38 changes: 38 additions & 0 deletions assets/filters/ava.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[filters.ava]
description = "Keep AVA failures and result counts, drop passing test lines"
match_command = "^(npx\\s+)?ava\\b"
strip_ansi = true
strip_lines_matching = [
"^\\s*$",
"^\\s*✔",
]
keep_lines_matching = [
"✖",
"tests? (passed|failed)",
"Rejected promise",
"(?i)error",
]
max_lines = 80
on_empty = "ava: all tests passed"

[[tests.ava]]
name = "failures and counts kept"
input = """
✔ passes test one
✔ passes test two
✖ fails test three

2 tests passed
1 test failed
"""
expected = """ ✖ fails test three
2 tests passed
1 test failed"""

[[tests.ava]]
name = "all pass collapses"
input = """
✔ passes test one
✔ passes test two
"""
expected = "ava: all tests passed"
Loading
Loading