solidprivacy-nl commited on
Commit
4a2ed4e
·
1 Parent(s): 7a682b2

Record Scrub Key JSON export UI integration

Browse files
Files changed (1) hide show
  1. CHANGELOG.md +67 -80
CHANGELOG.md CHANGED
@@ -26,6 +26,62 @@ For UI/UX-only work, prefer pure helper modules and tests before touching Stream
26
 
27
  ---
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ## v12.6 — Export sanity checks closeout
30
 
31
  Status: completed and administratively closed after coordinator closeout instruction.
@@ -51,17 +107,7 @@ Files added or changed in the full v12.6 line:
51
  Main changes:
52
 
53
  - Added pure helper logic for advisory export readiness checks.
54
- - Added Dutch user-facing warning text for:
55
- - unchecked `Controle nodig` rows;
56
- - candidate rows not included;
57
- - no replacements selected;
58
- - user review still required;
59
- - export not guaranteeing full anonymization.
60
- - Added readiness labels:
61
- - `Geen vervangregels gevonden — controleer handmatig`;
62
- - `Geen vervangingen geselecteerd`;
63
- - `Controle nodig vóór export`;
64
- - `Klaar voor export na gebruikerscontrole`.
65
  - Integrated the existing `export_sanity.py` helper into the Streamlit startup patch flow.
66
  - Added UI text for `Extra exportcontrole` near the existing v12.5 `Eindcontrole vóór download` block.
67
  - Added patch-level tests to guard that the export sanity helper is wired into the UI patch.
@@ -69,18 +115,9 @@ Main changes:
69
 
70
  Testing and verification:
71
 
72
- - Helper validation recorded in WP3A handover:
73
- - `PYTHONPATH=. pytest -q tests/test_export_sanity.py tests/test_review_summary.py` 12 passed.
74
- - Coordinator reconciled helper verification:
75
- - `Tests #58` green.
76
- - `Sync to Hugging Face Space #72` green.
77
- - commit `b0bf8ae`.
78
- - UI integration commits recorded:
79
- - `c60b9b4bfa8944e620546ca26a4fe42c287edaa0` — Integrate export sanity warnings into UI patch.
80
- - `f5158c9faf8e7676cb8403da0b42b0465539acfa` — Add export sanity UI patch tests.
81
- - `7d043d13096518d5dca6a5f187189fa3a8471627` — Update workpackage status for export sanity UI.
82
- - `4a84ddb7ca2b298ce2dcdcc5daf8b9f1cc055023` — Add export sanity UI handover.
83
- - WP3C was administrative closeout only; no new local pytest run was performed by this worker.
84
 
85
  Intentionally not changed:
86
 
@@ -97,35 +134,6 @@ Outcome:
97
 
98
  - v12.6 is closed.
99
  - v12 Review UX is complete through guidance, final review summary and export sanity warnings.
