solidprivacy-nl commited on
Commit
ce7721d
·
1 Parent(s): e442d28

Record WP13 TXT reinsert UI implementation

Browse files
Files changed (1) hide show
  1. WORKPACKAGES.md +117 -18
WORKPACKAGES.md CHANGED
@@ -298,7 +298,7 @@ Sync to Hugging Face Space #171 green — commit 268234d
298
  Latest verified WP12-FIX2 commit:
299
 
300
  ```text
301
- 268234d9d1aeb9c82658c4c30702f51cfdd58c96
302
  ```
303
 
304
  App verification confirmed:
@@ -342,20 +342,121 @@ Closeout files:
342
 
343
  ---
344
 
345
- ## Active / next recommended workpackage
346
 
347
  ### WP13 — v13.7 TXT reinsert upload/download UI
348
 
349
- Status: recommended next workpackage after v13.6 app verification closeout.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
 
351
  Goal:
352
 
353
- - Add controlled TXT upload/download support for local reinsert.
354
- - Keep pasted-text reinsert as fallback.
355
- - Preserve existing anonymization export/download semantics.
356
- - Do not add DOCX upload reinsert UI in this workpackage.
357
- - Do not add PDF reinsert.
358
- - Do not add AI/cloud behavior.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
 
360
  Recommended later workpackages:
361
 
@@ -368,12 +469,10 @@ WP15 — PDF text extraction reliability review only
368
 
369
  ## Recommended execution order
370
 
371
- 1. Start WP13 only after v13.6 closeout is recorded.
372
- 2. Implement TXT reinsert upload/download UI with helper-first tests.
373
- 3. Verify GitHub Actions tests.
374
- 4. Verify GitHub to Hugging Face sync.
375
- 5. App-verify TXT reinsert behavior.
376
- 6. After TXT UI is verified, implement DOCX reinsert upload/download UI.
377
- 7. Keep PDF full reinsert out of scope until a separate reliability review.
378
- 8. Keep AI/cloud behavior out unless explicitly approved.
379
- 9. Preserve export/download and Scrub Key import/export semantics.
 
298
  Latest verified WP12-FIX2 commit:
299
 
300
  ```text
301
+ 268234d9d1aeb9c82658c4c30702f51cfdd58c4c30702f51cfdd58c96
302
  ```
303
 
304
  App verification confirmed:
 
342
 
343
  ---
344
 
345
+ ## Current implementation workpackages
346
 
347
  ### WP13 — v13.7 TXT reinsert upload/download UI
348
 
349
+ Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification.
350
+
351
+ Changed files:
352
+
353
+ - `fix_streamlit_nested_expanders.py`
354
+ - `tests/test_two_mode_ui_patch.py`
355
+ - `WORKPACKAGES.md`
356
+ - `CHANGELOG.md`
357
+
358
+ Added files:
359
+
360
+ - `tests/test_txt_reinsert_ui_patch.py`
361
+ - `handover/workpackages/20260608_0000_v13_7_txt_reinsert_upload_download_ui.md`
362
+
363
+ Implemented behavior:
364
+
365
+ - Added controlled TXT upload/download support inside `Originele waarden terugzetten`.
366
+ - Added section label `TXT-bestand terugzetten`.
367
+ - Added TXT upload label `Upload een TXT-bestand met placeholders`.
368
+ - Added action button `Zet TXT-bestand lokaal terug`.
369
+ - Added output label `Herstelde TXT-tekst`.
370
+ - Added download label `Download hersteld TXT-bestand (.txt)`.
371
+ - TXT reinsert uses existing deterministic local helper:
372
+ - `reinsert_txt_bytes(content, scrub_key, encoding="utf-8")`.
373
+ - TXT reinsert requires a loaded Scrub Key before running.
374
+ - Existing pasted-text reinsert remains available as fallback.
375
+ - Existing Scrub Key load/import remains available.
376
+ - Existing anonymization workflow remains under `Anonimiseren`.
377
+ - Restored TXT audit summary includes document type, mapping counts, replacement count, missing/unknown/duplicate placeholders, validation issues, local-only, AI and cloud status.
378
+
379
+ Validation status:
380
+
381
+ - Added `tests/test_txt_reinsert_ui_patch.py` to verify:
382
+ - TXT helper import/use;
383
+ - TXT labels;
384
+ - `.txt` upload-only configuration;
385
+ - Scrub Key requirement;
386
+ - TXT placement inside reinsert mode only;
387
+ - pasted-text reinsert remains;
388
+ - anonymization/export markers remain;
389
+ - audit fields remain;
390
+ - no DOCX upload reinsert UI;
391
+ - no PDF reinsert;
392
+ - no AI/cloud behavior;
393
+ - no alteration of `apply_replacements_to_text` or existing scrubbed downloads.
394
+ - Updated `tests/test_two_mode_ui_patch.py` so TXT reinsert is allowed in the reinsert mode while DOCX/PDF/AI/cloud remain forbidden.
395
+ - Local clone/test run could not be performed in the container because outbound GitHub DNS was unavailable:
396
+ - `Could not resolve host: github.com`.
397
+ - GitHub Actions: awaiting verification.
398
+ - Hugging Face sync: awaiting verification.
399
+ - App verification: required because UI behavior changed.
400
+
401
+ Boundaries preserved:
402
+
403
+ - `presidio_streamlit.py` was not directly edited.
404
+ - No DOCX upload reinsert UI added.
405
+ - No PDF reinsert added.
406
+ - No AI calls added.
407
+ - No cloud processing added.
408
+ - No automatic document rehydration beyond TXT local reinsert added.
409
+ - No existing scrubbed TXT/CSV/DOCX/PDF export/download behavior intentionally changed.
410
+ - No Scrub Key JSON export behavior intentionally changed.
411
+ - No Scrub Key import/reload behavior intentionally changed except reusing the loaded key for TXT reinsert.
412
+ - No secrets, tokens or real personal data stored.
413
+
414
+ ---
415
+
416
+ ## Active / next recommended workpackage
417
+
418
+ ### WP13-CLOSEOUT — v13.7 TXT reinsert upload/download UI app verification closeout
419
+
420
+ Status: recommended next workpackage after coordinator evidence.
421
 
422
  Goal:
423
 
424
+ - Verify GitHub Actions tests.
425
+ - Verify GitHub to Hugging Face sync.
426
+ - App-verify TXT reinsert upload/download behavior.
427
+ - Close WP13 only after evidence confirms the UI works safely.
428
+
429
+ Required app verification:
430
+
431
+ In `Anonimiseren`:
432
+
433
+ - anonymization workflow remains available;
434
+ - source text/file input remains visible;
435
+ - review table remains visible;
436
+ - scrubbed TXT/CSV/DOCX/PDF downloads remain available;
437
+ - Scrub Key JSON export remains available;
438
+ - TXT reinsert upload UI is not presented as part of the anonymization workflow.
439
+
440
+ In `Originele waarden terugzetten`:
441
+
442
+ - `Scrub Key laden` remains visible;
443
+ - Scrub Key upload/paste validation remains visible;
444
+ - pasted-text reinsert remains visible;
445
+ - `TXT-bestand terugzetten` is visible;
446
+ - TXT upload accepts `.txt`;
447
+ - `Zet TXT-bestand lokaal terug` works with a valid Scrub Key;
448
+ - restored TXT text appears;
449
+ - `Download hersteld TXT-bestand (.txt)` works;
450
+ - audit summary appears;
451
+ - warning about restored sensitive/confidential data is visible;
452
+ - local-only / no-AI / no-cloud text is visible.
453
+
454
+ Also confirm:
455
+
456
+ - no DOCX upload reinsert UI appears yet;
457
+ - no PDF reinsert appears;
458
+ - no AI/cloud behavior appears;
459
+ - existing Scrub Key export/import remains available.
460
 
461
  Recommended later workpackages:
462
 
 
469
 
470
  ## Recommended execution order
471
 
472
+ 1. Verify WP13 GitHub Actions and Hugging Face sync.
473
+ 2. Verify TXT reinsert upload/download behavior in the app.
474
+ 3. Close WP13 through closeout if verification is green.
475
+ 4. After TXT UI is verified, implement DOCX reinsert upload/download UI.
476
+ 5. Keep PDF full reinsert out of scope until a separate reliability review.
477
+ 6. Keep AI/cloud behavior out unless explicitly approved.
478
+ 7. Preserve export/download and Scrub Key import/export semantics.