openspec: office-document-sanitization scaffolding#1589
Open
rjzondervan wants to merge 1 commit into
Open
Conversation
Scaffold the openspec change for an XML-level sanitiser that runs ahead of the entity-anonymisation walker on .docx and .odt inputs. Sanitiser strips identity-bearing structures (comments, tracked changes, revision history, document metadata, person-identifying field codes, custom XML data bindings) and flattens hyperlinks. Operates on a temp copy so the original file is preserved; produces a SanitizationReport for audit. Pure openspec — proposal, design, capability spec (11 ADDED Requirements), tasks (15 sections). No implementation in this PR; awaiting team review before /opsx:apply.
This was referenced May 19, 2026
Contributor
Quality Report — ConductionNL/openregister @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| composer | ✅ | ✅ 162/162 | |||
| npm | ✅ | ✅ 602/602 | |||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ⏭️ |
Quality workflow — 2026-05-19 09:25 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
office-document-sanitization— XML-level sanitiser that runs ahead of entity anonymisation on.docxand.odtinputs.SanitizationReportvalue object for audit, persisted onAnonymizationLog.sanitization(new JSON column).What's in this PR
Pure openspec scaffolding — no implementation code yet. Four artifacts:
proposal.md— why / what changes / capability / impactdesign.md— 11 decisions including XML-surgery rationale (D1), per-format strategy (D2), tracked-change accept-all semantics (D3), custom XML strip rationale (D4), metadata sentinel"DocuDesk Anonymisation"(D5), person-field-code handling (D6), hyperlink flatten (D7), temp-file pipeline (D8), report shape (D9), and the BLOCKING Word + LibreOffice reopen validation gate (D10)specs/office-document-sanitization/spec.md— 11 ADDED Requirements with scenarios covering all the above + ADR-005 logging compliance and encrypted-document handlingtasks.md— 15 sections from value objects through DI wiring, fixtures, unit + integration tests, the manual validation gate (BLOCKING), docs, and spec maintenanceopenspec validate office-document-sanitization— clean.Why now
This is part of the "anonimiseren bij de bron" arc. Current
DocumentProcessingHandleranonymises text in body paragraphs but leaves comments, tracked-change authors, document metadata, and custom XML data bindings — every one of which can carry PII that survives the operation. This change closes that gap before the deeper walker (sister change) extends content coverage.Composition
This change pairs with sister
text-extraction-office-completeness(separate PR). Sanitiser strips wrappers; walker traverses content. Both target DOCX + ODT. Sanitiser is correctness-fix; walker is coverage-expansion. They can land independently.Status
Ready for team review. No implementation work has started —
/opsx:applyruns only after this PR merges.Test plan
office-document-sanitizationis acceptable"DocuDesk Anonymisation"(D5) is acceptable, or propose alternative