Spaces:
Running
Running
File size: 10,832 Bytes
1f5e008 221b249 84f5312 837652c 84f5312 837652c 84f5312 837652c 84f5312 837652c 84f5312 837652c 3ff1b2d f6def13 4bcef50 f6def13 4bcef50 f6def13 4bcef50 f6def13 4bcef50 f6def13 4bcef50 f6def13 4bcef50 f6def13 4bcef50 9737d22 b8ac0f9 6e4ec9b 313a70e 1f5e008 84f5312 9737d22 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | # Changelog β SolidPrivacy Scrub
This changelog records meaningful product, architecture, workflow and recognizer changes for the Scrub legal document scrubber.
Conventions:
- Keep this file explicit and human-readable.
- Group changes by project phase / version.
- Record what changed, why it changed, and what is intentionally not changed.
- Do not use this as a substitute for tests; every recognizer hardening step should also add or update regression tests.
---
## Current development rule
From v10 onward, recognizer work follows this order:
1. Add or update synthetic regression cases.
2. Add or update tests.
3. Change recognizer / scanner logic.
4. Verify GitHub Actions tests are green.
5. Let GitHub sync to Hugging Face automatically.
6. Test the app in Hugging Face.
For UI/UX-only work, prefer pure helper modules and tests before touching Streamlit UI flow.
---
## v13.3 β Deterministic reinsert UI implementation
Status: implemented; awaiting GitHub Actions, Hugging Face sync and app verification.
Purpose:
- Add the deterministic local reinsert UI described in `REINSERT_UI_SPEC.md`.
- Let the user paste scrubbed or AI-generated text and locally restore mapped placeholders using a validated Scrub Key.
- Show restored text, an audit summary and a `.txt` download for restored text.
- Keep the step local and deterministic, with no AI calls and no cloud processing.
Files added or changed:
- `fix_streamlit_nested_expanders.py`
- `tests/test_scrub_key_reinsert_ui_patch.py`
- `tests/test_scrub_key_ui_patch.py`
- `WORKPACKAGES.md`
- `CHANGELOG.md`
- `handover/workpackages/20260607_1915_v13_3_reinsert_ui_implementation.md`
Main changes:
- Added import/wiring for the verified helper:
- `from scrub_key_reinsert import reinsert_from_scrub_key`.
- Added the section `Originele waarden terugzetten` after the existing Scrub Key import/reload area.
- Added the input label `Plak hier de tekst waarin u originele waarden lokaal wilt terugzetten`.
- Added the explicit action button `Zet originele waarden lokaal terug`.
- Added local helper call:
- `reinsert_from_scrub_key(reinsert_input_text, active_reinsert_scrub_key)`.
- Added output label `Herstelde tekst`.
- Added `Download herstelde tekst (.txt)` with `text/plain` output.
- Added `Controleverslag terugzetten` audit summary.
- Added audit rendering for item count, active item count, excluded item count, replacement count, placeholders not found, unknown placeholders, duplicate placeholders, validation issues, local-only status, AI-processing status and cloud-processing status.
- Added visible warning that restored text may again contain personal or confidential information and must be reviewed before sharing.
- Added local/no-AI/no-cloud wording.
- Stores a successfully imported Scrub Key in `st.session_state["active_scrub_key"]` for local reinsert use.
- Falls back to the currently built Scrub Key from reviewed replacement rows if no imported key is active.
Testing and validation:
- Added `tests/test_scrub_key_reinsert_ui_patch.py`.
- Updated `tests/test_scrub_key_ui_patch.py` so it no longer forbids the intentionally added reinsert flow, while still guarding no-AI, no-cloud and no-automatic-document-rehydration boundaries.
- Local targeted validation on a reconstructed subset passed:
- `PYTHONPATH=. pytest -q tests/test_scrub_key.py tests/test_scrub_key_import.py tests/test_scrub_key_reinsert.py tests/test_scrub_key_reinsert_ui_patch.py tests/test_scrub_key_import_ui_patch.py tests/test_scrub_key_ui_patch.py` β 57 passed.
- Full repository test suite was not run from this connector environment.
- GitHub Actions are pending for WP8B commits.
- Hugging Face sync is pending for WP8B commits.
- App verification is pending because UI behavior changed.
Intentionally not changed:
- No direct edit to `presidio_streamlit.py`.
- No edit to `scrub_key_reinsert.py`.
- No edit to `scrub_key.py`.
- No edit to `scrub_key_import.py`.
- No AI calls.
- No cloud processing.
- No automatic document rehydration.
- No DOCX/PDF reinsert.
- No TXT, CSV, DOCX or PDF scrubbed export behavior changed.
- No Scrub Key JSON export behavior intentionally changed.
- No Scrub Key import/reload behavior intentionally changed except storing the validated imported key in session state for reinsert use.
- No silent overwrite of existing review rows.
- No secrets, tokens or real personal data.
Outcome:
- v13.3 deterministic local reinsert UI is implemented and awaits external verification and app testing.
---
## v13.3 β Deterministic reinsert UI planning
Status: implemented; reinsert UI implementation completed in WP8B and awaits verification.
Purpose:
- Plan deterministic local reinsert UI before changing Streamlit UI code.
- Define where the UI should appear, what labels it should use, what state it should rely on, and which warnings and audit fields it must show.
- Keep AI-output behavior separate unless explicitly approved.
Files added or changed:
- `REINSERT_UI_SPEC.md`
- `WORKPACKAGES.md`
- `CHANGELOG.md`
- `handover/workpackages/20260607_1900_v13_3_reinsert_ui_planning.md`
Main planning decisions:
- Future UI block should appear after the existing Scrub Key import/reload section near the download/export area.
- Suggested section label: `Originele waarden terugzetten`.
- Suggested input label: `Plak hier de tekst waarin u originele waarden lokaal wilt terugzetten`.
- Suggested action button: `Zet originele waarden lokaal terug`.
- Suggested output label: `Herstelde tekst`.
- Suggested download label: `Download herstelde tekst (.txt)`.
- Future UI should call `reinsert_from_scrub_key(text, scrub_key)` and render the helper result instead of duplicating reinsert logic.
- Future UI should use a validated Scrub Key from import/reload first, or a key built from the current reviewed replacement table if no imported key exists.
- Reinsertion must require a separate visible user action and must not happen automatically when a Scrub Key is loaded.
- First UI implementation should produce restored text and `.txt` download only; no DOCX/PDF rehydration in the first UI step.
Required warnings specified:
- Reinsertion restores original sensitive values.
- Restored text may again contain personal or confidential information.
- Restored output must be manually reviewed before sharing.
- A Scrub Key is reversible/pseudonymization, not full anonymization.
- The key must remain local and protected.
- No AI/cloud processing is involved in the local reinsert step.
Required audit summary specified:
- mapping item count;
- active item count;
- excluded item count;
- replacement count;
- placeholders not found;
- unknown placeholders;
- duplicate placeholders;
- validation issues;
- local-only status;
- no-AI status;
- no-cloud status.
Testing and validation:
- Tests: not applicable; planning/specification-only workpackage.
- App verification: not applicable; no UI behavior changed in WP8 planning.
Intentionally not changed in planning phase:
- No UI code changed.
- No direct edit to `fix_streamlit_nested_expanders.py`.
- No direct edit to `presidio_streamlit.py`.
- No tests added or changed.
- No AI calls.
- No cloud processing.
- No automatic document rehydration.
- No TXT, CSV, DOCX or PDF export behavior changed.
- No Scrub Key JSON export behavior changed.
- No Scrub Key import/reload behavior changed.
- No secrets, tokens or real personal data.
Outcome:
- v13.3 deterministic reinsert UI was planned and then implemented in WP8B.
---
## v13.3 β Deterministic reinsert helper verification reconciliation
Status: completed and formally closed after Actions/sync verification.
Purpose:
- Administratively reconcile the v13.3 deterministic reinsert helper after coordinator-provided verification evidence.
- Replace the previous `awaiting coordinator verification of Actions/sync` status with formal closeout.
- Confirm that the helper remains pure, local and deterministic.
- Preserve the boundary that no UI, AI-output flow, cloud processing or export/download behavior change was added.
Verification evidence:
- Tests #106 green β commit `5854dbf`.
- Sync to Hugging Face Space #120 green β commit `5854dbf`.
- Tests #107 green β commit `43ecad4`.
- Sync to Hugging Face Space #121 green β commit `43ecad4`.
- Tests #108 green β commit `6e4ec9b`.
- Sync to Hugging Face Space #122 green β commit `6e4ec9b`.
- Tests #109 green β commit `eaf036a`.
- Sync to Hugging Face Space #123 green β commit `eaf036a`.
Validation status:
- GitHub Actions: green based on coordinator evidence.
- Hugging Face sync: green based on coordinator evidence.
- App verification: not applicable, helper-only package.
Outcome:
- v13.3 deterministic reinsert helper is completed and formally closed.
---
## v13.2 β Scrub Key import/reload UI app verification closeout
Status: completed, app-verified and closed.
Purpose:
- Administratively close the v13.2 Scrub Key import/reload UI after app verification.
- Record that the implemented import/reload flow works in the Hugging Face app.
- Preserve the boundary that this phase is import/reload only and does not add AI-output reinsert.
Technical evidence already recorded:
- Tests #89 green β commit `83353e4`.
- Tests #90 green β commit `4a1ef55`.
- Sync to Hugging Face Space #104 green β commit `4a1ef55`.
- Tests #91 green β commit `4d8bfe9`.
- Sync to Hugging Face Space #105 green β commit `4d8bfe9`.
- Tests #92 green β commit `ff8321f`.
- Sync to Hugging Face Space #106 green β commit `ff8321f`.
App verification:
- Confirmed by coordinator/user.
- `Scrub Key laden` works.
- Scrub Key import/reload UI is visible.
- Upload/paste import flow works.
- Pseudonymization/reversibility warning is visible.
- Existing `Download Scrub Key (.json)` remains visible.
- Existing TXT, CSV, DOCX and PDF downloads remain available.
Outcome:
- v13.2 Scrub Key import/reload UI is completed, app-verified and closed.
---
## Earlier completed work
- v13.2 Scrub Key import/reload UI integration.
- v13.2 Scrub Key import/reload helper and tests.
- v13.1 Scrub Key JSON export UI closeout.
- v12.6 Export sanity checks closeout.
- v13.0 Scrub Key specification and pure model.
- v12.5 Final review summary.
- v12.4 Review guidance text.
- Project governance setup.
- v12.3 Review table simplification.
- v12.2 Review focus filters.
- v12.1 Review table status model.
- v11.2 Dutch recognizer integration tests.
- v11.1 Legal reference recognizer hardening.
- v10 Regression test layer.
- v9.1 UI polish and baseline stabilization.
- v9 Dutch Legal UI Layer.
---
## Planned later phase β v13 and beyond
Possible directions:
- Deterministic reinsert UI verification and closeout.
- AI-output reinsert workflow review.
- Further recognizer expansion by legal domain.
|