solidprivacy-nl commited on
Commit
0231dcd
·
1 Parent(s): 5b7bfda

Add WP16 handover

Browse files
handover/workpackages/20260609_0000_pdf_text_extraction_helper_spike.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Handover — WP16 — Text-based PDF extraction helper spike
2
+
3
+ Repository worked in: `solidprivacy-nl/scrub`
4
+
5
+ Workpackage title: `WP16 — Text-based PDF extraction helper spike, restored TXT output only`
6
+
7
+ Status: implemented; awaiting GitHub Actions and Hugging Face sync.
8
+
9
+ ## Summary
10
+
11
+ WP16 added a pure helper spike for local text-based PDF extraction and Scrub Key reinsert to restored TXT/text output only.
12
+
13
+ The helper does not add UI, OCR, AI calls, cloud processing, PDF output, PDF-to-DOCX conversion, layout reconstruction or export behavior changes.
14
+
15
+ ## Files added
16
+
17
+ - `scrub_key_pdf_text_reinsert.py`
18
+ - `tests/test_scrub_key_pdf_text_reinsert.py`
19
+ - `handover/workpackages/20260609_0000_pdf_text_extraction_helper_spike.md`
20
+
21
+ ## Files changed
22
+
23
+ - `requirements.txt`
24
+ - `WORKPACKAGES.md`
25
+ - `CHANGELOG.md`
26
+
27
+ ## Tests
28
+
29
+ Added:
30
+
31
+ - `tests/test_scrub_key_pdf_text_reinsert.py`
32
+
33
+ Coverage includes:
34
+
35
+ - text-based PDF extraction;
36
+ - one and multiple placeholders;
37
+ - existing deterministic Scrub Key reinsert path;
38
+ - restored TXT/text output only;
39
+ - no PDF bytes output;
40
+ - unknown placeholders reported and preserved;
41
+ - mapped placeholders not found reported;
42
+ - no-text PDF marked unsupported;
43
+ - local-only/no-AI/no-cloud fields;
44
+ - `ocr_used=False`;
45
+ - `pdf_output=False`;
46
+ - invalid Scrub Key validation issues;
47
+ - no mutation of input Scrub Key;
48
+ - synthetic data only.
49
+
50
+ ## Validation status
51
+
52
+ - Syntax-level validation of the new helper and test file was performed in the Python environment.
53
+ - Repository pytest execution was not available in this connector session.
54
+
55
+ Recommended validation:
56
+
57
+ ```bash
58
+ PYTHONPATH=. pytest -q tests/test_scrub_key_pdf_text_reinsert.py
59
+ PYTHONPATH=. pytest -q tests/test_scrub_key_document_reinsert.py
60
+ PYTHONPATH=. pytest -q tests/test_scrub_key_reinsert.py
61
+ PYTHONPATH=. pytest -q tests/test_scrub_key.py
62
+ ```
63
+
64
+ If feasible:
65
+
66
+ ```bash
67
+ PYTHONPATH=. pytest -q
68
+ ```
69
+
70
+ ## GitHub Actions status
71
+
72
+ Awaiting verification.
73
+
74
+ ## Hugging Face sync status
75
+
76
+ Awaiting verification.
77
+
78
+ ## App verification status
79
+
80
+ Not applicable because no UI behavior changed.
81
+
82
+ ## Dependency decision
83
+
84
+ Added `pypdf` to `requirements.txt`.
85
+
86
+ Justification:
87
+
88
+ - local PDF selectable-text extraction only;
89
+ - no OCR;
90
+ - no cloud service;
91
+ - no AI extraction;
92
+ - no PDF-to-DOCX conversion;
93
+ - no layout reconstruction dependency.
94
+
95
+ ## Remaining risks
96
+
97
+ - PDF text extraction can be incomplete or have incorrect reading order.
98
+ - Scanned/image-only PDFs remain unsupported because OCR is not used.
99
+ - This helper must not be presented as full PDF reinsert.
100
+ - UI should not be added until WP16B verifies Actions/sync and a separate UI planning package is approved.
101
+
102
+ ## Next recommended step
103
+
104
+ `WP16B — Text-based PDF extraction helper spike verification and closeout`
105
+
106
+ Recommended WP16B scope:
107
+
108
+ - verify GitHub Actions tests are green;
109
+ - verify Hugging Face sync is green;
110
+ - record app verification as not applicable;
111
+ - close WP16 if validation is green;
112
+ - do not add UI yet.