solidprivacy-nl commited on
Commit
4d8bfe9
·
1 Parent(s): 4a1ef55

Record Scrub Key import UI integration

Browse files
Files changed (1) hide show
  1. CHANGELOG.md +68 -28
CHANGELOG.md CHANGED
@@ -26,9 +26,65 @@ For UI/UX-only work, prefer pure helper modules and tests before touching Stream
26
 
27
  ---
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  ## v13.2 — Scrub Key import/reload helper and tests
30
 
31
- Status: helper and tests implemented; awaiting GitHub Actions and Hugging Face sync confirmation.
32
 
33
  Purpose:
34
 
@@ -67,23 +123,17 @@ Main changes:
67
  Testing:
68
 
69
  - Added `tests/test_scrub_key_import.py`.
70
- - Tests cover:
71
- - valid Scrub Key JSON import;
72
- - normalized row mapping;
73
- - privacy warning;
74
- - empty JSON text;
75
- - invalid JSON syntax;
76
- - invalid top-level format;
77
- - structural validation errors;
78
- - no input mutation;
79
- - synthetic Dutch legal values only.
80
- - Local pytest was not run from this connector environment.
81
- - Required follow-up validation:
82
- - `PYTHONPATH=. pytest -q tests/test_scrub_key.py`
83
- - `PYTHONPATH=. pytest -q tests/test_scrub_key_import.py`
84
- - preferably `PYTHONPATH=. pytest -q`
85
-
86
- Intentionally not changed:
87
 
88
  - No UI changes.
89
  - No direct edit to `fix_streamlit_nested_expanders.py`.
@@ -96,11 +146,6 @@ Intentionally not changed:
96
  - No real personal data in tests.
97
  - No change to TXT, CSV, DOCX or PDF download behavior.
98
 
99
- Next step:
100
-
101
- - Verify GitHub Actions and Hugging Face sync.
102
- - After green validation, plan `WP5B — v13.2 Scrub Key import/reload UI integration` as a separate sequential UI workpackage.
103
-
104
  ---
105
 
106
  ## v13.1 — Scrub Key JSON export UI closeout
@@ -174,7 +219,6 @@ Intentionally not changed:
174
  Outcome:
175
 
176
  - v13.1 Scrub Key JSON export is complete.
177
- - The next planned phase is v13.2 Scrub Key import/reload helper and tests.
178
 
179
  ---
180
 
@@ -254,10 +298,6 @@ Outcome:
254
 
255
  Possible directions:
256
 
257
- - Scrub Key import/reload UI.
258
  - Deterministic reinsert helper.
259
  - AI-output reinsert.
260
  - Further recognizer expansion by legal domain.
261
- - Local packaging research.
262
- - More advanced DOCX/PDF preservation.
263
- - Better synthetic long-form legal test documents.
 
26
 
27
  ---
28
 
29
+ ## v13.2 — Scrub Key import/reload UI integration
30
+
31
+ Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification.
32
+
33
+ Purpose:
34
+
35
+ - Integrate the existing Scrub Key import/reload helper into the Streamlit startup patch flow.
36
+ - Let the user upload or paste a previously exported Scrub Key JSON.
37
+ - Validate imported Scrub Keys before loading mappings into the current review/replacement table.
38
+ - Keep import/reload local and separate from deterministic reinsert or AI-output workflows.
39
+
40
+ Files added or changed:
41
+
42
+ - `fix_streamlit_nested_expanders.py`
43
+ - `tests/test_scrub_key_import_ui_patch.py`
44
+ - `WORKPACKAGES.md`
45
+ - `CHANGELOG.md`
46
+ - `handover/workpackages/20260607_1645_v13_2_scrub_key_import_ui.md`
47
+
48
+ Main changes:
49
+
50
+ - Added the `Scrub Key laden` UI section near the existing `Scrub Key (JSON)` export block.
51
+ - Added upload support for Scrub Key JSON files.
52
+ - Added paste support for Scrub Key JSON text.
53
+ - Reused the existing `build_scrub_key_import_result(...)` helper instead of duplicating parsing or validation logic.
54
+ - Added visible validation feedback before mapping rows are loaded.
55
+ - Added warnings that a Scrub Key makes values locally reversible and is pseudonymization, not full anonymization.
56
+ - Added warning text that the key must stay local and protected and should not be shared with AI services or third parties unless consciously intended and allowed.
57
+ - Loaded validated mapping rows into the current replacement table only after the visible `Valideer en laad Scrub Key` user action.
58
+ - Kept the existing `Download Scrub Key (.json)` export block.
59
+
60
+ Testing:
61
+
62
+ - Added `tests/test_scrub_key_import_ui_patch.py`.
63
+ - Local targeted validation on the reconstructed connector subset passed:
64
+ - `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
65
+ - `PYTHONPATH=. pytest -q tests/test_scrub_key_import.py` → 8 passed.
66
+ - `PYTHONPATH=. pytest -q tests/test_scrub_key_import_ui_patch.py` → 9 passed.
67
+ - `PYTHONPATH=. pytest -q tests/test_scrub_key_ui_patch.py` → 12 passed.
68
+ - `PYTHONPATH=. pytest -q` on the available subset → 35 passed.
69
+
70
+ Intentionally not changed:
71
+
72
+ - No direct edit to `presidio_streamlit.py`.
73
+ - No deterministic reinsert behavior.
74
+ - No AI-output flow.
75
+ - No automatic document rehydration.
76
+ - No silent replacement of review rows without a visible user action.
77
+ - No change to TXT, CSV, DOCX or PDF export behavior.
78
+ - No change to existing Scrub Key JSON export behavior.
79
+ - No cloud processing.
80
+ - No server-side Scrub Key storage.
81
+ - No secrets, tokens or real personal data.
82
+
83
+ ---
84
+
85
  ## v13.2 — Scrub Key import/reload helper and tests
86
 
87
+ Status: helper and tests implemented; coordinator evidence reported green checks before UI integration.
88
 
89
  Purpose:
90
 
 
123
  Testing:
124
 
125
  - Added `tests/test_scrub_key_import.py`.
126
+ - Tests cover valid Scrub Key JSON import, normalized row mapping, privacy warning, empty JSON text, invalid JSON syntax, invalid top-level format, structural validation errors, no input mutation and synthetic Dutch legal values only.
127
+ - Coordinator evidence supplied for green checks before UI integration:
128
+ - Tests #83 green;
129
+ - Tests #84 green;
130
+ - Sync to Hugging Face Space #98 green;
131
+ - Tests #85 green;
132
+ - Sync to Hugging Face Space #99 green;
133
+ - Tests #86 green;
134
+ - Sync to Hugging Face Space #100 green.
135
+
136
+ Intentionally not changed in helper phase:
 
 
 
 
 
 
137
 
138
  - No UI changes.
139
  - No direct edit to `fix_streamlit_nested_expanders.py`.
 
146
  - No real personal data in tests.
147
  - No change to TXT, CSV, DOCX or PDF download behavior.
148
 
 
 
 
 
 
149
  ---
150
 
151
  ## v13.1 — Scrub Key JSON export UI closeout
 
219
  Outcome:
220
 
221
  - v13.1 Scrub Key JSON export is complete.
 
222
 
223
  ---
224
 
 
298
 
299
  Possible directions:
300
 
 
301
  - Deterministic reinsert helper.
302
  - AI-output reinsert.
303
  - Further recognizer expansion by legal domain.