Spaces:
Running
Running
solidprivacy-nl commited on
Commit ·
313a70e
1
Parent(s): 911c1f1
Record Scrub Key import helper
Browse files- CHANGELOG.md +91 -400
CHANGELOG.md
CHANGED
|
@@ -26,6 +26,83 @@ For UI/UX-only work, prefer pure helper modules and tests before touching Stream
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## v13.1 — Scrub Key JSON export UI closeout
|
| 30 |
|
| 31 |
Status: completed and app verified after mapping hotfix.
|
|
@@ -101,115 +178,6 @@ Outcome:
|
|
| 101 |
|
| 102 |
---
|
| 103 |
|
| 104 |
-
## WP4B-FIX — Scrub Key UI row mapping hotfix
|
| 105 |
-
|
| 106 |
-
Status: completed and app verified.
|
| 107 |
-
|
| 108 |
-
Purpose:
|
| 109 |
-
|
| 110 |
-
- Fix Scrub Key JSON export in the Hugging Face app.
|
| 111 |
-
- Prevent validation errors such as `Item has empty required field: original_value`.
|
| 112 |
-
- Map Streamlit review-table row fields to Scrub Key model fields before calling `build_scrub_key(...)`.
|
| 113 |
-
- Preserve the v13.0 policy that only selected rows are included in the Scrub Key.
|
| 114 |
-
|
| 115 |
-
Files added or changed:
|
| 116 |
-
|
| 117 |
-
- `fix_streamlit_nested_expanders.py`
|
| 118 |
-
- `tests/test_scrub_key_ui_patch.py`
|
| 119 |
-
- `WORKPACKAGES.md`
|
| 120 |
-
- `CHANGELOG.md`
|
| 121 |
-
- `handover/workpackages/20260607_1535_v13_1_scrub_key_ui_mapping_hotfix.md`
|
| 122 |
-
|
| 123 |
-
Main changes:
|
| 124 |
-
|
| 125 |
-
- Added a Scrub Key UI mapping layer before `build_scrub_key(scrub_key_rows)`.
|
| 126 |
-
- Added required mapping:
|
| 127 |
-
- `find` → `original_value`;
|
| 128 |
-
- `replace_with` → `placeholder`;
|
| 129 |
-
- `entity_type` → `entity_type`;
|
| 130 |
-
- `type_label` → `type_label`;
|
| 131 |
-
- `source` → `source`;
|
| 132 |
-
- `review_status` → `review_status`;
|
| 133 |
-
- `include` → `include`.
|
| 134 |
-
- Kept timestamp creation in the UI/export layer.
|
| 135 |
-
- Kept the pseudonymization warning text.
|
| 136 |
-
- Kept `Download Scrub Key (.json)` and `solidprivacy_scrub_key.json`.
|
| 137 |
-
- Added/updated test guards for row mapping, warning text, download button, no import/reinsert/AI flow, and no blocking behavior.
|
| 138 |
-
|
| 139 |
-
Testing and verification:
|
| 140 |
-
|
| 141 |
-
- Updated `tests/test_scrub_key_ui_patch.py` with mapping regression tests.
|
| 142 |
-
- Coordinator confirmed `Tests #78` green for commit `8d33941`.
|
| 143 |
-
- Coordinator confirmed `Sync to Hugging Face Space #92` green for commit `8d33941`.
|
| 144 |
-
- User verified the app behavior and confirmed the JSON download works.
|
| 145 |
-
|
| 146 |
-
Intentionally not changed:
|
| 147 |
-
|
| 148 |
-
- No edit to `scrub_key.py`.
|
| 149 |
-
- No direct edit to `presidio_streamlit.py`.
|
| 150 |
-
- No Scrub Key import/reload.
|
| 151 |
-
- No reinsert UI.
|
| 152 |
-
- No AI-output flow.
|
| 153 |
-
- No cloud processing.
|
| 154 |
-
- No server-side Scrub Key storage.
|
| 155 |
-
- No change to TXT, CSV, DOCX or PDF download behavior.
|
| 156 |
-
- No change to existing replacement/export semantics.
|
| 157 |
-
- No `st.stop()` or export blocking behavior added.
|
| 158 |
-
|
| 159 |
-
---
|
| 160 |
-
|
| 161 |
-
## v13.1 — Scrub Key JSON export UI integration
|
| 162 |
-
|
| 163 |
-
Status: completed after mapping hotfix and app verification.
|
| 164 |
-
|
| 165 |
-
Purpose:
|
| 166 |
-
|
| 167 |
-
- Add a local Scrub Key JSON download option after review.
|
| 168 |
-
- Make the reversible mapping workflow visible without adding import, reload, reinsert or AI-output behavior.
|
| 169 |
-
- Warn users that a Scrub Key is pseudonymization, not full anonymization.
|
| 170 |
-
- Preserve existing TXT, CSV, DOCX and PDF export/download behavior.
|
| 171 |
-
|
| 172 |
-
Files added or changed:
|
| 173 |
-
|
| 174 |
-
- `fix_streamlit_nested_expanders.py`
|
| 175 |
-
- `tests/test_scrub_key_ui_patch.py`
|
| 176 |
-
- `WORKPACKAGES.md`
|
| 177 |
-
- `CHANGELOG.md`
|
| 178 |
-
|
| 179 |
-
Main changes:
|
| 180 |
-
|
| 181 |
-
- Integrated the existing `scrub_key.py` pure model into the Streamlit startup patch flow.
|
| 182 |
-
- Added imports for `build_scrub_key`, `scrub_key_to_json` and `validate_scrub_key`.
|
| 183 |
-
- Added a `Scrub Key (JSON)` UI block near the existing final review/download section.
|
| 184 |
-
- Added a `Download Scrub Key (.json)` button with filename `solidprivacy_scrub_key.json`.
|
| 185 |
-
- Added user-facing warning text explaining that the Scrub Key makes replaced values locally reversible.
|
| 186 |
-
- Added user-facing warning text that this is pseudonymization, not full anonymization.
|
| 187 |
-
- Added user-facing warning text not to share the key with AI services or third parties unless consciously intended and allowed.
|
| 188 |
-
- Added timestamp creation in the UI/export layer so the pure `scrub_key.py` model remains deterministic and side-effect free.
|
| 189 |
-
- Added patch-level tests guarding the UI wiring and boundaries.
|
| 190 |
-
- WP4B-FIX later corrected app-row-to-Scrub-Key-row mapping.
|
| 191 |
-
|
| 192 |
-
Testing and verification:
|
| 193 |
-
|
| 194 |
-
- Added `tests/test_scrub_key_ui_patch.py`.
|
| 195 |
-
- Coordinator confirmed `Tests #73` green and `Sync to Hugging Face Space #87` green for commit `9d349bb`.
|
| 196 |
-
- Mapping hotfix later passed `Tests #78` and `Sync #92`.
|
| 197 |
-
- User verified the app and confirmed Scrub Key JSON download works.
|
| 198 |
-
|
| 199 |
-
Intentionally not changed:
|
| 200 |
-
|
| 201 |
-
- No direct edit to `presidio_streamlit.py`.
|
| 202 |
-
- No Scrub Key import/reload.
|
| 203 |
-
- No reinsert UI.
|
| 204 |
-
- No AI-output flow.
|
| 205 |
-
- No cloud processing.
|
| 206 |
-
- No secret storage.
|
| 207 |
-
- No real personal data.
|
| 208 |
-
- No change to TXT, CSV, DOCX or PDF download behavior.
|
| 209 |
-
- No change to existing replacement/export semantics.
|
| 210 |
-
|
| 211 |
-
---
|
| 212 |
-
|
| 213 |
## v12.6 — Export sanity checks closeout
|
| 214 |
|
| 215 |
Status: completed and administratively closed after coordinator closeout instruction.
|
|
@@ -265,298 +233,20 @@ Outcome:
|
|
| 265 |
|
| 266 |
---
|
| 267 |
|
| 268 |
-
## v13.0 — Scrub Key specification and pure model
|
| 269 |
-
|
| 270 |
-
Status: implemented; coordinator later showed `Tests #56` green and `Sync #70` green for commit `d653643`.
|
| 271 |
-
|
| 272 |
-
Purpose:
|
| 273 |
-
|
| 274 |
-
- Prepare the v13 Scrub Key / Reinsert phase without touching the active review UI.
|
| 275 |
-
- Define the local mapping file concept for future reversible workflows.
|
| 276 |
-
- Add a pure Python model with validation and JSON roundtrip support.
|
| 277 |
-
- Make pseudonymization safety boundaries explicit before UI/export work starts.
|
| 278 |
-
|
| 279 |
-
Files added or changed:
|
| 280 |
-
|
| 281 |
-
- `SCRUB_KEY_SPEC.md`
|
| 282 |
-
- `scrub_key.py`
|
| 283 |
-
- `tests/test_scrub_key.py`
|
| 284 |
-
- `WORKPACKAGES.md`
|
| 285 |
-
- `CHANGELOG.md`
|
| 286 |
-
- `handover/workpackages/20260607_1342_v13_0_scrub_key_spec_model.md`
|
| 287 |
-
|
| 288 |
-
Main changes:
|
| 289 |
-
|
| 290 |
-
- Added a Scrub Key specification for the future workflow: `Scrub → Review → Scrub Key → AI → Reinsert → Export → Audit`.
|
| 291 |
-
- 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.
|
| 292 |
-
- Added required safety language explaining that a Scrub Key makes scrubbed text reversible.
|
| 293 |
-
- Explicitly classified the Scrub Key model as pseudonymization, not full anonymization.
|
| 294 |
-
- Added deterministic pure helpers: `build_scrub_key`, `scrub_key_to_json`, `scrub_key_from_json` and `validate_scrub_key`.
|
| 295 |
-
- Set the v13.0 excluded-row policy to `omitted`, so unchecked rows are not written into the key.
|
| 296 |
-
- Kept timestamp handling deterministic: the model does not create timestamps itself; validation catches missing timestamps.
|
| 297 |
-
|
| 298 |
-
Testing:
|
| 299 |
-
|
| 300 |
-
- Added `tests/test_scrub_key.py`.
|
| 301 |
-
- Local targeted validation passed: `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
|
| 302 |
-
- Coordinator evidence later confirmed GitHub Actions and Hugging Face sync green for `d653643`.
|
| 303 |
-
|
| 304 |
-
Intentionally not changed:
|
| 305 |
-
|
| 306 |
-
- No direct edit to `presidio_streamlit.py`.
|
| 307 |
-
- No direct edit to `fix_streamlit_nested_expanders.py` for v13.0.
|
| 308 |
-
- No export/download buttons for Scrub Key in v13.0.
|
| 309 |
-
- No reinsert UI.
|
| 310 |
-
- No cloud processing.
|
| 311 |
-
- No secret storage.
|
| 312 |
-
- No real personal data in tests or examples.
|
| 313 |
-
- No change to active review UI or export semantics.
|
| 314 |
-
|
| 315 |
-
---
|
| 316 |
-
|
| 317 |
-
## v12.5 — Final review summary
|
| 318 |
-
|
| 319 |
-
Status: completed and app verified.
|
| 320 |
-
|
| 321 |
-
Purpose:
|
| 322 |
-
|
| 323 |
-
- Show final export readiness before downloads.
|
| 324 |
-
- Make export scope clear before the user downloads files.
|
| 325 |
-
- Warn when candidate rows still need attention.
|
| 326 |
-
- Preserve existing replacement and export semantics.
|
| 327 |
-
|
| 328 |
-
Files added or changed:
|
| 329 |
-
|
| 330 |
-
- `review_summary.py`
|
| 331 |
-
- `tests/test_review_summary.py`
|
| 332 |
-
- `tests/test_review_summary_ui_patch.py`
|
| 333 |
-
- `fix_streamlit_nested_expanders.py`
|
| 334 |
-
- `WORKPACKAGES.md`
|
| 335 |
-
- `CHANGELOG.md`
|
| 336 |
-
- `handover/workpackages/20260607_1345_v12_5_review_summary_closeout.md`
|
| 337 |
-
|
| 338 |
-
Main changes:
|
| 339 |
-
|
| 340 |
-
- Added a pure helper that accepts review rows as dictionaries or DataFrame-like records.
|
| 341 |
-
- Added summary counts for automatically detected rows, rows needing review, manual rows, remembered rows, checked rows, unchecked rows and open candidate warnings.
|
| 342 |
-
- Integrated the summary into the existing startup UI patch so the app shows `Eindcontrole vóór download` immediately above the download section.
|
| 343 |
-
- Kept the summary advisory only: it displays counts and readiness labels but does not block or alter downloads.
|
| 344 |
-
- Formally closed v12.5 after coordinator/user verification.
|
| 345 |
-
|
| 346 |
-
Testing and verification:
|
| 347 |
-
|
| 348 |
-
- Added unit tests for `review_summary.py`.
|
| 349 |
-
- Added a UI patch contract test to verify that the summary helper is imported and displayed before downloads.
|
| 350 |
-
- Local targeted validation before UI integration passed: `PYTHONPATH=. pytest -q tests/test_review_summary.py` → 5 passed.
|
| 351 |
-
- Coordinator reported GitHub Actions tests green and GitHub to Hugging Face sync green for the v12.5 review summary line.
|
| 352 |
-
- Hugging Face app was visually verified and downloads were reported as still working: text, CSV, DOCX and PDF.
|
| 353 |
-
|
| 354 |
-
Intentionally not changed:
|
| 355 |
-
|
| 356 |
-
- No direct edit to `presidio_streamlit.py` during closeout.
|
| 357 |
-
- No recognizer changes.
|
| 358 |
-
- No entity-type expansion.
|
| 359 |
-
- No export/download blocking.
|
| 360 |
-
- No change to which rows are included in export.
|
| 361 |
-
- No Scrub Key or reinsert implementation.
|
| 362 |
-
- No LLM/cloud feature.
|
| 363 |
-
|
| 364 |
-
---
|
| 365 |
-
|
| 366 |
-
## v12.4 — Review guidance text
|
| 367 |
-
|
| 368 |
-
Status: implemented; GitHub Actions and Hugging Face sync confirmed green by coordinator; app visually confirmed by user.
|
| 369 |
-
|
| 370 |
-
Purpose:
|
| 371 |
-
|
| 372 |
-
- Make the review workflow self-explanatory for non-technical legal users.
|
| 373 |
-
- Explain that only checked rows are included in export.
|
| 374 |
-
- Explain that `Controle nodig` rows require manual review.
|
| 375 |
-
- Explain that the focus filter is a viewing aid, not the export scope.
|
| 376 |
-
- Explain that technical details are mainly for audit/debugging.
|
| 377 |
-
- Add AI-use guidance: scrub first, then use AI.
|
| 378 |
-
|
| 379 |
-
Files added or changed:
|
| 380 |
-
|
| 381 |
-
- `review_guidance.py`
|
| 382 |
-
- `tests/test_review_guidance.py`
|
| 383 |
-
- `fix_streamlit_nested_expanders.py`
|
| 384 |
-
- `WORKPACKAGES.md`
|
| 385 |
-
- `CHANGELOG.md`
|
| 386 |
-
|
| 387 |
-
Main changes:
|
| 388 |
-
|
| 389 |
-
- Added short Dutch review guidance strings.
|
| 390 |
-
- Added markdown helper for guidance bullets.
|
| 391 |
-
- Patched the review flow to show guidance near the replacement table and export step.
|
| 392 |
-
- Kept the guidance advisory only; it does not alter replacement selection or export behavior.
|
| 393 |
-
|
| 394 |
-
Testing:
|
| 395 |
-
|
| 396 |
-
- Added unit tests for guidance text coverage.
|
| 397 |
-
- User visually confirmed the guidance block appeared correctly in Hugging Face.
|
| 398 |
-
- Coordinator confirmed latest Actions and Hugging Face sync green for the helper/governance commits through `fffd27b`.
|
| 399 |
-
|
| 400 |
-
Intentionally not changed:
|
| 401 |
-
|
| 402 |
-
- No recognizer changes.
|
| 403 |
-
- No export semantics change.
|
| 404 |
-
- No desktop/MSI work.
|
| 405 |
-
- No LLM/cloud feature.
|
| 406 |
-
|
| 407 |
-
---
|
| 408 |
-
|
| 409 |
-
## Project governance setup
|
| 410 |
-
|
| 411 |
-
Status: implemented; Actions/sync confirmed green by coordinator through latest governance/helper handover commits.
|
| 412 |
-
|
| 413 |
-
Purpose:
|
| 414 |
-
|
| 415 |
-
- Make GitHub the operational source of truth for SolidPrivacy Scrub workpackages.
|
| 416 |
-
- Establish a central project prompt, roadmap, workpackage plan and handover convention.
|
| 417 |
-
- Prepare continuation across fresh chats/workers.
|
| 418 |
-
|
| 419 |
-
Files added or changed:
|
| 420 |
-
|
| 421 |
-
- `PROJECT_PROMPT.md`
|
| 422 |
-
- `PROJECT_PROMPT_SHORT.md`
|
| 423 |
-
- `ROADMAP.md`
|
| 424 |
-
- `WORKPACKAGES.md`
|
| 425 |
-
- `handover/workpackages/20260607_1057_project_prompt_governance_handover.md`
|
| 426 |
-
|
| 427 |
-
Main changes:
|
| 428 |
-
|
| 429 |
-
- Added a full worker prompt with repository boundaries, source-of-truth rules, testing/sync rules and handover discipline.
|
| 430 |
-
- Added a short project prompt for ChatGPT Project Instructions.
|
| 431 |
-
- Added the central roadmap and executable workpackage plan.
|
| 432 |
-
- Established `handover/workpackages/` as the coordinator-readable handover directory.
|
| 433 |
-
|
| 434 |
-
---
|
| 435 |
-
|
| 436 |
## Earlier completed work
|
| 437 |
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
-
|
| 445 |
-
-
|
| 446 |
-
-
|
| 447 |
-
-
|
| 448 |
-
-
|
| 449 |
-
|
| 450 |
-
### v12.2 — Review focus filters
|
| 451 |
-
|
| 452 |
-
Status: completed and green in GitHub Actions.
|
| 453 |
-
|
| 454 |
-
Summary:
|
| 455 |
-
|
| 456 |
-
- Added `review_filters.py` and tests.
|
| 457 |
-
- Added safe focus filters such as `Toon alles`, `Alleen controle nodig`, `Alleen juridische referenties`, `Alleen namen/adressen` and `Alleen lage zekerheid`.
|
| 458 |
-
- Kept the full editable table as the source of truth for exports.
|
| 459 |
-
|
| 460 |
-
### v12.1 — Review table status model
|
| 461 |
-
|
| 462 |
-
Status: completed and green in GitHub Actions; user confirmed the Status column appears in Hugging Face.
|
| 463 |
-
|
| 464 |
-
Summary:
|
| 465 |
-
|
| 466 |
-
- Added `review_status.py` and tests.
|
| 467 |
-
- Added Dutch review statuses: `Automatisch vervangen`, `Controle nodig`, `Handmatig toegevoegd`, `Onthouden vervanging`.
|
| 468 |
-
- Added review status fields and status ordering in the review table.
|
| 469 |
-
|
| 470 |
-
### v11.2 — Dutch recognizer integration tests
|
| 471 |
-
|
| 472 |
-
Status: completed and green in GitHub Actions.
|
| 473 |
-
|
| 474 |
-
Summary:
|
| 475 |
-
|
| 476 |
-
- Added recognizer integration tests using `get_dutch_recognizers()`.
|
| 477 |
-
- Verified Dutch legal/admin references at value/span level.
|
| 478 |
-
- Verified value-only behavior so context labels remain readable.
|
| 479 |
-
|
| 480 |
-
### v11.1 — Legal reference recognizer hardening
|
| 481 |
-
|
| 482 |
-
Status: completed and green in GitHub Actions.
|
| 483 |
-
|
| 484 |
-
Summary:
|
| 485 |
-
|
| 486 |
-
- Hardened Dutch legal/admin reference detection.
|
| 487 |
-
- Expanded synthetic regression cases.
|
| 488 |
-
- Added/validated court/case numbers, incident numbers, camera/video references, insurance claim references, repair numbers, immigration numbers, municipal references and KvK numbers in labelled context.
|
| 489 |
-
- Preserved context words and legal meaning.
|
| 490 |
-
|
| 491 |
-
### v10 — Regression test layer
|
| 492 |
-
|
| 493 |
-
Status: completed and green in GitHub Actions.
|
| 494 |
-
|
| 495 |
-
Summary:
|
| 496 |
-
|
| 497 |
-
- Added synthetic Dutch legal regression cases and candidate scanner tests.
|
| 498 |
-
- Added false-positive guards for legal article references, dates and money/amount context.
|
| 499 |
-
- Added context preservation tests.
|
| 500 |
-
- Added GitHub Actions test workflow.
|
| 501 |
-
|
| 502 |
-
### v9.1 — UI polish and baseline stabilization
|
| 503 |
-
|
| 504 |
-
Status: completed and working in Hugging Face.
|
| 505 |
-
|
| 506 |
-
Summary:
|
| 507 |
-
|
| 508 |
-
- Added `APP_VERSION = "v9.1"`.
|
| 509 |
-
- Corrected Dutch UI wording.
|
| 510 |
-
- Kept recognizer behavior unchanged.
|
| 511 |
-
|
| 512 |
-
### v9 — Dutch Legal UI Layer
|
| 513 |
-
|
| 514 |
-
Status: completed and working in Hugging Face after startup hotfix.
|
| 515 |
-
|
| 516 |
-
Summary:
|
| 517 |
-
|
| 518 |
-
- Moved the app away from a technical Presidio demo feel.
|
| 519 |
-
- Added Dutch legal product language and workflow labels.
|
| 520 |
-
- Added `ui_texts_nl.py`, `display_labels_nl.py`, updates to `presidio_streamlit.py`, `fix_streamlit_nested_expanders.py` and `Dockerfile`.
|
| 521 |
-
- Added a startup hotfix for Streamlit nested expander limitations.
|
| 522 |
-
|
| 523 |
-
---
|
| 524 |
-
|
| 525 |
-
## GitHub → Hugging Face automation
|
| 526 |
-
|
| 527 |
-
Status: completed and working.
|
| 528 |
-
|
| 529 |
-
Purpose:
|
| 530 |
-
|
| 531 |
-
- Replace manual download/upload file replacement workflow.
|
| 532 |
-
- Make GitHub the source of truth.
|
| 533 |
-
- Automatically sync `solidprivacy-nl/scrub` to the Hugging Face Space `solidprivacy/scrub`.
|
| 534 |
-
|
| 535 |
-
Files added or changed:
|
| 536 |
-
|
| 537 |
-
- `.github/workflows/sync-to-huggingface.yml`
|
| 538 |
-
|
| 539 |
-
Main changes:
|
| 540 |
-
|
| 541 |
-
- Added a GitHub Actions workflow for syncing to Hugging Face.
|
| 542 |
-
- Replaced an initial hub-sync approach with a simpler direct Git push workflow.
|
| 543 |
-
- Added concurrency handling to avoid overlapping sync runs.
|
| 544 |
-
|
| 545 |
-
---
|
| 546 |
-
|
| 547 |
-
## Pre-GitHub incremental development phase
|
| 548 |
-
|
| 549 |
-
Status: superseded by GitHub workflow, but historically important.
|
| 550 |
-
|
| 551 |
-
Summary:
|
| 552 |
-
|
| 553 |
-
- Dutch/EU recognizer direction.
|
| 554 |
-
- Legal-profession focus.
|
| 555 |
-
- Local/offline strategy for confidentiality.
|
| 556 |
-
- Recognition of Dutch legal references, case numbers and administrative identifiers.
|
| 557 |
-
- Candidate scanner / audit-layer idea.
|
| 558 |
-
- Synthetic legal examples for testing.
|
| 559 |
-
- Context preservation principle: mask the person/value, not the legal meaning of the sentence.
|
| 560 |
|
| 561 |
---
|
| 562 |
|
|
@@ -564,7 +254,8 @@ Summary:
|
|
| 564 |
|
| 565 |
Possible directions:
|
| 566 |
|
| 567 |
-
- Scrub Key import/reload.
|
|
|
|
| 568 |
- AI-output reinsert.
|
| 569 |
- Further recognizer expansion by legal domain.
|
| 570 |
- Local packaging research.
|
|
|
|
| 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 |
+
|
| 35 |
+
- Prepare reliable import/reload of a previously saved Scrub Key JSON file.
|
| 36 |
+
- Keep this work pure and helper-only before UI integration.
|
| 37 |
+
- Prepare future mapping reuse, session continuation and deterministic reinsert work.
|
| 38 |
+
- Preserve local-only handling and warning language for sensitive Scrub Keys.
|
| 39 |
+
|
| 40 |
+
Files added or changed:
|
| 41 |
+
|
| 42 |
+
- `scrub_key_import.py`
|
| 43 |
+
- `tests/test_scrub_key_import.py`
|
| 44 |
+
- `WORKPACKAGES.md`
|
| 45 |
+
- `CHANGELOG.md`
|
| 46 |
+
- `handover/workpackages/20260607_1605_v13_2_scrub_key_import_helper.md`
|
| 47 |
+
|
| 48 |
+
Main changes:
|
| 49 |
+
|
| 50 |
+
- Added `scrub_key_import.py` as a pure helper module.
|
| 51 |
+
- Added `validate_scrub_key_import_text(json_text)` for safe validation errors.
|
| 52 |
+
- Added `normalise_scrub_key_items(scrub_key)` to convert Scrub Key items into review-table-like mapping rows.
|
| 53 |
+
- Added `build_scrub_key_import_result(json_text)` with a UI-friendly result shape:
|
| 54 |
+
- `ok`;
|
| 55 |
+
- `errors`;
|
| 56 |
+
- `warnings`;
|
| 57 |
+
- `scrub_key`;
|
| 58 |
+
- `mapping_rows`;
|
| 59 |
+
- `item_count`;
|
| 60 |
+
- `reversible`;
|
| 61 |
+
- `privacy_model`;
|
| 62 |
+
- `document_label`.
|
| 63 |
+
- Reused the existing `scrub_key_from_json(...)` and `validate_scrub_key(...)` model helpers.
|
| 64 |
+
- Added safe Dutch user-facing errors for empty input, invalid JSON syntax, invalid top-level structure and invalid Scrub Key content.
|
| 65 |
+
- Added a local-only privacy warning explaining that imported Scrub Keys make replacements locally reversible and should not be shared with AI services or third parties unless consciously intended and allowed.
|
| 66 |
+
|
| 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`.
|
| 90 |
+
- No direct edit to `presidio_streamlit.py`.
|
| 91 |
+
- No edit to existing Scrub Key export UI.
|
| 92 |
+
- No reinsert behavior.
|
| 93 |
+
- No AI-output flow.
|
| 94 |
+
- No cloud processing.
|
| 95 |
+
- No server-side Scrub Key storage.
|
| 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
|
| 107 |
|
| 108 |
Status: completed and app verified after mapping hotfix.
|
|
|
|
| 178 |
|
| 179 |
---
|
| 180 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
## v12.6 — Export sanity checks closeout
|
| 182 |
|
| 183 |
Status: completed and administratively closed after coordinator closeout instruction.
|
|
|
|
| 233 |
|
| 234 |
---
|
| 235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
## Earlier completed work
|
| 237 |
|
| 238 |
+
- v13.0 Scrub Key specification and pure model.
|
| 239 |
+
- v12.5 Final review summary.
|
| 240 |
+
- v12.4 Review guidance text.
|
| 241 |
+
- Project governance setup.
|
| 242 |
+
- v12.3 Review table simplification.
|
| 243 |
+
- v12.2 Review focus filters.
|
| 244 |
+
- v12.1 Review table status model.
|
| 245 |
+
- v11.2 Dutch recognizer integration tests.
|
| 246 |
+
- v11.1 Legal reference recognizer hardening.
|
| 247 |
+
- v10 Regression test layer.
|
| 248 |
+
- v9.1 UI polish and baseline stabilization.
|
| 249 |
+
- v9 Dutch Legal UI Layer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
|
| 251 |
---
|
| 252 |
|
|
|
|
| 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.
|