Skip to content

feat(filinq): build image-redaction - #2191

Open
rubenvdlinde wants to merge 10 commits into
developmentfrom
quality/build-image-redaction
Open

rubenvdlinde wants to merge 10 commits into
developmentfrom
quality/build-image-redaction

Conversation

@rubenvdlinde

@rubenvdlinde rubenvdlinde commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Builds openspec/changes/image-redaction (round 2): page, page-range and whole-document redaction in one action (Woo row 4.24), the fail-flagged image leg around OpenRegister's image seam, and the workbench UI.

Tasks done (ticked in tasks.md)

  • 1.1 anonymizationLink 1.5.0: burnedRegionCount, imageRedactionPending, plus withheld, withheldBases, status withheld; anonymizedFileId no longer required (a withheld document has no output). Register 8.72.0, app version raised.
  • 1.2 tests/sample-documents/parkeervergunning-demostad-scan.png: scanned Demostad letter with a printed (test) BSN and a signature block.
  • 3.2 The image seam runs after the OCR fallback and before the entity read-back, so regions it stores take the same proposals, policy and risk as a text finding; regions attach to their rows as origin: image + boxes (additive).
  • 3.3 Fail-flagged: imageDetectionSkipped (backend_unavailable / not_detected with the seam's reason) on extract, objectDetection passed through; imageRedactionPending + burnedRegionCount (performed burns only) on the anonymise result and on its link.
  • 5.2 tests/e2e/spec-coverage/image-redaction.spec.ts for every @e2e scenario (base URL from env, a sessionless context with an empty storage state). Not run here: no Nextcloud instance in this session.
  • 6.1 ScopeRedactionService validates (pages within the document, ranges forward, at least one ground) and stores a decision on documentReview.scopeDecisions (1.1.0).

Built, left unticked, and why

  • 6.2 Commit through the seam is built: page/range become one full-page region per page (box 0,0,1,1) on ImageRedactionService::redactImage(); whole document is withheld with no output; PublicationReadiness lists a withheld document as not for publication; no seam refuses with nothing written. Seam methods on openregister main: regions are persisted by ImageRedactionService::detectImage() (EntityRelation page/box) and burned by ImageRedactionService::redactImage(). Precondition unmet: redactImage() refuses PDFs ("burning image content inside application/pdf files is not supported yet"; openregister anonymisation-image-seam task 3.2 is open), so a page scope on a PDF is refused with nothing written. No burner was written in filinq. The per-page notice naming the ground has no place in the seam's region yet. An openregister issue needs filing for both (this worker may not open issues).
  • 6.3 Dialog src/dialogs/ScopeRedactionDialog.vue, the toolbar button in the review sidebar and the decision rows are built and lint/jest-tested; not browser-verified.
  • 6.4 / 5.4 docs/features/image-redaction.md written (three scopes, why a withheld document has no output, OpenRegister does the pixel work); docs build and Playwright screenshots not run here.
  • 4.2 SIGNATURE type/label, signature-unavailable notice, not-checked and pending warnings built; burned-region count in the file listings not built.
  • 5.3 EN + NL strings added, browser catalogues rebuilt; nldesign theme check not done.

Not built

  • 2.1 openregister: detectImage/redactImage exist on main; the SIGNATURE constant and supportsImages/supportsSignatures flags do not.
  • 3.1 Embedded-XObject extraction, scanned-PDF rasterising and burn verification: these wait on the seam burning PDFs (decision D2 keeps the burn in openregister).
  • 3.4 Burn before the outputFormat gate: openregister burns standalone images inside anonymizeDocument already; PDFs wait on the same seam task.
  • 4.1 Region overlays on the preview.
  • 5.1 / 5.5 live verification on Postgres and openspec validate (no openspec CLI here).

Tests

  • testARangeBeyondTheLastPageIsRefused on development: Tests: 1, Assertions: 0, Errors: 1. (the class does not exist); passes here.
  • New: ScopeRedactionServiceTest, ScopeDecisionStoreTest, ImageSeamGatewayTest (seam doubled from openregister main's signatures), DocumentPageCounterTest, ImageRedactionServiceTest, AnonymizationServiceImageLegTest, AnonymizationLinkImageRedactionTest, ScopeRedactionControllerTest, PublicationReadinessTest::testAWithheldDocumentIsNotForPublication, PublicationStoreTest additions; jest imageRedaction.spec.js (13).
  • PHPUnit before 7288 tests / 0 failures; after 7350 / 0 failures. Jest 622 passed; vitest 857 passed (extract goldens gain imageWarning: null).
  • Hydra gates with --base origin/development: sig floor met; 8 failures remain, all in files this PR does not touch (composer-audit, no-admin-idor, spec-anchor-existence, controller-exception-translation, relation-dialect, orphaned-write-capability, icon-vocabulary, cross-app-schema-slug).

Generated by Claude Code

Scope decisions: a page, a page range or a whole document redacted in
one action. ScopeRedactionService validates a decision (pages within the
document, a range that does not run backwards, at least one ground),
stores it on the document's review, and commits it: pages as full-page
regions on OpenRegister's image seam, a whole document withheld with no
output. Publication readiness lists a withheld document as not for
publication. Register 8.72.0: additive anonymizationLink and
documentReview fields.

Assisted-by: ClaudeCode:claude-opus-5-5
Fail-flagged image leg (task 3.3): extract flags an image-bearing file
the seam could not look at (imageDetectionSkipped with the reason) and
attaches found regions to their entity rows as origin image with boxes;
an anonymise that did not burn image content carries
imageRedactionPending, and burnedRegionCount counts only regions the
seam burned, on the result and on the link.

Assisted-by: ClaudeCode:claude-opus-5-5
Workbench: one action redacts a page, a range of pages or the whole
document (ScopeRedactionDialog under src/dialogs, grounds through the
same picker as the entity review), and each decision shows as a row.
SIGNATURE joins the entity types; the review warns when images were not
checked, when no signature detector ran, and when an anonymised copy
still has unredacted images. EN and NL strings; browser catalogues
rebuilt.

Assisted-by: ClaudeCode:claude-opus-5-5
Playwright spec tests/e2e/spec-coverage/image-redaction.spec.ts for the
@e2e scenarios (scope dialog, refusals, a sessionless caller, the image
warnings, the burn), docs/features/image-redaction.md, and the scanned
Demostad sample letter with a printed BSN and a signature block.

Assisted-by: ClaudeCode:claude-opus-5-5
The controller talks only to ScopeRedactionService, which now reads the
state and counts pages itself; the refusal lives beside it. Register
property descriptions, app version raised for the register change,
@SPEC tags on the new frontend methods.

Assisted-by: ClaudeCode:claude-opus-5-5
Task 3.2: the image seam runs before the entity read-back, so the
regions it stores take the same proposals, policy matches and risk as a
text finding; found regions are attached to those rows as origin image
with boxes.

Assisted-by: ClaudeCode:claude-opus-5-5
Register v8.73.0 keeps both lines' schemas; app version bumped past both.

Assisted-by: ClaudeCode:claude-opus-5-5
Task 4.1: the review workbench draws the image-origin entity rows as
region overlays on the PDF preview pages. The overlays come from the same
entity rows as the table (regionOverlays), so a rejected row shows as a
region kept visible and every other row as a region to be redacted; a box
that cannot be placed is left out and the row stays in the table.

Assisted-by: ClaudeCode:claude-opus-5-5

Copy link
Copy Markdown
Contributor Author

Continuation pushed (9ef3990): task 4.1 is built. The review workbench now draws the image-origin entity rows as region overlays on the PDF preview pages. The overlays come from the same entity rows as the table, so a rejected row shows as a region kept visible and every other row as a region to be redacted. A box that cannot be placed is left out, and its row stays in the table. Tests: regionOverlays/regionLabel, applyRegionOverlays, the store setter, and the PdfViewer region layer. Jest went from 628 to 640 tests and vitest from 866 to 867, all passing. Still left: 3.1/3.4 and the burned-region count in listings wait on the OpenRegister seam's raster and PDF burn.


Generated by Claude Code

…ip ci]

Restores the unit complexity rating the merge gate holds (4.51 to 4.52);
no behaviour change, unit suite and vitest green.

Assisted-by: ClaudeCode:claude-opus-5-5

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant