Skip to content

feat(events): ADR-041 delivery seam for sibling-app outbound deliveries - #1810

Merged
rubenvdlinde merged 2 commits into
developmentfrom
feature/absorb-dossiq-deliveries
Sep 2, 2026
Merged

feat(events): ADR-041 delivery seam for sibling-app outbound deliveries#1810
rubenvdlinde merged 2 commits into
developmentfrom
feature/absorb-dossiq-deliveries

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Summary

The receiving half of the fleet ruling case apps keep no delivery code: a typed-event seam (ADR-041) so a sibling app (dossiq first, PR pending on ConductionNL/dossiq) hands integriq an outbound delivery and gets an honest terminal answer back.

  • OCA\Integriq\Event\DeliveryRequestedEvent — provenance + payload + synchronous result slot (isHandled / getResultId / getMatchedSubscriptions; zero matches is reported honestly so the consumer fail-closes as unrouted).
  • DeliveryRequestedListener — ingests the request into the existing CloudEvents pipeline as nl.conduction.delivery.requested with a data.delivery provenance block; subscriptions route it to webhook / flow / synchronization / notificaties actions and inherit retry, backoff, dead-letter, replay and HMAC signing unchanged.
  • OCA\Integriq\Event\DeliveryConcludedEvent — dispatched from the event_message terminal transitions (delivered on success, abandoned when the retry budget is spent), gated to provenance-carrying messages only. Dispatch failures are logged and swallowed; the message record stays the source of truth.
  • EventService gains ingestDeliveryRequest() and a nullable IEventDispatcher ctor dep (same compatibility pattern as ExecutionTraceService).
  • No new engine and no calls into the wave-3 retirement targets — the seam rides the event pipeline; a flow can be the subscription's action.
  • Drive-by test fix: two EventServiceTest assertions read attempt keys that appendAttempt() deliberately omits (PHP undefined-key warnings on every run); they now assert the documented key-absent contract.

OpenSpec change: openspec/changes/absorb-dossiq-deliveries/ (proposal, design, tasks incl. staged phase-2 intake work with blockers, delivery-intake spec delta).

Train order

This PR merges first. The dossiq PR (dossiq-delivers-nothing) dispatches these events behind class_exists() guards and fails closed, so no ordering breakage either way — but the seam only functions once this contract exists.

Checks

  • phpcs / psalm / phpstan: clean (exit 0 each, run individually)
  • phpmd (per subdir, both rulesets): clean
  • PHPUnit unit suite: 2700 tests OK (8 new; the pre-existing documented IRequest deprecation remains)
  • hydra-gates v1.11.0 --scope-to-diff: 0 FAIL, 33/33 applicable gates ran
  • Mutation checks: breaking the provenance gate or the result-slot write reddens the suite

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/integriq @ 449ba98

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
build
build
check-specs
test-l10n
format
check-schema-l10n
check-l10n-js
composer ✅ 141/141
npm ✅ 537/537
app:check-code ⏭️
info.xml
REUSE
PHPUnit
Newman
Playwright ⏭️ deferred — runs on the promotion into beta/main, not on a pull request into development
Hydra gates

Quality workflow — 2026-09-02 11:38 UTC

Download the full PDF report from the workflow artifacts.

@rubenvdlinde
rubenvdlinde merged commit c11b2eb into development Sep 2, 2026
52 checks passed
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