feat(reporting-governance): add profile artifact binding slice

This commit is contained in:
Eve
2026-05-08 10:07:26 +08:00
parent 000f6b6a8b
commit 6366f70491
15 changed files with 695 additions and 6 deletions

View File

@@ -0,0 +1,49 @@
# OpenClaw Watchdog Reference Runtime Composition
This file places the existing watchdog auto-notify chain inside the reporting-governance package skeleton as a **reference implementation**.
## Placement decision
The watchdog chain is **not** part of `src/core/`.
It is categorized under `src/reference/` and represented through package adapter boundaries in `src/adapters/`.
## Why
The chain is runtime-specific and deployment-shaped:
- it depends on OpenClaw execution patterns
- it depends on queue / spool / bridge / sender boundaries
- it reflects truthful delivery-state handling across runtime hops
Those are exactly the properties of a reference adapter composition, not runtime-agnostic governance core.
## Reference chain
```text
scripts/long_task_watchdog.mjs
-> scripts/operator_notify_dispatcher.mjs
-> scripts/operator_notify_bridge_supervisor.mjs
-> scripts/operator_notify_sender_binding.mjs
-> acked | blocked | pending_external_send
```
## Package mapping
- `src/adapters/watchdog-adapter.mjs` → watchdog trigger + canonical event seeding
- `src/adapters/dispatcher-adapter.mjs` → queue to spool handoff
- `src/adapters/bridge-adapter.mjs` → spool consumption + receipt writeback
- `src/adapters/sender-binding-adapter.mjs` → sender contract boundary
- `src/adapters/orchestrator-adapter.mjs` → deterministic composition entrypoint
## Runtime artifact classes
The current reference implementation still writes runtime artifacts in repo-level state directories such as:
- `state/long-task-watchdog/`
- `state/long-task-watchdog-events/`
- `state/operator-notify-queue/`
- `state/operator-notify-dispatch-spool/`
- `state/operator-notify-bridge-receipts/`
- `state/operator-notify-sender-attempts/`
Future package extraction should preserve these artifact classes through `src/storage/` contracts rather than raw script coupling.