Spaces:
Sleeping
Sleeping
solidprivacy-nl commited on
Commit ·
07d33ca
1
Parent(s): 11c7f52
Add deterministic reinsert helper handover
Browse files
handover/workpackages/20260607_1815_v13_3_reinsert_helper.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Handover — WP7A — v13.3 Deterministic reinsert helper, pure helper and tests
|
| 2 |
+
|
| 3 |
+
Repository: solidprivacy-nl/scrub
|
| 4 |
+
Workpackage title: WP7A — v13.3 Deterministic reinsert helper, pure helper and tests
|
| 5 |
+
Status: implemented; awaiting GitHub Actions and Hugging Face sync
|
| 6 |
+
|
| 7 |
+
## Summary
|
| 8 |
+
|
| 9 |
+
Added a pure deterministic reinsert helper for the future v13.3 local reinsert workflow. The helper can replace Scrub placeholders in text with original values from a valid Scrub Key and returns an audit summary. This workpackage did not add UI, AI calls, cloud processing, automatic document rehydration or export/download behavior changes.
|
| 10 |
+
|
| 11 |
+
## Files added
|
| 12 |
+
|
| 13 |
+
- `scrub_key_reinsert.py`
|
| 14 |
+
- `tests/test_scrub_key_reinsert.py`
|
| 15 |
+
- `handover/workpackages/20260607_1815_v13_3_reinsert_helper.md`
|
| 16 |
+
|
| 17 |
+
## Files changed
|
| 18 |
+
|
| 19 |
+
- `WORKPACKAGES.md`
|
| 20 |
+
- `CHANGELOG.md`
|
| 21 |
+
|
| 22 |
+
## Tests
|
| 23 |
+
|
| 24 |
+
Added `tests/test_scrub_key_reinsert.py`.
|
| 25 |
+
|
| 26 |
+
The tests cover:
|
| 27 |
+
|
| 28 |
+
- valid reinsert with one placeholder;
|
| 29 |
+
- valid reinsert with multiple placeholders;
|
| 30 |
+
- repeated placeholder occurrences in text;
|
| 31 |
+
- placeholder from key not found in text;
|
| 32 |
+
- unknown placeholder in text not present in key;
|
| 33 |
+
- invalid Scrub Key validation issues;
|
| 34 |
+
- duplicate placeholder detection;
|
| 35 |
+
- excluded rows not being reinserted;
|
| 36 |
+
- synthetic Dutch legal values only;
|
| 37 |
+
- input Scrub Key immutability;
|
| 38 |
+
- explicit no-AI/no-cloud flags;
|
| 39 |
+
- deterministic placeholder detection.
|
| 40 |
+
|
| 41 |
+
## Validation status
|
| 42 |
+
|
| 43 |
+
Local pytest was not run from this connector environment.
|
| 44 |
+
|
| 45 |
+
Recommended validation commands:
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
PYTHONPATH=. pytest -q tests/test_scrub_key.py
|
| 49 |
+
PYTHONPATH=. pytest -q tests/test_scrub_key_import.py
|
| 50 |
+
PYTHONPATH=. pytest -q tests/test_scrub_key_reinsert.py
|
| 51 |
+
PYTHONPATH=. pytest -q
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
## GitHub Actions status
|
| 55 |
+
|
| 56 |
+
Pending / not verified by this worker.
|
| 57 |
+
|
| 58 |
+
Relevant commits:
|
| 59 |
+
|
| 60 |
+
- `2f230019de017b80bed42c539fda0d64314338a8` — Add deterministic Scrub Key reinsert helper.
|
| 61 |
+
- `1b58ecf483ba98c3121a059e2c52ca13c3c45d29` — Add deterministic reinsert helper tests.
|
| 62 |
+
- `a306fc715b8b380689c58595a65dab014fb1f8c3` — Update workpackage status for deterministic reinsert helper.
|
| 63 |
+
- `11c7f523879bcd1b20405f96a683f4058913763e` — Record deterministic reinsert helper.
|
| 64 |
+
|
| 65 |
+
## Hugging Face sync status
|
| 66 |
+
|
| 67 |
+
Pending / not verified by this worker.
|
| 68 |
+
|
| 69 |
+
## App verification status
|
| 70 |
+
|
| 71 |
+
Not applicable for this helper-only package. No UI behavior was changed.
|
| 72 |
+
|
| 73 |
+
## Notes / risks
|
| 74 |
+
|
| 75 |
+
- `presidio_streamlit.py` was not changed.
|
| 76 |
+
- `fix_streamlit_nested_expanders.py` was not changed.
|
| 77 |
+
- No UI was added.
|
| 78 |
+
- No AI calls were added.
|
| 79 |
+
- No cloud processing was added.
|
| 80 |
+
- No automatic document rehydration was added.
|
| 81 |
+
- No TXT, CSV, DOCX or PDF export behavior was changed.
|
| 82 |
+
- No Scrub Key export behavior was changed.
|
| 83 |
+
- No Scrub Key import UI behavior was changed.
|
| 84 |
+
- No secrets, tokens or real personal data were stored.
|
| 85 |
+
- The helper treats duplicate placeholders as ambiguous and excludes them from reinsertion while reporting them in the audit summary.
|
| 86 |
+
- Excluded Scrub Key items are ignored even if malformed/imported data contains them.
|
| 87 |
+
|
| 88 |
+
## Next recommended step
|
| 89 |
+
|
| 90 |
+
Verify GitHub Actions and Hugging Face sync. After the helper is green, plan a separate v13.3 UI workpackage for local AI-output reinsert. Keep AI-output UI and any document rehydration behavior separate and explicitly reviewed before integration.
|