solidprivacy-nl commited on
Commit
d6515fa
·
1 Parent(s): a3df5c7

Add diagnostic recall benchmark report artifact documentation

Browse files
Files changed (1) hide show
  1. RECALL_BENCHMARK_REPORT_ARTIFACT.md +193 -0
RECALL_BENCHMARK_REPORT_ARTIFACT.md ADDED
@@ -0,0 +1,193 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Diagnostic recall benchmark report artifact
2
+
3
+ Workpackage: `WP_RECALL_BENCHMARK_REPORT_ARTIFACT`
4
+
5
+ Repository: `solidprivacy-nl/scrub`
6
+
7
+ Scope: benchmark/tooling/tests/documentation-only.
8
+
9
+ This report artifact is diagnostic only. It is not a product claim, not a production quality gate and not a release threshold.
10
+
11
+ ---
12
+
13
+ ## Goal
14
+
15
+ The goal is to make the existing minimal recall benchmark runner output visible in GitHub Actions as downloadable JSON and Markdown artifacts.
16
+
17
+ The artifact helps answer:
18
+
19
+ - which synthetic gold labels were loaded;
20
+ - which analyzer/helper predictions were produced;
21
+ - which required labels were missed;
22
+ - which predictions hit preserve terms;
23
+ - which predictions hit known traps;
24
+ - where wrong-type or false-positive candidates appeared.
25
+
26
+ ---
27
+
28
+ ## Workflow
29
+
30
+ Workflow file:
31
+
32
+ ```text
33
+ .github/workflows/recall-benchmark-report.yml
34
+ ```
35
+
36
+ Workflow name:
37
+
38
+ ```text
39
+ Diagnostic recall benchmark report
40
+ ```
41
+
42
+ The workflow can be started manually with `workflow_dispatch` and also runs on pushes that touch recall benchmark files.
43
+
44
+ Steps:
45
+
46
+ 1. Checkout repository.
47
+ 2. Set up Python 3.10.
48
+ 3. Install test dependencies.
49
+ 4. Run corpus/runner/report tests.
50
+ 5. Generate the diagnostic report.
51
+ 6. Upload report files as a GitHub Actions artifact.
52
+
53
+ ---
54
+
55
+ ## Artifact
56
+
57
+ Artifact name:
58
+
59
+ ```text
60
+ diagnostic-recall-benchmark-report
61
+ ```
62
+
63
+ Artifact files:
64
+
65
+ ```text
66
+ output/recall_benchmark/recall_benchmark_report.json
67
+ output/recall_benchmark/recall_benchmark_summary.md
68
+ ```
69
+
70
+ ---
71
+
72
+ ## CLI
73
+
74
+ Generate locally or in CI:
75
+
76
+ ```bash
77
+ python recall_benchmark_report.py --corpus corpus --output output/recall_benchmark
78
+ ```
79
+
80
+ Strict mode validates report schema/integrity only:
81
+
82
+ ```bash
83
+ python recall_benchmark_report.py --corpus corpus --output output/recall_benchmark --strict
84
+ ```
85
+
86
+ Strict mode does not enforce recall, precision or quality thresholds.
87
+
88
+ ---
89
+
90
+ ## JSON format
91
+
92
+ The JSON file has this shape:
93
+
94
+ ```json
95
+ {
96
+ "metadata": {
97
+ "status": "diagnostic_only",
98
+ "synthetic_corpus": true,
99
+ "production_gate": false,
100
+ "thresholds_enforced": false
101
+ },
102
+ "report": {
103
+ "documents": [],
104
+ "summary": {}
105
+ }
106
+ }
107
+ ```
108
+
109
+ The `report` value is the direct diagnostic output from `recall_benchmark_runner.run_benchmark(...)`.
110
+
111
+ ---
112
+
113
+ ## Markdown format
114
+
115
+ The Markdown file contains:
116
+
117
+ - diagnostic status;
118
+ - synthetic corpus warning;
119
+ - no-threshold / no-product-claim warning;
120
+ - summary counts;
121
+ - per-document counts;
122
+ - interpretation notes.
123
+
124
+ Required warning language includes:
125
+
126
+ ```text
127
+ Status: diagnostic only
128
+ Generated from synthetic corpus
129
+ No production threshold
130
+ No product safety claim
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Interpretation
136
+
137
+ This artifact is useful for engineering review. It does not prove production safety.
138
+
139
+ Interpret carefully:
140
+
141
+ - exact matches are useful diagnostics;
142
+ - text-normalized matches are useful diagnostics;
143
+ - overlap matches are diagnostic only;
144
+ - missed required counts show what should be investigated;
145
+ - preserve-term hits can indicate over-masking risk;
146
+ - known-trap hits can indicate precision risk;
147
+ - candidate-scanner output is review-candidate visibility, not hard automatic masking proof.
148
+
149
+ ---
150
+
151
+ ## Boundaries
152
+
153
+ This package does not:
154
+
155
+ - change product UI;
156
+ - change recognizers;
157
+ - change candidate scanner logic;
158
+ - change export/download behavior;
159
+ - change Scrub Key behavior;
160
+ - change reinsert behavior;
161
+ - enforce thresholds;
162
+ - create a production gate;
163
+ - make a product accuracy claim.
164
+
165
+ ---
166
+
167
+ ## Why this is not a product claim
168
+
169
+ The artifact is generated from a small synthetic corpus. It is intended to make gaps visible, not to prove that all sensitive data is detected.
170
+
171
+ Allowed internal wording:
172
+
173
+ ```text
174
+ The diagnostic recall benchmark report artifact makes runner output visible in CI.
175
+ ```
176
+
177
+ Disallowed product claim:
178
+
179
+ ```text
180
+ Alle juridische nummers worden altijd herkend.
181
+ ```
182
+
183
+ ---
184
+
185
+ ## Likely next work
186
+
187
+ Possible next packages after separate approval:
188
+
189
+ ```text
190
+ WP_RECALL_BENCHMARK_THRESHOLDS_PLAN
191
+ WP_RECALL_BENCHMARK_REPORT_REVIEW
192
+ WP_DOCX_HYGIENE_RECALL_FOLLOWUP
193
+ ```