-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path.pmat-gates.toml
More file actions
122 lines (106 loc) · 3.2 KB
/
Copy path.pmat-gates.toml
File metadata and controls
122 lines (106 loc) · 3.2 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# PMAT Quality Gate Configuration for aprender
# ComputeBrick ecosystem - ML inference runtime
# Updated for PMAT v2.215.0
[gates]
# Run clippy linter
run_clippy = true
# Enforce strict clippy (-D warnings)
clippy_strict = true
# Run test suite
run_tests = true
# Test timeout in seconds
test_timeout = 600
# Check code coverage
check_coverage = true
# Minimum coverage percentage (target: 95%, achieved: 96.94%)
min_coverage = 95.0
# Check cyclomatic complexity
check_complexity = true
# Maximum cyclomatic complexity per function
max_complexity = 10
[exclude]
# mdBook generated files (not our code)
# Python helper scripts (one-off utilities, not production code)
patterns = [
"**/book/**",
"**/target/**",
"scripts/*.py",
]
[verification_ladder]
# GH-292: L5 (Lean proofs) is research-stage. L3 (falsification tests) is production-ready.
min_level = "L3"
[dependency_health]
# GH-292: 75-crate ML framework workspace needs arrow+wgpu+tokio+axum
# Individual crates stay under 250, but workspace aggregate is ~470
max_transitive = 500
[file_health]
# GH-292: Exclude generated files from file health checks
exclude = [
"**/generated_contracts.rs",
"**/browser.rs",
"**/browser_tests.rs",
"**/api_coverage.rs",
"**/gpu_coverage.rs",
"**/apr_coverage.rs",
"**/convert_coverage.rs",
"**/*_tests.rs",
"**/*_trainer_tests.rs",
"**/classify_trainer_tests.rs",
"**/training_plan_tests.rs",
"**/cuda_block.rs",
"**/cuda_trainer.rs",
"**/validators.rs",
"**/locator.rs",
"**/deterministic.rs",
"**/pipeline.rs",
"**/performance_parity.rs",
"crates/aprender-test-lib/**",
"crates/aprender-test-cli/**",
"crates/aprender-verify/**",
"crates/aprender-verify-ml/**",
"**/examples/**",
"**/tests/**",
"**/wgsl_forward.rs",
"**/cta64_wmma.rs",
"**/blis/compute.rs",
"**/ptop/app.rs",
"**/transformer/model.rs",
"**/finetune.rs",
"**/multi_adapter_pipeline.rs",
"**/wgsl_forward.rs",
"**/cta64_wmma.rs",
"**/classify_pipeline/tests.rs",
"crates/aprender-gpu/**",
"crates/aprender-train/**",
"crates/aprender-present-terminal/**",
"**/benches/**",
]
[tdg]
# CB-200: 21 functions below A are in non-release crates (test-lib, test-cli, train/cuda)
# These are complex GPU/inference functions where high cyclomatic complexity is inherent
min_grade = "B"
exclude = [
"crates/aprender-test-lib/**",
"crates/aprender-test-cli/**",
"crates/aprender-verify-ml/**",
"**/generated_contracts.rs",
"**/tensor_names_fallback.rs",
]
[dead_code]
# Library crates have higher "dead code" due to public APIs used by external consumers
# 30% threshold accounts for public APIs not called internally
max_dead_code_percent = 30.0
# Exclude files that are primarily public API surface
exclude_patterns = [
"src/nn/functional.rs", # PyTorch-style F.relu() API
"src/nn/init.rs", # Weight initialization API
"src/metrics/classification.rs", # sklearn-style metrics API
]
[compute-brick]
enabled = true
require_safety_comments = true
require_target_feature = true
cv_threshold_percent = 15.0
efficiency_threshold_percent = 25.0
[hooks]
pre_commit = ["pmat comply check --failures-only"]