Skip to content

retrofit: reverse-spec notificatie-engine partial (5 REQs / 31 methods, 57 deferred)#1788

Open
rubenvdlinde wants to merge 1 commit into
developmentfrom
retrofit/rspec-notificatie-engine-2026-05-24
Open

retrofit: reverse-spec notificatie-engine partial (5 REQs / 31 methods, 57 deferred)#1788
rubenvdlinde wants to merge 1 commit into
developmentfrom
retrofit/rspec-notificatie-engine-2026-05-24

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

Reverse-engineers 5 net-new REQs from observed behaviour in the annotation-driven notification dispatcher and its supporting services. This is pass 1 of N for the 88-method notificatie-engine Bucket 2a cluster — 31 methods annotated, 57 deferred to follow-on passes.

Ghost change: openspec/changes/retrofit-2026-05-24-notificatie-engine/

New REQs

ID Capability area
REQ-101 Schema-annotation dispatcher pipeline (x-openregister-notifications → trigger match → broadcast / per-recipient fan-out)
REQ-102 Recipient resolution across 6 kinds (users / field / groups / relation / object-acl / expression) with userExists() fail-closed
REQ-103 Token-bucket rate limiter per (rule, recipient) with per-rule override + kill switch (notification_rate_limit_enabled)
REQ-104 Per-(rule, recipient) debounce coalescer with windowSeconds + maxEvents flush
REQ-105 Idempotency-key claim-first dedup using (notification_slug, idempotency_key) unique index as concurrency serialisation point

Annotated files (this pass)

  • lib/Service/Notification/AnnotationNotificationDispatcher.php — 16 methods
  • lib/Service/Notification/RateLimiter.php — 6 methods
  • lib/Service/Notification/NotificationCoalescer.php — 8 methods
  • lib/Listener/AnnotationNotificationListener.php — 3 methods
  • lib/Service/Notification/RecipientResolverInterface.php — 1 method

All edits are pure @spec PHPDoc tag additions; no code behaviour changed.

Deferred (57 methods, 10 follow-on REQs)

Sketched in tasks.md under future-pass:next.

Notes

  • notificatie-engine#ISO-8601 confirmed NOT a REQ — scenario-token only.
  • REQ-102 fail-closed userExists() gate is the OWASP A01 / CWE-863-adjacent guard against attacker-controlled object-data field values.
  • REQ-105 claim-before-send order eliminates the prior TOCTOU window.
  • openspec validate --strict passes.

Source: /tmp/or-scan/rspec-cluster-notificatie-engine.json (88 methods, 19 files)

…s, 57 deferred)

Reverse-engineers 5 net-new REQs from observed behaviour in the
annotation-driven notification dispatcher and its supporting services.
First pass of a multi-pass retrofit covering the 88-method cluster from
the notificatie-engine coverage scan.

New REQs (notificatie-engine#REQ-101..REQ-105):
- REQ-101: Schema-annotation pipeline orchestration (dispatch, matches,
  broadcast vs per-recipient fan-out)
- REQ-102: Recipient resolution across 6 kinds with userExists
  fail-closed against attacker-controlled object data
- REQ-103: Token-bucket rate limiter per (rule, recipient) with
  per-rule override, kill switch, fail-open semantics
- REQ-104: Per-(rule, recipient) debounce coalescer with windowSeconds
  + maxEvents flush trigger
- REQ-105: Idempotency-key claim-first dedup with unique-index
  serialisation under concurrency

Method coverage (31 methods this pass):
- AnnotationNotificationDispatcher (16 methods)
- RateLimiter (6 methods)
- NotificationCoalescer (8 methods)
- AnnotationNotificationListener (3 methods)
- RecipientResolverInterface (1 method)

Deferred to future passes (57 methods, 10 follow-on REQs sketched in
tasks.md future-pass:next): channel emit surfaces, locale/i18n
resolution, organisation pinning, subscription gating, annotation
validator + installer, scheduled/threshold/batch jobs, history query
API, VNG envelope, INotifier renderer side.

Confirmed: notificatie-engine#ISO-8601 is NOT a REQ — appears only as a
scenario-token referring to ISO 8601 timestamp format at lines 138 and
319 of the existing spec.
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/openregister @ 9fb9e4c

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

Quality workflow — 2026-05-24 19:17 UTC

Download the full PDF report from the workflow artifacts.

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