Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

Specs: anonymiser-backend-selection (#1497)#1498

Merged
rubenvdlinde merged 1 commit into
documentationfrom
feat/1497/anonymiser-backend-selection
May 27, 2026
Merged

Specs: anonymiser-backend-selection (#1497)#1498
rubenvdlinde merged 1 commit into
documentationfrom
feat/1497/anonymiser-backend-selection

Conversation

@rjzondervan

Copy link
Copy Markdown
Member

Summary

Adds the OpenSpec change directory for anonymiser-backend-selection — a new OpenRegister capability covering:

  • Typed state-query API. AnonymisationBackendService::getState() + admin-only OCS endpoint GET /api/admin/anonymisation/backend-state returning a BackendState value object with activeMethod, effectiveMethod, and per-backend {available, configured, lastProbedAt, latencyMs} flags.
  • Admin selector UI. An "Anonimiseren" section within the existing OpenRegisterAdmin settings page — method picker, per-backend endpoint configuration, live availability indicators (AppAPI-derived for ExApps), per-backend Test connection button.
  • Canonical "no backend" determination rule. effectiveMethod resolves to regex when recognition is disabled OR the active backend is not available && configured. Single source of truth in the service; consumers MUST NOT recompute.

Probe results cached 60s (configurable, 10–600s). ExApp availability derived from AppAPI / IAppManager with a documented appapi_missing fallback. Storage shape inside the fileManagement IAppConfig blob is implementation-internal — consumers go through the service, not the blob.

Specs only — no implementation in this PR.

Refs: #1497
Pair: ConductionNL/docudesk#135 — DocuDesk's anonymiser-backend-warning is the consumer; it cites this capability as a Hard cross-app dependency.

Out of scope

  • Backend abstraction (BackendInterface + per-method handlers) — not needed for state query + UI.
  • Multi-tier fallback ("if openanonymiser unavailable, try presidio") — current rule is binary: active OR regex.
  • Migrating fileManagement IAppConfig blob to normalised storage — separate change if needed.

Test plan

  • Review proposal.md, design.md, tasks.md, and the anonymiser-backend-selection/spec.md delta
  • Confirm the BackendState shape matches DocuDesk's consumer expectation in PR check isset items type #135's anonymiser-backend-warning
  • Confirm the precedence rule for effectiveMethod (D3 in design.md) is acceptable, including the hybrid AND-aggregation behaviour
  • Confirm the AppAPI-derived ExApp availability path (D5) + appapi_missing fallback handling
  • openspec validate (when the implementation PR lands)

@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 8e1ae94

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 153/153
npm ✅ 598/598
PHPUnit
Newman ⏭️
Playwright ⏭️

Quality workflow — 2026-05-12 09:52 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde rubenvdlinde force-pushed the feat/1497/anonymiser-backend-selection branch from 8f1a110 to 2a87303 Compare May 18, 2026 17:26
@rubenvdlinde

Copy link
Copy Markdown
Contributor

Rebased on top of latest development (tip 95aed02c5) to pick up:

Clean rebase, no conflicts. Force-pushed with lease.

@rubenvdlinde rubenvdlinde force-pushed the feat/1497/anonymiser-backend-selection branch from 2a87303 to 2860bac Compare May 18, 2026 18:37
Author the OpenSpec change directory for anonymiser-backend-selection —
a new OpenRegister capability covering:

- Typed state-query API (AnonymisationBackendService::getState() + an
  admin-only OCS endpoint GET /api/admin/anonymisation/backend-state)
  returning a BackendState value object with activeMethod,
  effectiveMethod, and per-backend {available, configured} flags.
- Admin selector UI: an 'Anonimiseren' section within the existing
  OpenRegisterAdmin settings page, with a method picker, per-backend
  endpoint configuration, live availability indicators, and a per-
  backend Test connection probe.
- Canonical 'no backend' determination rule: effectiveMethod resolves
  to regex when recognition is disabled OR the active backend is not
  available + configured. Single source of truth lives in the service.

Probe results are cached for 60s (configurable). ExApp availability is
derived from AppAPI / IAppManager with a documented 'appapi_missing'
fallback. Storage shape inside the fileManagement IAppConfig blob is
treated as implementation-internal — consumers MUST go through the
service.

Specs only — no implementation. Unblocks DocuDesk's
anonymiser-backend-warning (PR #135, hard cross-app dep).

Refs: #1497
Pair: ConductionNL/docudesk#135 (consumer)
@rubenvdlinde rubenvdlinde force-pushed the feat/1497/anonymiser-backend-selection branch from 2860bac to caddcfc Compare May 18, 2026 19:32
Base automatically changed from development to documentation May 18, 2026 20:38
@rubenvdlinde rubenvdlinde merged commit 40f816a into documentation May 27, 2026
22 checks passed
@rubenvdlinde rubenvdlinde deleted the feat/1497/anonymiser-backend-selection branch May 27, 2026 13:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants