## Worker Contract

```yaml
worker_contract:
  task_id: "2026-06-07-114724-c014"
  origin_thread: "THR-86 | Sermon Notes webhook scope fix — Claude execution brief | https://app.notion.com/p/378f8b3ef83d8140b83ce16930ed19bd"
  objective: |
    Determine the smallest correct fix for Notes/Sermon webhook coverage and return a decision-ready recommendation without mutating live router configuration or Notion content outside the thread log handled by Dorian.
  scope: |
    In scope: review the thread brief, inspect current local router scope and related recurrence-prevention behavior, evaluate whether Notes/Sermon parents should be added directly or handled through a different boundary, and produce a recommendation with exact files/IDs, risks, and verification steps.
    Out of scope: editing router.js, changing webhook subscriptions, restarting services, modifying sermon page content, changing Notion automation behavior, or sending user-facing messages.
  constraints:
    - Treat the approved plan as read-only analysis and recommendation only.
    - Base conclusions on current local evidence, especially router.js, router.log, and existing recurrence-prevention rules.
    - Do not make speculative architectural claims without tying them to observed router behavior.
    - Identify the exact Notes/Sermon parent IDs that would need scope inclusion if direct inclusion is the recommended fix.
    - Include any noise or recurrence risks introduced by expanding scope.
    - Return findings in the standard Completion Contract format only.
  permissions:
    filesystem: read
    network: local
    notion: none
    telegram: none
    shell: restricted
    git: none
  model_recommendation: "Claude Code 2.1.92 local CLI (default model)"
  rollback_required: false
  rollback_plan: ""
  output: |
    A Completion Contract that states the plain root cause, the recommended fix path, exact files and IDs affected, the smallest safe verification sequence, and any recurrence/noise risks or open decisions.
  done: |
    Done means the recommendation is specific enough for Dorian to log back to THR-86 and, if approved later, convert into an execution contract without further discovery.
systems_context:
  target_system: "Notion webhook event router"
  config_paths:
    - "/Users/openclaw/event-router/router.js"
    - "/Users/openclaw/event-router/router.log"
    - "/Users/openclaw/.openclaw/workspace/notion-webhook-reliability-prompt.md"
    - "/Users/openclaw/.openclaw/workspace/memory/2026-06-07.md"
```

## Completion Contract

Completion Contract
Task ID: 2026-06-07-114724-c014
Done: Completed the Claude Code read-only execution brief, wrote a dispatch receipt to THR-86, set the thread to `In Progress`, logged the completion findings back to the thread, and moved `Execution Status` to `Needs Review`.
Findings: Root cause is subscription-scope exclusion, not comment-handler failure. The recommended fix is to add `e3321af6-e9ea-4178-81c3-667c95bee536` and `1e1b912f0a6b4a4a8011c7bdbe2c992a` to `DEFAULT_SUBSCRIPTION_PARENT_IDS` in `/Users/openclaw/event-router/router.js`. `comment.created` already resolves page ancestry before scope evaluation, so no extra comment-specific handler is needed. Noise risk appears low, self-authored suppression already works, and Notes/Sermon events should not enter Threads DECISION routing because `isThreadsDbEvent()` remains pinned to Threads IDs only.
Decision needed: Review whether broader inclusion of resolved parent `1e1b912f0a6b4a4a8011c7bdbe2c992a` is desired beyond the direct Notes/Sermon data source.
Next step: If the recommendation is accepted, create an execution contract to patch `router.js`, run `node --check`, restart the router LaunchAgent, and verify a test Notes/Sermon comment passes `event_scope` as `in_subscription`.
