Files
pl_mail/config/services_test.yaml
Paul LütznerandClaude Fable 5 8533993c4b feat(insights): user-facing configuration, straight off the registry
Settings → Insights lists whatever the extractor registry holds — name,
hint and an On/Off segment per extractor, so a new extractor appears here
by existing. Off is stored as the disabled set, so next release's extractor
starts working without anyone finding a new toggle. The endpoint validates
keys against the registry and carries the same CSRF discipline as its
neighbours; an extractor without catalogue lines falls back to its key
rather than printing a translation path. Handbook gains "The radar" in both
languages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-17 19:35:38 +02:00

56 lines
2.9 KiB
YAML

# Services that exist only while APP_ENV=test.
#
# Imported automatically by MicroKernelTrait (config/services_{env}.yaml) and by
# nothing else, so none of this is compiled into a dev or prod container. That
# is the whole reason the file exists rather than a guard inside a class in
# src/: a stub in the application tree ships, and a stub that ships is a stub
# somebody eventually reaches by accident.
#
# One entry, and it needs the paragraph. Subscribing to a remote calendar cannot
# be exercised from a browser without a driver a fixture can script — Playwright
# drives real HTTP, so the collaborators come from the real container, and the
# object-level FakeCalendarSyncDriver a service test hands in by hand is
# unreachable from there. See ScriptedCalendarSyncDriver for why pointing a spec
# at a real (or stubbed) CalDAV server was rejected instead.
#
# The priority is load-bearing. Drivers arrive as a tagged iterator and the
# first that claims a source wins; CalDavCalendarDriver claims every
# Provider::CalDav connection, so a stub tagged at the default 0 would be asked
# second and never answer. It claims only connections carrying its own settings
# key, so being asked first costs the real driver nothing.
services:
App\Tests\Support\Calendar\ScriptedCalendarSyncDriver:
tags:
- { name: 'app.calendar_sync_driver', priority: 100 }
# The same shape, for the same reason, one layer over. DataResetter and both
# push registries are `final readonly` and cannot be mocked — deliberately —
# so proving that a reset hands its registrations back BEFORE it truncates
# the credentials needed to do so means joining the tagged iterator that
# feeds them.
#
# Priority again load-bearing, and again safe: this claims only accounts
# whose address carries ScriptedPushManager::MARKER, so being asked first
# costs the real Gmail and Graph managers nothing. A stub that claimed every
# account would silently take over push for the entire suite.
App\Tests\Support\Push\ScriptedPushManager:
public: true
tags:
- { name: 'app.push_subscription_manager', priority: 100 }
# And the calendar half, for the removal paths that never revoked at all.
App\Tests\Support\Push\ScriptedCalendarPushManager:
public: true
tags:
- { name: 'app.calendar_push_manager', priority: 100 }
# One guaranteed insight extractor, so the settings page and the toggle
# endpoint can be tested against a registry that is never empty — the
# production catalogue is free to grow and shrink without those tests
# noticing. Inert by construction: its supports() never says yes. No
# priority override needed; it claims no mail, so its place in the order
# is cosmetic and it sorts itself last.
App\Tests\Support\Insight\ScriptedInsightExtractor:
tags:
- 'app.insight_extractor'