100
- - Next UI work should move to v13 Scrub Key JSON export only after coordinator approval.
101
-
102
- ---
103
-
104
- ## WP Status Reconciliation — WP3/WP4 verification evidence
105
-
106
- Status: reconciliation completed; GitHub Actions and Hugging Face sync could not be independently confirmed through the connector at that time.
107
-
108
- Purpose:
109
-
110
- - Verify and reconcile status for:
111
- - v12.6 export sanity commits;
112
- - v13.0 Scrub Key commits, especially `d65364373e4d3612044d8688ac17e11de81c07e5`.
113
- - Update project control files without changing code or UI behavior.
114
-
115
- Recorded repo evidence:
116
-
117
- - WP3 handover records local targeted validation:
118
- - `PYTHONPATH=. pytest -q tests/test_export_sanity.py tests/test_review_summary.py` → 12 passed.
119
- - WP4 changelog records local targeted validation:
120
- - `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
121
-
122
- Intentionally not changed:
123
-
124
- - No code files.
125
- - No UI files.
126
- - No tests.
127
- - No export semantics.
128
- - No Hugging Face app behavior.
129
 
130
  ---
131
 
@@ -151,26 +159,11 @@ Files added or changed:
151
 
152
  Main changes:
153
 
154
- - Added a Scrub Key specification for the future workflow:
155
- - `Scrub Review Scrub Key AI Reinsert Export Audit`.
156
- - Defined required mapping fields:
157
- - original value;
158
- - placeholder;
159
- - entity type;
160
- - user-facing type label;
161
- - source;
162
- - review status;
163
- - include state;
164
- - timestamp;
165
- - optional document/project/dossier label.
166
  - Added required safety language explaining that a Scrub Key makes scrubbed text reversible.
167
  - Explicitly classified the Scrub Key model as pseudonymization, not full anonymization.
168
- - Added local/protected key handling guidance and external-AI sharing warning.
169
- - Added deterministic pure helpers:
170
- - `build_scrub_key(rows, document_label=None)`;
171
- - `scrub_key_to_json(scrub_key)`;
172
- - `scrub_key_from_json(text)`;
173
- - `validate_scrub_key(scrub_key)`.
174
  - Set the v13.0 excluded-row policy to `omitted`, so unchecked rows are not written into the key.
175
  - Kept timestamp handling deterministic: the model does not create timestamps itself; validation catches missing timestamps.
176
 
@@ -183,8 +176,8 @@ Testing:
183
  Intentionally not changed:
184
 
185
  - No direct edit to `presidio_streamlit.py`.
186
- - No direct edit to `fix_streamlit_nested_expanders.py` for v13.
187
- - No export/download buttons for Scrub Key yet.
188
  - No reinsert UI.
189
  - No cloud processing.
190
  - No secret storage.
@@ -218,9 +211,6 @@ Main changes:
218
 
219
  - Added a pure helper that accepts review rows as dictionaries or DataFrame-like records.
220
  - Added summary counts for automatically detected rows, rows needing review, manual rows, remembered rows, checked rows, unchecked rows and open candidate warnings.
221
- - Added conservative include-flag parsing for boolean, numeric and Dutch/string values.
222
- - Added status inference from stable status values, Dutch status labels, source fields and manual/remembered entity markers.
223
- - Added Dutch readiness labels and markdown summary lines.
224
  - Integrated the summary into the existing startup UI patch so the app shows `Eindcontrole vóór download` immediately above the download section.
225
  - Kept the summary advisory only: it displays counts and readiness labels but does not block or alter downloads.
226
  - Formally closed v12.5 after coordinator/user verification.
@@ -230,10 +220,8 @@ Testing and verification:
230
  - Added unit tests for `review_summary.py`.
231
  - Added a UI patch contract test to verify that the summary helper is imported and displayed before downloads.
232
  - Local targeted validation before UI integration passed: `PYTHONPATH=. pytest -q tests/test_review_summary.py` → 5 passed.
233
- - Coordinator reported GitHub Actions tests green for the v12.5 review summary line.
234
- - Coordinator reported GitHub to Hugging Face sync green for the v12.5 review summary line.
235
- - Hugging Face app was visually verified and showed `Eindcontrole vóór download` before the download section.
236
- - Downloads were reported as still working after verification: text, CSV, DOCX and PDF.
237
 
238
  Intentionally not changed:
239
 
@@ -448,7 +436,6 @@ Summary:
448
 
449
  Possible directions:
450
 
451
- - Scrub Key JSON export UI.
452
  - Scrub Key import/reload.
453
  - AI-output reinsert.
454
  - Further recognizer expansion by legal domain.
 
26
 
27
  ---
28
 
29
+ ## v13.1 — Scrub Key JSON export UI integration
30
+
31
+ Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification.
32
+
33
+ Purpose:
34
+
35
+ - Add a local Scrub Key JSON download option after review.
36
+ - Make the reversible mapping workflow visible without adding import, reload, reinsert or AI-output behavior.
37
+ - Warn users that a Scrub Key is pseudonymization, not full anonymization.
38
+ - Preserve existing TXT, CSV, DOCX and PDF export/download behavior.
39
+
40
+ Files added or changed:
41
+
42
+ - `fix_streamlit_nested_expanders.py`
43
+ - `tests/test_scrub_key_ui_patch.py`
44
+ - `WORKPACKAGES.md`
45
+ - `CHANGELOG.md`
46
+
47
+ Main changes:
48
+
49
+ - Integrated the existing `scrub_key.py` pure model into the Streamlit startup patch flow.
50
+ - Added imports for `build_scrub_key`, `scrub_key_to_json` and `validate_scrub_key`.
51
+ - Added a `Scrub Key (JSON)` UI block near the existing final review/download section.
52
+ - Added a `Download Scrub Key (.json)` button with filename `solidprivacy_scrub_key.json`.
53
+ - Added user-facing warning text explaining that the Scrub Key makes replaced values locally reversible.
54
+ - Added user-facing warning text that this is pseudonymization, not full anonymization.
55
+ - Added user-facing warning text not to share the key with AI services or third parties unless consciously intended and allowed.
56
+ - Added timestamp creation in the UI/export layer so the pure `scrub_key.py` model remains deterministic and side-effect free.
57
+ - Added patch-level tests guarding the UI wiring and boundaries.
58
+
59
+ Testing and verification:
60
+
61
+ - Added `tests/test_scrub_key_ui_patch.py`.
62
+ - Local pytest was not run from the connector environment.
63
+ - Required follow-up validation:
64
+ - `PYTHONPATH=. pytest -q tests/test_scrub_key.py`
65
+ - `PYTHONPATH=. pytest -q tests/test_scrub_key_ui_patch.py`
66
+ - `PYTHONPATH=. pytest -q tests/test_export_sanity_ui_patch.py`
67
+ - preferably `PYTHONPATH=. pytest -q`
68
+ - GitHub Actions and Hugging Face sync are pending for the WP4B commits.
69
+ - Hugging Face app verification is pending.
70
+
71
+ Intentionally not changed:
72
+
73
+ - No direct edit to `presidio_streamlit.py`.
74
+ - No Scrub Key import/reload.
75
+ - No reinsert UI.
76
+ - No AI-output flow.
77
+ - No cloud processing.
78
+ - No secret storage.
79
+ - No real personal data.
80
+ - No change to TXT, CSV, DOCX or PDF download behavior.
81
+ - No change to existing replacement/export semantics.
82
+
83
+ ---
84
+
85
  ## v12.6 — Export sanity checks closeout
86
 
87
  Status: completed and administratively closed after coordinator closeout instruction.
 
107
  Main changes:
108
 
109
  - Added pure helper logic for advisory export readiness checks.
110
+ - Added Dutch user-facing warning text for unchecked `Controle nodig` rows, candidate rows not included, no replacements selected, required user review and export not guaranteeing full anonymization.
 
 
 
 
 
 
 
 
 
 
111
  - Integrated the existing `export_sanity.py` helper into the Streamlit startup patch flow.
112
  - Added UI text for `Extra exportcontrole` near the existing v12.5 `Eindcontrole vóór download` block.
113
  - Added patch-level tests to guard that the export sanity helper is wired into the UI patch.
 
115
 
116
  Testing and verification:
117
 
118
+ - Helper validation recorded in WP3A handover: `PYTHONPATH=. pytest -q tests/test_export_sanity.py tests/test_review_summary.py` → 12 passed.
119
+ - Coordinator reconciled helper verification: `Tests #58` green, `Sync to Hugging Face Space #72` green, commit `b0bf8ae`.
120
+ - WP3C was administrative closeout only; no new local pytest run was performed by that worker.
 
 
 
 
 
 
 
 
 
