1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# integrations Module - Hooks Index
# Version: 2.0
#
# Module-level configuration for hooks (lifecycle behaviors).
# Hooks define: state machines, rules, permissions, triggers, computed fields.
module: integrations
version: 2
# Import all hook files.
imports:
# =============================================================================
# Module-level configuration
# =============================================================================
config:
audit:
retention_days: 365
archive_after_days: 90
critical_events:
notifications:
email_enabled: false
sms_enabled: false
push_enabled: false
# =============================================================================
# Shared domain events
# =============================================================================
events:
# =============================================================================
# Scheduled jobs
# =============================================================================
scheduled_jobs:
refresh_oauth_credentials:
schedule: "*/15 * * * *"
handler: refresh_oauth_credentials
# ADR-0020 posture vocabulary:
# posture: pull — interval-driven scan; the interval is the floor, the account's
# honest expires_at is the contract (request-path lazy refresh rides
# the same due-window computation).
# pickup_lock: true — the due-claim reads FOR UPDATE SKIP LOCKED (one account per short
# transaction, the lock held through processing), so concurrent
# replicas take disjoint accounts instead of double-refreshing.
# commit_policy: commit_per_batch — each account's refresh commits independently; one
# provider outage rolls back exactly its own account.
posture: pull
pickup_lock: true
commit_policy: commit_per_batch