-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.pmat-metrics.toml
More file actions
57 lines (49 loc) · 2.39 KB
/
Copy path.pmat-metrics.toml
File metadata and controls
57 lines (49 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# O(1) Quality Gate Metric Thresholds for Aprender
# Spec: Phase 2 O(1) Quality Gates with hash-based caching
# Pattern: Toyota Way - Jidoka (MEAN mode: warnings = errors)
[thresholds]
# Hard limits (block commits) - based on Makefile tier targets
lint_max_ms = 30_000 # 30s (Tier 1 target: sub-second lint-fast)
lint_full_max_ms = 60_000 # 60s (Tier 2 target: full clippy)
test_tier1_max_ms = 5_000 # 5s (Tier 1 target: sub-second focused tests)
test_tier2_max_ms = 300_000 # 5min (Tier 2 target: 1-5min full tests)
coverage_max_ms = 600_000 # 10min (Tier 2 coverage analysis)
bench_max_ms = 600_000 # 10min (Tier 3 benchmarks)
binary_max_bytes = 50_000_000 # 50MB (ML library with models)
# Soft limits (warnings only) - Tier 3 targets
build_release_max_ms = 300_000 # 5min (typical Rust build time)
mutation_test_max_ms = 3_600_000 # 60min (Tier 3 mutation testing)
fuzz_test_max_ms = 600_000 # 10min (Tier 3 fuzzing)
[staleness]
# Metrics older than this trigger warnings
max_age_days = 7
[enforcement]
# Pre-commit behavior (MEAN mode = strict)
fail_on_stale_metrics = false # Warn, don't block
fail_on_missing_metrics = false # Allow commits if no cache
fail_on_threshold_violation = true # Block commits on violations (MEAN mode)
[trend_analysis]
# Track metrics for Kaizen (continuous improvement)
enabled = true
retention_days = 90
alert_on_regression = true
regression_threshold_pct = 10.0 # Alert if >10% slower
# Aprender-specific quality gates
[quality_gates]
# EXTREME TDD targets (certeza-inspired)
min_coverage_pct = 95.0 # Target: ≥95% line coverage (achieved: 96.94%)
min_mutation_score_pct = 80.0 # Target: ≥80% mutation score
max_cyclomatic_complexity = 10 # Target: ≤10 per function
min_tdg_grade = "A" # Target: A or better (≥90)
max_unsafe_blocks = 0 # Target: 0 (unsafe_code = "forbid")
max_unwrap_calls = 0 # Target: 0 (Cloudflare-class defect prevention)
# File health thresholds
[file_health]
max_lines_per_file = 2000 # Files >2000 lines need refactoring
warning_lines_per_file = 1000 # Files >1000 lines get warnings
target_avg_health_pct = 85.0 # Target average health score
# Performance budgets
[performance]
# ML inference targets
min_inference_speedup = 1.0 # Baseline
max_regression_pct = 5.0 # ≤5% performance regression allowed