Spaces:
Running
Running
solidprivacy-nl commited on
Commit ·
9737d22
1
Parent(s): 4a84ddb
Record v12.6 export sanity UI integration
Browse files- CHANGELOG.md +111 -356
CHANGELOG.md
CHANGED
|
@@ -26,6 +26,57 @@ For UI/UX-only work, prefer pure helper modules and tests before touching Stream
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
## WP Status Reconciliation — WP3/WP4 verification evidence
|
| 30 |
|
| 31 |
Status: reconciliation completed; GitHub Actions and Hugging Face sync could not be independently confirmed through the connector.
|
|
@@ -37,24 +88,6 @@ Purpose:
|
|
| 37 |
- v13.0 Scrub Key commits, especially `d65364373e4d3612044d8688ac17e11de81c07e5`.
|
| 38 |
- Update project control files without changing code or UI behavior.
|
| 39 |
|
| 40 |
-
Verification attempted:
|
| 41 |
-
|
| 42 |
-
- WP3/v12.6 commits checked:
|
| 43 |
-
- `5342e0eef663817036e91f823b4389b338b9223c` — Add v12.6 export sanity helper.
|
| 44 |
-
- `704ae03788702ce33263343743a69f8139f16319` — Add v12.6 export sanity tests.
|
| 45 |
-
- `869e3804edf04e0cbdf7ab69b034e7bc707de8c3` — Update workpackage status for export sanity helper.
|
| 46 |
-
- `4d721e3aed3bf28cfdaeb096c0e9cd227885f1a6` — Add v12.6 export sanity handover.
|
| 47 |
-
- WP4/v13.0 target commit checked:
|
| 48 |
-
- `d65364373e4d3612044d8688ac17e11de81c07e5` — Record v13.0 Scrub Key model in changelog.
|
| 49 |
-
|
| 50 |
-
Connector findings:
|
| 51 |
-
|
| 52 |
-
- GitHub combined status returned `statuses: []` for checked WP3 commits.
|
| 53 |
-
- Commit workflow-run lookup returned `workflow_runs: []` for checked WP3 commits.
|
| 54 |
-
- GitHub combined status returned `statuses: []` for `d65364373e4d3612044d8688ac17e11de81c07e5`.
|
| 55 |
-
- Commit workflow-run lookup returned `workflow_runs: []` for `d65364373e4d3612044d8688ac17e11de81c07e5`.
|
| 56 |
-
- Because of this, this worker did not mark Actions/sync as green.
|
| 57 |
-
|
| 58 |
Recorded repo evidence:
|
| 59 |
|
| 60 |
- WP3 handover records local targeted validation:
|
|
@@ -62,12 +95,6 @@ Recorded repo evidence:
|
|
| 62 |
- WP4 changelog records local targeted validation:
|
| 63 |
- `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
|
| 64 |
|
| 65 |
-
Files changed:
|
| 66 |
-
|
| 67 |
-
- `WORKPACKAGES.md`
|
| 68 |
-
- `CHANGELOG.md`
|
| 69 |
-
- `handover/workpackages/20260607_1425_wp3_wp4_status_reconciliation.md`
|
| 70 |
-
|
| 71 |
Intentionally not changed:
|
| 72 |
|
| 73 |
- No code files.
|
|
@@ -76,15 +103,11 @@ Intentionally not changed:
|
|
| 76 |
- No export semantics.
|
| 77 |
- No Hugging Face app behavior.
|
| 78 |
|
| 79 |
-
Next step:
|
| 80 |
-
|
| 81 |
-
- Coordinator should verify the latest GitHub Actions `Tests` and GitHub to Hugging Face sync in the GitHub UI, because the connector did not expose workflow-run evidence for these commits.
|
| 82 |
-
|
| 83 |
---
|
| 84 |
|
| 85 |
## v13.0 — Scrub Key specification and pure model
|
| 86 |
|
| 87 |
-
Status: implemented;
|
| 88 |
|
| 89 |
Purpose:
|
| 90 |
|
|
@@ -119,7 +142,7 @@ Main changes:
|
|
| 119 |
- Added required safety language explaining that a Scrub Key makes scrubbed text reversible.
|
| 120 |
- Explicitly classified the Scrub Key model as pseudonymization, not full anonymization.
|
| 121 |
- Added local/protected key handling guidance and external-AI sharing warning.
|
| 122 |
-
- Added
|
| 123 |
- `build_scrub_key(rows, document_label=None)`;
|
| 124 |
- `scrub_key_to_json(scrub_key)`;
|
| 125 |
- `scrub_key_from_json(text)`;
|
|
@@ -131,14 +154,13 @@ Testing:
|
|
| 131 |
|
| 132 |
- Added `tests/test_scrub_key.py`.
|
| 133 |
- Local targeted validation passed: `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
|
| 134 |
-
-
|
| 135 |
-
- Connector check attempted for commit `d65364373e4d3612044d8688ac17e11de81c07e5`, but no check/status evidence was exposed.
|
| 136 |
|
| 137 |
Intentionally not changed:
|
| 138 |
|
| 139 |
- No direct edit to `presidio_streamlit.py`.
|
| 140 |
-
- No direct edit to `fix_streamlit_nested_expanders.py`.
|
| 141 |
-
- No export/download buttons.
|
| 142 |
- No reinsert UI.
|
| 143 |
- No cloud processing.
|
| 144 |
- No secret storage.
|
|
@@ -149,7 +171,7 @@ Intentionally not changed:
|
|
| 149 |
|
| 150 |
## v12.6 — Export sanity checks helper and tests
|
| 151 |
|
| 152 |
-
Status: helper implemented;
|
| 153 |
|
| 154 |
Purpose:
|
| 155 |
|
|
@@ -188,12 +210,12 @@ Testing:
|
|
| 188 |
- Added `tests/test_export_sanity.py`.
|
| 189 |
- Local targeted validation passed in the WP3 handover:
|
| 190 |
- `PYTHONPATH=. pytest -q tests/test_export_sanity.py tests/test_review_summary.py` → 12 passed.
|
| 191 |
-
-
|
| 192 |
|
| 193 |
Intentionally not changed:
|
| 194 |
|
| 195 |
- No direct edit to `presidio_streamlit.py`.
|
| 196 |
-
- No direct edit to `fix_streamlit_nested_expanders.py`.
|
| 197 |
- No change to `review_summary.py`.
|
| 198 |
- No export/download blocking.
|
| 199 |
- No change to which rows are included in export.
|
|
@@ -226,15 +248,7 @@ Files added or changed:
|
|
| 226 |
Main changes:
|
| 227 |
|
| 228 |
- Added a pure helper that accepts review rows as dictionaries or DataFrame-like records.
|
| 229 |
-
- Added summary counts for
|
| 230 |
-
- total rows;
|
| 231 |
-
- automatically detected rows;
|
| 232 |
-
- rows needing review;
|
| 233 |
-
- manually added rows;
|
| 234 |
-
- remembered replacement rows;
|
| 235 |
-
- checked rows included in export;
|
| 236 |
-
- unchecked rows excluded from export;
|
| 237 |
-
- open unchecked candidate rows.
|
| 238 |
- Added conservative include-flag parsing for boolean, numeric and Dutch/string values.
|
| 239 |
- Added status inference from stable status values, Dutch status labels, source fields and manual/remembered entity markers.
|
| 240 |
- Added Dutch readiness labels and markdown summary lines.
|
|
@@ -255,7 +269,6 @@ Testing and verification:
|
|
| 255 |
Intentionally not changed:
|
| 256 |
|
| 257 |
- No direct edit to `presidio_streamlit.py` during closeout.
|
| 258 |
-
- No direct edit to `fix_streamlit_nested_expanders.py` during closeout.
|
| 259 |
- No recognizer changes.
|
| 260 |
- No entity-type expansion.
|
| 261 |
- No export/download blocking.
|
|
@@ -335,337 +348,92 @@ Main changes:
|
|
| 335 |
|
| 336 |
---
|
| 337 |
|
| 338 |
-
##
|
| 339 |
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
Purpose:
|
| 343 |
-
|
| 344 |
-
- Reduce visual noise in the replacement table.
|
| 345 |
-
- Keep the main review table focused on the columns legal users actually need to edit.
|
| 346 |
-
- Preserve technical/audit information in a separate details view.
|
| 347 |
-
- Keep recognizer and export semantics unchanged.
|
| 348 |
-
|
| 349 |
-
Files added or changed:
|
| 350 |
|
| 351 |
-
-
|
| 352 |
-
- `tests/test_review_table_config.py`
|
| 353 |
-
- `fix_streamlit_nested_expanders.py`
|
| 354 |
-
- `CHANGELOG.md`
|
| 355 |
-
|
| 356 |
-
Main changes:
|
| 357 |
-
|
| 358 |
-
- Added a central table configuration module.
|
| 359 |
-
- Main editable review table now focuses on:
|
| 360 |
-
- `Meenemen`
|
| 361 |
-
- `Onthouden`
|
| 362 |
-
- `Status`
|
| 363 |
-
- `Gevonden tekst`
|
| 364 |
-
- `Vervangen door`
|
| 365 |
-
- `Type gegeven`
|
| 366 |
-
- `Zekerheid`
|
| 367 |
-
- Technical and audit-oriented columns are moved out of the primary editing view.
|
| 368 |
-
- Added a separate `Technische details bij de vervangtabel` expander.
|
| 369 |
-
- Fixed pandas Index truth-value handling by explicitly converting available columns to list/set.
|
| 370 |
-
|
| 371 |
-
Important design decision:
|
| 372 |
-
|
| 373 |
-
- The full data remains present in the underlying dataframe.
|
| 374 |
-
- The main table is simplified visually, but exports and reports still use the available row data.
|
| 375 |
-
- The technical details remain accessible for debugging, auditability and future tuning.
|
| 376 |
|
| 377 |
-
|
| 378 |
|
| 379 |
-
- Added
|
| 380 |
-
-
|
|
|
|
|
|
|
|
|
|
| 381 |
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
- No recognizer changes.
|
| 385 |
-
- No entity-type expansion.
|
| 386 |
-
- No export semantics change.
|
| 387 |
-
- No MSI/local installer work.
|
| 388 |
-
- No LLM/cloud feature.
|
| 389 |
-
|
| 390 |
-
---
|
| 391 |
-
|
| 392 |
-
## v12.2 — Review focus filters
|
| 393 |
|
| 394 |
Status: completed and green in GitHub Actions.
|
| 395 |
|
| 396 |
-
|
| 397 |
|
| 398 |
-
-
|
| 399 |
-
-
|
| 400 |
-
-
|
| 401 |
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
- `review_filters.py`
|
| 405 |
-
- `tests/test_review_filters.py`
|
| 406 |
-
- `fix_streamlit_nested_expanders.py`
|
| 407 |
-
- `CHANGELOG.md`
|
| 408 |
-
|
| 409 |
-
Main changes:
|
| 410 |
-
|
| 411 |
-
- Added pure filter helpers with Dutch filter labels.
|
| 412 |
-
- Added filter groups for legal/admin reference entity types, names and address-like data.
|
| 413 |
-
- Added low-confidence filtering based on either Dutch confidence label `Laag` or numeric score below `0.60`.
|
| 414 |
-
- Added tests for all filter modes.
|
| 415 |
-
- Extended the Streamlit startup patch so the review step gets a `Focusfilter voor controle` selectbox.
|
| 416 |
-
- When a focus filter is active, the app shows a read-only filtered overview above the full editable replacement table.
|
| 417 |
-
|
| 418 |
-
Important design decision:
|
| 419 |
-
|
| 420 |
-
- v12.2 does **not** filter the editable table itself.
|
| 421 |
-
- The full replacement table remains the source of truth for exports.
|
| 422 |
-
- This prevents hidden rows from being accidentally dropped from the final export.
|
| 423 |
-
- The focus filter is deliberately a safe review aid, not an edit-scope limiter.
|
| 424 |
-
|
| 425 |
-
Testing:
|
| 426 |
-
|
| 427 |
-
- Added unit tests for `review_filters.py`.
|
| 428 |
-
- GitHub Actions `Tests` passed.
|
| 429 |
-
- GitHub → Hugging Face sync passed.
|
| 430 |
-
|
| 431 |
-
Intentionally not changed:
|
| 432 |
-
|
| 433 |
-
- No recognizer changes.
|
| 434 |
-
- No entity-type expansion.
|
| 435 |
-
- No export semantics change.
|
| 436 |
-
- No MSI/local installer work.
|
| 437 |
-
- No LLM/cloud feature.
|
| 438 |
-
|
| 439 |
-
---
|
| 440 |
-
|
| 441 |
-
## v12.1 — Review table status model
|
| 442 |
|
| 443 |
Status: completed and green in GitHub Actions; user confirmed the Status column appears in Hugging Face.
|
| 444 |
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
- Start the v12 Review UX phase with a simple, explicit review-status model.
|
| 448 |
-
- Make it clearer to a legal user which rows are already applied, which need review, which are manual, and which come from remembered replacements.
|
| 449 |
-
- Keep recognizer logic unchanged.
|
| 450 |
-
|
| 451 |
-
Files added or changed:
|
| 452 |
-
|
| 453 |
-
- `review_status.py`
|
| 454 |
-
- `tests/test_review_status.py`
|
| 455 |
-
- `fix_streamlit_nested_expanders.py`
|
| 456 |
-
- `CHANGELOG.md`
|
| 457 |
-
|
| 458 |
-
Main changes:
|
| 459 |
-
|
| 460 |
-
- Added a pure review-status model with stable internal values:
|
| 461 |
-
- `auto_detected`
|
| 462 |
-
- `needs_review`
|
| 463 |
-
- `manual`
|
| 464 |
-
- `remembered`
|
| 465 |
-
- Added Dutch user-facing labels:
|
| 466 |
-
- `Automatisch vervangen`
|
| 467 |
-
- `Controle nodig`
|
| 468 |
-
- `Handmatig toegevoegd`
|
| 469 |
-
- `Onthouden vervanging`
|
| 470 |
-
- Added sorting order so rows needing review appear before automatically applied rows.
|
| 471 |
-
- Added tests for source-to-status mapping and ordering.
|
| 472 |
-
- Extended the existing Streamlit startup patch so the replacement table gets a visible `Status` column, internal status fields and a compact status summary above the editor.
|
| 473 |
-
|
| 474 |
-
Testing:
|
| 475 |
-
|
| 476 |
-
- Added unit tests for `review_status.py`.
|
| 477 |
-
- GitHub Actions `Tests` passed.
|
| 478 |
-
- GitHub → Hugging Face sync passed.
|
| 479 |
-
- User confirmed the Status column appeared correctly in the Hugging Face app.
|
| 480 |
-
|
| 481 |
-
Intentionally not changed:
|
| 482 |
|
| 483 |
-
-
|
| 484 |
-
-
|
| 485 |
-
-
|
| 486 |
-
- No LLM/cloud feature.
|
| 487 |
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
## v11.2 — Dutch recognizer integration tests
|
| 491 |
|
| 492 |
Status: completed and green in GitHub Actions.
|
| 493 |
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
- Prove that the real Dutch recognizer layer works, not only the candidate scanner / audit layer.
|
| 497 |
-
- Test recognizer output at value/span level.
|
| 498 |
-
- Confirm that context labels remain readable and are not swallowed into the sensitive span.
|
| 499 |
-
|
| 500 |
-
Files added or changed:
|
| 501 |
-
|
| 502 |
-
- `.github/workflows/tests.yml`
|
| 503 |
-
- `tests/test_dutch_recognizers_integration.py`
|
| 504 |
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
- Added lightweight recognizer integration tests using `get_dutch_recognizers()` directly.
|
| 508 |
-
- Verified that v11.1 legal reference values are detected by the actual recognizers.
|
| 509 |
-
- Verified expected entity types for representative court/case numbers, incident numbers, camera/video references, insurance claim references, repair numbers, immigration numbers, municipal references and KvK numbers.
|
| 510 |
- Verified value-only behavior so context labels remain readable.
|
| 511 |
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
- GitHub Actions `Tests` passed.
|
| 515 |
-
- GitHub → Hugging Face sync passed.
|
| 516 |
-
|
| 517 |
-
Intentionally not changed:
|
| 518 |
-
|
| 519 |
-
- No UI changes.
|
| 520 |
-
- No MSI/local installer work.
|
| 521 |
-
- No new cloud dependency.
|
| 522 |
-
|
| 523 |
-
---
|
| 524 |
-
|
| 525 |
-
## v11.1 — Legal reference recognizer hardening
|
| 526 |
|
| 527 |
Status: completed and green in GitHub Actions.
|
| 528 |
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
- Harden recognition and review of Dutch legal/admin reference values.
|
| 532 |
-
- Move from isolated examples to category-level reference recognition.
|
| 533 |
-
- Preserve legal context while only selecting the sensitive value.
|
| 534 |
-
|
| 535 |
-
Files changed:
|
| 536 |
-
|
| 537 |
-
- `candidate_scanner.py`
|
| 538 |
-
- `test_cases/legal_regression_cases.py`
|
| 539 |
-
- `tests/test_candidate_scanner_regression.py`
|
| 540 |
-
- `tests/test_case_number_pattern_contract.py`
|
| 541 |
-
|
| 542 |
-
Main changes:
|
| 543 |
-
|
| 544 |
-
- Expanded the regression set with concrete Dutch legal/admin examples reported during testing.
|
| 545 |
-
- Added/validated cases for court/case numbers, incident numbers, camera/video references, insurance claim references, repair numbers, immigration numbers, municipal references and KvK numbers in labelled context.
|
| 546 |
-
- Added a lightweight KvK fallback to the candidate scanner.
|
| 547 |
-
- Kept the candidate scanner as a review/audit layer with candidates unchecked by default.
|
| 548 |
-
- Updated the case-reference contract test to use the broader contextual value regex instead of only the strict formal court-number regex.
|
| 549 |
|
| 550 |
-
|
|
|
|
|
|
|
|
|
|
| 551 |
|
| 552 |
-
|
| 553 |
-
- Tests reflect contextual recognition, not only raw pattern recognition.
|
| 554 |
-
|
| 555 |
-
Testing:
|
| 556 |
-
|
| 557 |
-
- GitHub Actions `Tests` passed after the contextual-value test correction.
|
| 558 |
-
- GitHub → Hugging Face sync passed.
|
| 559 |
-
|
| 560 |
-
Intentionally not changed:
|
| 561 |
-
|
| 562 |
-
- No broad blind masking of every uppercase/digit code.
|
| 563 |
-
- No automatic masking of weak candidates without context.
|
| 564 |
-
- No masking of article references, dates, amounts, postcodes or document navigation references as legal reference numbers.
|
| 565 |
-
|
| 566 |
-
---
|
| 567 |
-
|
| 568 |
-
## v10 — Regression test layer
|
| 569 |
|
| 570 |
Status: completed and green in GitHub Actions.
|
| 571 |
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
- Stop relying only on manual interface testing.
|
| 575 |
-
- Create a repeatable regression safety net before further recognizer changes.
|
| 576 |
-
- Protect context preservation and false-positive behavior.
|
| 577 |
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
- `test_cases/legal_regression_cases.py`
|
| 581 |
-
- `tests/test_candidate_scanner_regression.py`
|
| 582 |
-
- `tests/test_context_preservation_contract.py`
|
| 583 |
-
- `tests/test_case_number_pattern_contract.py`
|
| 584 |
-
- `.github/workflows/tests.yml`
|
| 585 |
-
|
| 586 |
-
Main changes:
|
| 587 |
-
|
| 588 |
-
- Added synthetic Dutch legal regression cases.
|
| 589 |
-
- Added candidate scanner tests for expected reference-like values.
|
| 590 |
- Added false-positive guards for legal article references, dates and money/amount context.
|
| 591 |
-
- Added context preservation
|
| 592 |
-
- Added
|
| 593 |
-
- Fixed import path handling by setting `PYTHONPATH` to the repository root.
|
| 594 |
-
- Kept early tests lightweight to avoid unnecessary full Streamlit/Presidio/spaCy startup cost.
|
| 595 |
-
|
| 596 |
-
Testing:
|
| 597 |
-
|
| 598 |
-
- GitHub Actions `Tests` passed.
|
| 599 |
-
- GitHub → Hugging Face sync passed.
|
| 600 |
-
|
| 601 |
-
Intentionally not changed:
|
| 602 |
-
|
| 603 |
-
- No major recognizer changes in v10 itself.
|
| 604 |
-
- No UI redesign.
|
| 605 |
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
## v9.1 — UI polish and baseline stabilization
|
| 609 |
|
| 610 |
Status: completed and working in Hugging Face.
|
| 611 |
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
- Polish Dutch UI text after the v9 conversion.
|
| 615 |
-
- Keep the app stable before adding deeper regression infrastructure.
|
| 616 |
-
|
| 617 |
-
Files changed:
|
| 618 |
-
|
| 619 |
-
- `ui_texts_nl.py`
|
| 620 |
-
|
| 621 |
-
Main changes:
|
| 622 |
|
| 623 |
- Added `APP_VERSION = "v9.1"`.
|
| 624 |
-
- Corrected UI wording
|
| 625 |
-
- `clientreferenties` → `cliëntreferenties`.
|
| 626 |
- Kept recognizer behavior unchanged.
|
| 627 |
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
- GitHub → Hugging Face sync passed.
|
| 631 |
-
- User confirmed the app was working.
|
| 632 |
-
|
| 633 |
-
Intentionally not changed:
|
| 634 |
-
|
| 635 |
-
- No recognizer changes.
|
| 636 |
-
- No major UX redesign.
|
| 637 |
-
|
| 638 |
-
---
|
| 639 |
-
|
| 640 |
-
## v9 — Dutch Legal UI Layer
|
| 641 |
|
| 642 |
Status: completed and working in Hugging Face after startup hotfix.
|
| 643 |
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
- Move the app away from a technical “Presidio demo” feel.
|
| 647 |
-
- Present it as a Dutch legal document scrubber.
|
| 648 |
-
- Keep the underlying recognition engine, but make the user workflow more understandable for legal users.
|
| 649 |
-
|
| 650 |
-
Files added or changed:
|
| 651 |
-
|
| 652 |
-
- `ui_texts_nl.py`
|
| 653 |
-
- `display_labels_nl.py`
|
| 654 |
-
- `presidio_streamlit.py`
|
| 655 |
-
- `fix_streamlit_nested_expanders.py`
|
| 656 |
-
- `Dockerfile`
|
| 657 |
-
|
| 658 |
-
Main changes:
|
| 659 |
-
|
| 660 |
-
- Added Dutch product language and workflow language such as `Scrub Legal`, `Lokale juridische documentcontrole`, `Controlemodus`, `Voeg document of tekst toe`, `Controleer gevonden gegevens`, `Mogelijke gemiste waarden` and `Download opgeschoonde bestanden`.
|
| 661 |
-
- Added a separate Dutch UI copy layer and Dutch display labels for technical entity types.
|
| 662 |
-
- Reworked the main Streamlit app to make the workflow more legal-user oriented.
|
| 663 |
-
- Restored/kept synthetic legal test example loading.
|
| 664 |
-
- Added a startup hotfix for Streamlit’s nested-expander limitation.
|
| 665 |
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
-
|
|
|
|
| 669 |
|
| 670 |
---
|
| 671 |
|
|
@@ -686,26 +454,16 @@ Files added or changed:
|
|
| 686 |
Main changes:
|
| 687 |
|
| 688 |
- Added a GitHub Actions workflow for syncing to Hugging Face.
|
| 689 |
-
-
|
| 690 |
-
- Replaced it with a simpler direct Git push workflow.
|
| 691 |
- Added concurrency handling to avoid overlapping sync runs.
|
| 692 |
|
| 693 |
-
Security/ops note:
|
| 694 |
-
|
| 695 |
-
- The workflow expects a GitHub Actions secret named `HF_TOKEN`.
|
| 696 |
-
- This should be a Hugging Face token with write access to `solidprivacy/scrub`.
|
| 697 |
-
|
| 698 |
---
|
| 699 |
|
| 700 |
## Pre-GitHub incremental development phase
|
| 701 |
|
| 702 |
Status: superseded by GitHub workflow, but historically important.
|
| 703 |
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
- Improve the Hugging Face app through manual file replacement while the GitHub workflow was not yet connected.
|
| 707 |
-
|
| 708 |
-
Main themes:
|
| 709 |
|
| 710 |
- Dutch/EU recognizer direction.
|
| 711 |
- Legal-profession focus.
|
|
@@ -713,13 +471,7 @@ Main themes:
|
|
| 713 |
- Recognition of Dutch legal references, case numbers and administrative identifiers.
|
| 714 |
- Candidate scanner / audit-layer idea.
|
| 715 |
- Synthetic legal examples for testing.
|
| 716 |
-
- Context preservation principle:
|
| 717 |
-
|
| 718 |
-
Important design conclusions:
|
| 719 |
-
|
| 720 |
-
- A local deterministic scrubber is a better MVP path than relying on cloud LLMs.
|
| 721 |
-
- Local LLMs may be useful later, but they are not the best first layer for a fast legal scrubber.
|
| 722 |
-
- The MVP should combine deterministic recognizers, Dutch legal/admin taxonomy, review table, candidate scanner, regression tests and eventually local packaging.
|
| 723 |
|
| 724 |
---
|
| 725 |
|
|
@@ -727,7 +479,10 @@ Important design conclusions:
|
|
| 727 |
|
| 728 |
Possible directions:
|
| 729 |
|
| 730 |
-
-
|
| 731 |
-
-
|
|
|
|
|
|
|
|
|
|
| 732 |
- More advanced DOCX/PDF preservation.
|
| 733 |
- Better synthetic long-form legal test documents.
|
|
|
|
| 26 |
|
| 27 |
---
|
| 28 |
|
| 29 |
+
## v12.6 — Export sanity checks UI integration
|
| 30 |
+
|
| 31 |
+
Status: UI integration implemented; awaiting GitHub Actions, Hugging Face sync and app verification.
|
| 32 |
+
|
| 33 |
+
Purpose:
|
| 34 |
+
|
| 35 |
+
- Show advisory export sanity warnings near the final review/download section.
|
| 36 |
+
- Make remaining review risk visible before the user downloads files.
|
| 37 |
+
- Preserve existing export/download behavior.
|
| 38 |
+
- Keep the warnings advisory only.
|
| 39 |
+
|
| 40 |
+
Files added or changed:
|
| 41 |
+
|
| 42 |
+
- `fix_streamlit_nested_expanders.py`
|
| 43 |
+
- `tests/test_export_sanity_ui_patch.py`
|
| 44 |
+
- `WORKPACKAGES.md`
|
| 45 |
+
- `CHANGELOG.md`
|
| 46 |
+
- `handover/workpackages/20260607_1445_v12_6_export_sanity_ui.md`
|
| 47 |
+
|
| 48 |
+
Main changes:
|
| 49 |
+
|
| 50 |
+
- Integrated the existing `export_sanity.py` helper into the Streamlit startup patch flow.
|
| 51 |
+
- Added UI text for `Extra exportcontrole` near the existing v12.5 `Eindcontrole vóór download` block.
|
| 52 |
+
- The UI can show advisory warnings for:
|
| 53 |
+
- unchecked `Controle nodig` rows;
|
| 54 |
+
- candidate rows not included;
|
| 55 |
+
- no replacements selected;
|
| 56 |
+
- user review still required;
|
| 57 |
+
- export not guaranteeing full anonymization.
|
| 58 |
+
- Added a patch-level test file to guard that the export sanity helper is wired into the UI patch.
|
| 59 |
+
|
| 60 |
+
Testing and verification:
|
| 61 |
+
|
| 62 |
+
- `tests/test_export_sanity_ui_patch.py` was added.
|
| 63 |
+
- The WP3B worker could not run pytest locally from the connector environment.
|
| 64 |
+
- Earlier helper validation was reconciled by the coordinator: `Tests #58` green and `Sync to Hugging Face Space #72` green for commit `b0bf8ae`.
|
| 65 |
+
- GitHub Actions and Hugging Face sync for the UI integration commits still need coordinator verification.
|
| 66 |
+
- Hugging Face app verification is still required: confirm `Extra exportcontrole` appears before downloads and downloads remain available.
|
| 67 |
+
|
| 68 |
+
Intentionally not changed:
|
| 69 |
+
|
| 70 |
+
- No direct edit to `presidio_streamlit.py`.
|
| 71 |
+
- No export/download blocking.
|
| 72 |
+
- No change to which rows are included in export.
|
| 73 |
+
- No change to TXT, CSV, DOCX or PDF download logic.
|
| 74 |
+
- No Scrub Key logic added.
|
| 75 |
+
- No reinsert workflow added.
|
| 76 |
+
- No cloud processing introduced.
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
## WP Status Reconciliation — WP3/WP4 verification evidence
|
| 81 |
|
| 82 |
Status: reconciliation completed; GitHub Actions and Hugging Face sync could not be independently confirmed through the connector.
|
|
|
|
| 88 |
- v13.0 Scrub Key commits, especially `d65364373e4d3612044d8688ac17e11de81c07e5`.
|
| 89 |
- Update project control files without changing code or UI behavior.
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
Recorded repo evidence:
|
| 92 |
|
| 93 |
- WP3 handover records local targeted validation:
|
|
|
|
| 95 |
- WP4 changelog records local targeted validation:
|
| 96 |
- `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
Intentionally not changed:
|
| 99 |
|
| 100 |
- No code files.
|
|
|
|
| 103 |
- No export semantics.
|
| 104 |
- No Hugging Face app behavior.
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
---
|
| 107 |
|
| 108 |
## v13.0 — Scrub Key specification and pure model
|
| 109 |
|
| 110 |
+
Status: implemented; coordinator later showed `Tests #56` green and `Sync #70` green for commit `d653643`.
|
| 111 |
|
| 112 |
Purpose:
|
| 113 |
|
|
|
|
| 142 |
- Added required safety language explaining that a Scrub Key makes scrubbed text reversible.
|
| 143 |
- Explicitly classified the Scrub Key model as pseudonymization, not full anonymization.
|
| 144 |
- Added local/protected key handling guidance and external-AI sharing warning.
|
| 145 |
+
- Added deterministic pure helpers:
|
| 146 |
- `build_scrub_key(rows, document_label=None)`;
|
| 147 |
- `scrub_key_to_json(scrub_key)`;
|
| 148 |
- `scrub_key_from_json(text)`;
|
|
|
|
| 154 |
|
| 155 |
- Added `tests/test_scrub_key.py`.
|
| 156 |
- Local targeted validation passed: `PYTHONPATH=. pytest -q tests/test_scrub_key.py` → 6 passed.
|
| 157 |
+
- Coordinator evidence later confirmed GitHub Actions and Hugging Face sync green for `d653643`.
|
|
|
|
| 158 |
|
| 159 |
Intentionally not changed:
|
| 160 |
|
| 161 |
- No direct edit to `presidio_streamlit.py`.
|
| 162 |
+
- No direct edit to `fix_streamlit_nested_expanders.py` for v13.
|
| 163 |
+
- No export/download buttons for Scrub Key yet.
|
| 164 |
- No reinsert UI.
|
| 165 |
- No cloud processing.
|
| 166 |
- No secret storage.
|
|
|
|
| 171 |
|
| 172 |
## v12.6 — Export sanity checks helper and tests
|
| 173 |
|
| 174 |
+
Status: helper implemented; coordinator reconciled helper verification as green before UI integration.
|
| 175 |
|
| 176 |
Purpose:
|
| 177 |
|
|
|
|
| 210 |
- Added `tests/test_export_sanity.py`.
|
| 211 |
- Local targeted validation passed in the WP3 handover:
|
| 212 |
- `PYTHONPATH=. pytest -q tests/test_export_sanity.py tests/test_review_summary.py` → 12 passed.
|
| 213 |
+
- Coordinator later reconciled helper verification: `Tests #58` green and `Sync to Hugging Face Space #72` green for commit `b0bf8ae`.
|
| 214 |
|
| 215 |
Intentionally not changed:
|
| 216 |
|
| 217 |
- No direct edit to `presidio_streamlit.py`.
|
| 218 |
+
- No direct edit to `fix_streamlit_nested_expanders.py` in the helper-only phase.
|
| 219 |
- No change to `review_summary.py`.
|
| 220 |
- No export/download blocking.
|
| 221 |
- No change to which rows are included in export.
|
|
|
|
| 248 |
Main changes:
|
| 249 |
|
| 250 |
- Added a pure helper that accepts review rows as dictionaries or DataFrame-like records.
|
| 251 |
+
- Added summary counts for automatically detected rows, rows needing review, manual rows, remembered rows, checked rows, unchecked rows and open candidate warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 252 |
- Added conservative include-flag parsing for boolean, numeric and Dutch/string values.
|
| 253 |
- Added status inference from stable status values, Dutch status labels, source fields and manual/remembered entity markers.
|
| 254 |
- Added Dutch readiness labels and markdown summary lines.
|
|
|
|
| 269 |
Intentionally not changed:
|
| 270 |
|
| 271 |
- No direct edit to `presidio_streamlit.py` during closeout.
|
|
|
|
| 272 |
- No recognizer changes.
|
| 273 |
- No entity-type expansion.
|
| 274 |
- No export/download blocking.
|
|
|
|
| 348 |
|
| 349 |
---
|
| 350 |
|
| 351 |
+
## Earlier completed work
|
| 352 |
|
| 353 |
+
### v12.3 — Review table simplification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 354 |
|
| 355 |
+
Status: completed and user-confirmed after pandas Index bugfix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 356 |
|
| 357 |
+
Summary:
|
| 358 |
|
| 359 |
+
- Added `review_table_config.py` and tests.
|
| 360 |
+
- Simplified the main editable review table to the legal-user fields.
|
| 361 |
+
- Moved technical/audit fields to `Technische details bij de vervangtabel`.
|
| 362 |
+
- Fixed pandas Index truth-value handling.
|
| 363 |
+
- Preserved export semantics.
|
| 364 |
|
| 365 |
+
### v12.2 — Review focus filters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 366 |
|
| 367 |
Status: completed and green in GitHub Actions.
|
| 368 |
|
| 369 |
+
Summary:
|
| 370 |
|
| 371 |
+
- Added `review_filters.py` and tests.
|
| 372 |
+
- Added safe focus filters such as `Toon alles`, `Alleen controle nodig`, `Alleen juridische referenties`, `Alleen namen/adressen` and `Alleen lage zekerheid`.
|
| 373 |
+
- Kept the full editable table as the source of truth for exports.
|
| 374 |
|
| 375 |
+
### v12.1 — Review table status model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 376 |
|
| 377 |
Status: completed and green in GitHub Actions; user confirmed the Status column appears in Hugging Face.
|
| 378 |
|
| 379 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 380 |
|
| 381 |
+
- Added `review_status.py` and tests.
|
| 382 |
+
- Added Dutch review statuses: `Automatisch vervangen`, `Controle nodig`, `Handmatig toegevoegd`, `Onthouden vervanging`.
|
| 383 |
+
- Added review status fields and status ordering in the review table.
|
|
|
|
| 384 |
|
| 385 |
+
### v11.2 — Dutch recognizer integration tests
|
|
|
|
|
|
|
| 386 |
|
| 387 |
Status: completed and green in GitHub Actions.
|
| 388 |
|
| 389 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 390 |
|
| 391 |
+
- Added recognizer integration tests using `get_dutch_recognizers()`.
|
| 392 |
+
- Verified Dutch legal/admin references at value/span level.
|
|
|
|
|
|
|
|
|
|
| 393 |
- Verified value-only behavior so context labels remain readable.
|
| 394 |
|
| 395 |
+
### v11.1 — Legal reference recognizer hardening
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 396 |
|
| 397 |
Status: completed and green in GitHub Actions.
|
| 398 |
|
| 399 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 400 |
|
| 401 |
+
- Hardened Dutch legal/admin reference detection.
|
| 402 |
+
- Expanded synthetic regression cases.
|
| 403 |
+
- 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.
|
| 404 |
+
- Preserved context words and legal meaning.
|
| 405 |
|
| 406 |
+
### v10 — Regression test layer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 407 |
|
| 408 |
Status: completed and green in GitHub Actions.
|
| 409 |
|
| 410 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 411 |
|
| 412 |
+
- Added synthetic Dutch legal regression cases and candidate scanner tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 413 |
- Added false-positive guards for legal article references, dates and money/amount context.
|
| 414 |
+
- Added context preservation tests.
|
| 415 |
+
- Added GitHub Actions test workflow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 416 |
|
| 417 |
+
### v9.1 — UI polish and baseline stabilization
|
|
|
|
|
|
|
| 418 |
|
| 419 |
Status: completed and working in Hugging Face.
|
| 420 |
|
| 421 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 422 |
|
| 423 |
- Added `APP_VERSION = "v9.1"`.
|
| 424 |
+
- Corrected Dutch UI wording.
|
|
|
|
| 425 |
- Kept recognizer behavior unchanged.
|
| 426 |
|
| 427 |
+
### v9 — Dutch Legal UI Layer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 428 |
|
| 429 |
Status: completed and working in Hugging Face after startup hotfix.
|
| 430 |
|
| 431 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
|
| 433 |
+
- Moved the app away from a technical Presidio demo feel.
|
| 434 |
+
- Added Dutch legal product language and workflow labels.
|
| 435 |
+
- Added `ui_texts_nl.py`, `display_labels_nl.py`, updates to `presidio_streamlit.py`, `fix_streamlit_nested_expanders.py` and `Dockerfile`.
|
| 436 |
+
- Added a startup hotfix for Streamlit nested expander limitations.
|
| 437 |
|
| 438 |
---
|
| 439 |
|
|
|
|
| 454 |
Main changes:
|
| 455 |
|
| 456 |
- Added a GitHub Actions workflow for syncing to Hugging Face.
|
| 457 |
+
- Replaced an initial hub-sync approach with a simpler direct Git push workflow.
|
|
|
|
| 458 |
- Added concurrency handling to avoid overlapping sync runs.
|
| 459 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 460 |
---
|
| 461 |
|
| 462 |
## Pre-GitHub incremental development phase
|
| 463 |
|
| 464 |
Status: superseded by GitHub workflow, but historically important.
|
| 465 |
|
| 466 |
+
Summary:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 467 |
|
| 468 |
- Dutch/EU recognizer direction.
|
| 469 |
- Legal-profession focus.
|
|
|
|
| 471 |
- Recognition of Dutch legal references, case numbers and administrative identifiers.
|
| 472 |
- Candidate scanner / audit-layer idea.
|
| 473 |
- Synthetic legal examples for testing.
|
| 474 |
+
- Context preservation principle: mask the person/value, not the legal meaning of the sentence.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 475 |
|
| 476 |
---
|
| 477 |
|
|
|
|
| 479 |
|
| 480 |
Possible directions:
|
| 481 |
|
| 482 |
+
- Scrub Key JSON export UI.
|
| 483 |
+
- Scrub Key import/reload.
|
| 484 |
+
- AI-output reinsert.
|
| 485 |
+
- Further recognizer expansion by legal domain.
|
| 486 |
+
- Local packaging research.
|
| 487 |
- More advanced DOCX/PDF preservation.
|
| 488 |
- Better synthetic long-form legal test documents.
|