Add hourly RecentlyOnScope activity definition
This commit is contained in:
85
activity-definitions/hourly-recently-on-scope.md
Normal file
85
activity-definitions/hourly-recently-on-scope.md
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
id: "d104348c-d792-4377-943c-70a31e81a9bc"
|
||||
name: "Hourly RecentlyOnScope Reports"
|
||||
type: activity-definition
|
||||
version: "1.0"
|
||||
enabled: false
|
||||
owner: custodian
|
||||
governance: custodian
|
||||
status: draft
|
||||
created: "2026-05-22"
|
||||
trigger:
|
||||
type: cron
|
||||
cron_expression: "0 * * * *"
|
||||
timezone: Europe/Berlin
|
||||
misfire_policy: skip
|
||||
context_sources:
|
||||
- type: state-hub
|
||||
query: recently_on_scope_hourly
|
||||
required: true
|
||||
params:
|
||||
range: "1h"
|
||||
active_only: true
|
||||
include_attention: false
|
||||
bind_to: context.recently_on_scope_hourly
|
||||
---
|
||||
|
||||
# ActivityDefinition: Hourly RecentlyOnScope Reports
|
||||
|
||||
## Purpose
|
||||
|
||||
This definition is the activity-core handoff point for
|
||||
`CUST-WP-0046 - Activity-Core Hourly RecentlyOnScope Reports`.
|
||||
|
||||
It schedules a deterministic State Hub batch run that generates
|
||||
RecentlyOnScope reports for every active domain with qualifying activity in the
|
||||
last hour. State Hub owns active-domain selection and report rendering;
|
||||
activity-core owns the hourly schedule and ActivityRun audit trail.
|
||||
|
||||
## Runner Status
|
||||
|
||||
This definition is intentionally `enabled: false` until the manual canary
|
||||
passes.
|
||||
|
||||
Cutover boundary:
|
||||
|
||||
- Codex app automation remains a fallback until `CUST-WP-0046-T06`.
|
||||
- This activity-core definition becomes the primary hourly reporting substrate
|
||||
only after one manual run and one scheduled run leave expected evidence.
|
||||
- Do not run a Codex fallback and this activity-core hourly routine as parallel
|
||||
primary runners.
|
||||
|
||||
## Trigger
|
||||
|
||||
Hourly at minute 0 in `Europe/Berlin`, with `misfire_policy: skip`.
|
||||
|
||||
If the activity-core host is offline at the top of the hour, this routine
|
||||
skips the missed run rather than replaying a burst of stale reports after the
|
||||
host returns.
|
||||
|
||||
## Deterministic State Hub Invocation
|
||||
|
||||
The `recently_on_scope_hourly` State Hub context resolver issues:
|
||||
|
||||
- `POST /recently-on-scope/hourly`
|
||||
- payload: `{"range": "1h", "active_only": true, "include_attention": false}`
|
||||
|
||||
The context source is marked `required: true`. A failed State Hub call fails
|
||||
the activity-core workflow visibly instead of silently binding an empty
|
||||
context. On success, the response is stored in the ActivityRun
|
||||
`context_snapshot` under `recently_on_scope_hourly`.
|
||||
|
||||
State Hub also records a compact progress event with event type
|
||||
`recently_on_scope_hourly`, including generated, skipped, and failed domain
|
||||
metadata.
|
||||
|
||||
## Output Contract
|
||||
|
||||
The run should produce:
|
||||
|
||||
- one State Hub progress event with `event_type: recently_on_scope_hourly`
|
||||
- one report file per active domain with qualifying activity
|
||||
- no report for inactive or quiet domains unless State Hub is explicitly
|
||||
configured otherwise
|
||||
- one activity-core ActivityRun containing the batch response metadata
|
||||
- no LLM call and no direct workplan or canon edits
|
||||
Reference in New Issue
Block a user