121
 
122
  Intentionally not changed:
123
 
 
134
 
135
  - v12.6 is closed.
136
  - v12 Review UX is complete through guidance, final review summary and export sanity warnings.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  ---
139
 
 
159
 
160
  Main changes:
161
 
162
+ - Added a Scrub Key specification for the future workflow: `Scrub → Review → Scrub Key → AI → Reinsert → Export → Audit`.
163
+ - Defined required mapping fields: original value, placeholder, entity type, user-facing type label, source, review status, include state, timestamp and optional document/project/dossier label.
 
 
 
 
 
 
 
 
 
 
164
  - Added required safety language explaining that a Scrub Key makes scrubbed text reversible.
165
  - Explicitly classified the Scrub Key model as pseudonymization, not full anonymization.
166
+ - Added deterministic pure helpers: `build_scrub_key`, `scrub_key_to_json`, `scrub_key_from_json` and `validate_scrub_key`.
 
 
 
 
 
167
  - Set the v13.0 excluded-row policy to `omitted`, so unchecked rows are not written into the key.
168
  - Kept timestamp handling deterministic: the model does not create timestamps itself; validation catches missing timestamps.
169
 
 
176
  Intentionally not changed:
177
 
178
  - No direct edit to `presidio_streamlit.py`.
179
+ - No direct edit to `fix_streamlit_nested_expanders.py` for v13.0.
180
+ - No export/download buttons for Scrub Key in v13.0.
181
  - No reinsert UI.
182
  - No cloud processing.
183
  - No secret storage.
 
211
 
212
  - Added a pure helper that accepts review rows as dictionaries or DataFrame-like records.
213
  - Added summary counts for automatically detected rows, rows needing review, manual rows, remembered rows, checked rows, unchecked rows and open candidate warnings.
 
 
 
214
  - Integrated the summary into the existing startup UI patch so the app shows `Eindcontrole vóór download` immediately above the download section.
215
  - Kept the summary advisory only: it displays counts and readiness labels but does not block or alter downloads.
216
  - Formally closed v12.5 after coordinator/user verification.
 
220
  - Added unit tests for `review_summary.py`.
221
  - Added a UI patch contract test to verify that the summary helper is imported and displayed before downloads.
222
  - Local targeted validation before UI integration passed: `PYTHONPATH=. pytest -q tests/test_review_summary.py` → 5 passed.
223
+ - Coordinator reported GitHub Actions tests green and GitHub to Hugging Face sync green for the v12.5 review summary line.
224
+ - Hugging Face app was visually verified and downloads were reported as still working: text, CSV, DOCX and PDF.
 
 
225
 
226
  Intentionally not changed:
227
 
 
436
 
437
  Possible directions:
438
 
 
439
  - Scrub Key import/reload.
440
  - AI-output reinsert.
441
  - Further recognizer expansion by legal domain.