Spaces:
Sleeping
Sleeping
solidprivacy-nl commited on
Commit ·
9d349bb
1
Parent(s): 4a2ed4e
Add Scrub Key JSON export UI handover
Browse files
handover/workpackages/20260607_1535_v13_1_scrub_key_json_export_ui.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Handover — WP4B — v13.1 Scrub Key JSON export UI integration
|
| 2 |
+
|
| 3 |
+
Repository: solidprivacy-nl/scrub
|
| 4 |
+
Workpackage title: WP4B — v13.1 Scrub Key JSON export UI integration
|
| 5 |
+
Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification
|
| 6 |
+
|
| 7 |
+
## Summary
|
| 8 |
+
|
| 9 |
+
Integrated the existing pure Scrub Key model into the Streamlit startup patch flow as a local JSON download option. The app should now show a `Scrub Key (JSON)` section near the final review/download area and offer `Download Scrub Key (.json)`. The UI includes explicit pseudonymization warnings and does not add import, reload, reinsert or AI-output behavior.
|
| 10 |
+
|
| 11 |
+
## Files added
|
| 12 |
+
|
| 13 |
+
- `tests/test_scrub_key_ui_patch.py`
|
| 14 |
+
- `handover/workpackages/20260607_1535_v13_1_scrub_key_json_export_ui.md`
|
| 15 |
+
|
| 16 |
+
## Files changed
|
| 17 |
+
|
| 18 |
+
- `fix_streamlit_nested_expanders.py`
|
| 19 |
+
- `WORKPACKAGES.md`
|
| 20 |
+
- `CHANGELOG.md`
|
| 21 |
+
|
| 22 |
+
## Tests
|
| 23 |
+
|
| 24 |
+
Added patch-level test coverage in `tests/test_scrub_key_ui_patch.py`.
|
| 25 |
+
|
| 26 |
+
The tests check that:
|
| 27 |
+
|
| 28 |
+
- Scrub Key helpers are imported by the startup patch.
|
| 29 |
+
- `Scrub Key (JSON)` and `Download Scrub Key (.json)` are present.
|
| 30 |
+
- the UI uses `edited_replacements_df.copy()` as the source for Scrub Key export.
|
| 31 |
+
- timestamp creation happens in the UI/export layer.
|
| 32 |
+
- `build_scrub_key`, `scrub_key_to_json` and `validate_scrub_key` are used.
|
| 33 |
+
- pseudonymization and non-sharing warnings are present.
|
| 34 |
+
- import/reload/reinsert/AI-output flow is not introduced.
|
| 35 |
+
- existing final review and export sanity markers remain present.
|
| 36 |
+
- existing text export application is not changed by the patch.
|
| 37 |
+
|
| 38 |
+
## Validation
|
| 39 |
+
|
| 40 |
+
Local pytest was not run from this connector environment.
|
| 41 |
+
|
| 42 |
+
Recommended validation commands:
|
| 43 |
+
|
| 44 |
+
```bash
|
| 45 |
+
PYTHONPATH=. pytest -q tests/test_scrub_key.py
|
| 46 |
+
PYTHONPATH=. pytest -q tests/test_scrub_key_ui_patch.py
|
| 47 |
+
PYTHONPATH=. pytest -q tests/test_export_sanity_ui_patch.py
|
| 48 |
+
PYTHONPATH=. pytest -q
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## GitHub Actions status
|
| 52 |
+
|
| 53 |
+
Pending / not verified by this worker.
|
| 54 |
+
|
| 55 |
+
Relevant commits:
|
| 56 |
+
|
| 57 |
+
- `a9011ccc3fdb981c3101490fdc8b8996696f75e3` — Integrate Scrub Key JSON export into UI patch.
|
| 58 |
+
- `adb676000d07e6f00b39a378da40adfa9701e0d1` — Add Scrub Key UI patch tests.
|
| 59 |
+
- `7a682b23c2a69a406f93fdf45235e8cde4509a35` — Update workpackage status for Scrub Key UI export.
|
| 60 |
+
- `4a2ed4e40083e330372de7b5366f2fb336ba2916` — Record Scrub Key JSON export UI integration.
|
| 61 |
+
|
| 62 |
+
## Hugging Face sync status
|
| 63 |
+
|
| 64 |
+
Pending / not verified by this worker.
|
| 65 |
+
|
| 66 |
+
## App verification status
|
| 67 |
+
|
| 68 |
+
Pending. Because UI behavior changed, the app should be visually checked in Hugging Face.
|
| 69 |
+
|
| 70 |
+
Verify that:
|
| 71 |
+
|
| 72 |
+
- `Scrub Key (JSON)` appears near the final review/download area.
|
| 73 |
+
- the pseudonymization warning is visible.
|
| 74 |
+
- `Download Scrub Key (.json)` appears.
|
| 75 |
+
- existing TXT, CSV, DOCX and PDF downloads still work.
|
| 76 |
+
|
| 77 |
+
## Notes / risks
|
| 78 |
+
|
| 79 |
+
- `presidio_streamlit.py` was not directly edited.
|
| 80 |
+
- `scrub_key.py` was not changed.
|
| 81 |
+
- The pure Scrub Key model remains deterministic and side-effect free.
|
| 82 |
+
- Timestamp creation was added in the UI/export layer to satisfy the model validation requirement.
|
| 83 |
+
- No Scrub Key import/reload was added.
|
| 84 |
+
- No reinsert UI was added.
|
| 85 |
+
- No AI-output flow was added.
|
| 86 |
+
- No cloud processing was introduced.
|
| 87 |
+
- No secrets or real personal data were stored.
|
| 88 |
+
- Existing TXT/CSV/DOCX/PDF export/download behavior was not directly changed.
|
| 89 |
+
|
| 90 |
+
## Next recommended step
|
| 91 |
+
|
| 92 |
+
Verify GitHub Actions and Hugging Face sync. Then verify the Hugging Face app visually. After v13.1 is confirmed, plan v13.2 Scrub Key import/reload as a separate sequential UI workpackage.
|