Add hourly RecentlyOnScope activity definition
This commit is contained in:
@@ -4,7 +4,7 @@ type: workplan
|
||||
title: "Activity-Core Hourly RecentlyOnScope Reports"
|
||||
domain: custodian
|
||||
repo: the-custodian
|
||||
status: ready
|
||||
status: active
|
||||
owner: codex
|
||||
topic_slug: custodian
|
||||
planning_priority: high
|
||||
@@ -105,7 +105,7 @@ Preferred path:
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T01
|
||||
status: todo
|
||||
status: in_progress
|
||||
priority: high
|
||||
state_hub_task_id: "99e16a50-9775-4520-b343-f52fda0b67ec"
|
||||
```
|
||||
@@ -130,7 +130,7 @@ paused/deleted.
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T02
|
||||
status: todo
|
||||
status: done
|
||||
priority: high
|
||||
depends_on: [CUST-WP-0046-T01]
|
||||
state_hub_task_id: "c5004c0b-a261-407c-9376-a33883e054bf"
|
||||
@@ -163,7 +163,7 @@ behavior, report idempotency, partial failures, and report metadata response.
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T03
|
||||
status: todo
|
||||
status: done
|
||||
priority: high
|
||||
depends_on: [CUST-WP-0046-T02]
|
||||
state_hub_task_id: "a33b379f-56ba-47d0-b73c-3e724b1c5d45"
|
||||
@@ -188,7 +188,7 @@ endpoint and record the result under test.
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T04
|
||||
status: todo
|
||||
status: in_progress
|
||||
priority: high
|
||||
depends_on: [CUST-WP-0046-T03]
|
||||
state_hub_task_id: "dcb20f5a-c446-48d6-b810-84de365c22fd"
|
||||
@@ -215,7 +215,7 @@ paused Temporal schedule while disabled.
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T05
|
||||
status: todo
|
||||
status: in_progress
|
||||
priority: high
|
||||
depends_on: [CUST-WP-0046-T04]
|
||||
state_hub_task_id: "f5c0cf64-a8e9-4d8c-bd86-ca58cbf132c2"
|
||||
@@ -245,10 +245,11 @@ Done when both manual and scheduled canaries leave complete evidence.
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T06
|
||||
status: todo
|
||||
status: blocked
|
||||
priority: high
|
||||
depends_on: [CUST-WP-0046-T05]
|
||||
state_hub_task_id: "2a46a6c8-4d3e-4064-a935-c90ca0c76a6d"
|
||||
blocking_reason: "Waiting for manual and scheduled activity-core canaries before retiring the Codex app fallback."
|
||||
```
|
||||
|
||||
Remove the Codex app automation fallback from the operating path.
|
||||
@@ -270,7 +271,7 @@ the owned activity-core schedule has verified evidence.
|
||||
|
||||
```task
|
||||
id: CUST-WP-0046-T07
|
||||
status: todo
|
||||
status: done
|
||||
priority: medium
|
||||
depends_on: [CUST-WP-0046-T05]
|
||||
state_hub_task_id: "01066ff8-f591-43f6-99e6-d2f61654e590"
|
||||
@@ -292,6 +293,64 @@ Runbook should include:
|
||||
Done when the operator can verify hourly report health from State Hub and
|
||||
activity-core telemetry alone.
|
||||
|
||||
## Implementation Evidence - 2026-05-22
|
||||
|
||||
Implemented pieces:
|
||||
|
||||
- State Hub now exposes `POST /recently-on-scope/hourly`.
|
||||
- State Hub batch generation reuses the existing RecentlyOnScope collector,
|
||||
renderer, report id, and report directory.
|
||||
- The batch endpoint selects domains by qualifying activity in the requested
|
||||
window: progress events, decisions, updated workstreams, or updated tasks.
|
||||
- Domains with only registered repositories are skipped; domains with open
|
||||
human-intervention items can be included by setting `include_attention: true`.
|
||||
- The batch endpoint records one `recently_on_scope_hourly` progress event with
|
||||
generated, skipped, and failed domain metadata.
|
||||
- activity-core has a reusable State Hub resolver query
|
||||
`recently_on_scope_hourly` that POSTs to the batch endpoint.
|
||||
- activity-core context sources can now be marked `required: true`; required
|
||||
resolver failures fail the workflow instead of silently binding `{}`.
|
||||
- Custodian now owns
|
||||
`activity-definitions/hourly-recently-on-scope.md`, disabled until canary.
|
||||
- Operator verification notes live in
|
||||
`docs/hourly-recently-on-scope-runbook.md`.
|
||||
|
||||
Verification:
|
||||
|
||||
- State Hub:
|
||||
`/home/worsch/.local/bin/uv run pytest tests/test_recently_on_scope.py`
|
||||
passed with 11 tests.
|
||||
- State Hub:
|
||||
`/home/worsch/.local/bin/uv run pytest tests/test_recently_on_scope.py tests/test_mcp_smoke.py::TestAddProgressEvent`
|
||||
passed with 14 tests.
|
||||
- activity-core:
|
||||
`/home/worsch/.local/bin/uv run pytest tests/test_state_hub_context_resolver.py tests/test_sync_activity_definitions.py tests/test_schedule_lifecycle.py`
|
||||
passed with 19 tests.
|
||||
- activity-core parser scan with
|
||||
`ACTIVITY_DEFINITION_DIRS=/home/worsch/the-custodian` found
|
||||
`Hourly RecentlyOnScope Reports`.
|
||||
|
||||
Local canary evidence:
|
||||
|
||||
- Direct State Hub batch canary generated reports for `custodian` and
|
||||
`markitect`, skipped 9 quiet active domains, and had no failed domains.
|
||||
Progress event: `ff1e845f-df02-476e-a3f3-fb912e4f32a8`.
|
||||
- Direct activity-core resolver canary invoked the same State Hub batch endpoint
|
||||
and generated reports for `custodian` and `markitect`, skipped 9 domains, and
|
||||
had no failed domains.
|
||||
Progress event: `1ff091c3-227c-4a85-b5e2-172ba45a2676`.
|
||||
|
||||
Remaining gates:
|
||||
|
||||
- T01 remains in progress until the deployed activity-core API/worker/Temporal
|
||||
schedule path is checked from the operator host.
|
||||
- T04 remains in progress until the definition is synced into the live
|
||||
activity-core DB and appears as a disabled/paused Temporal schedule.
|
||||
- T05 remains in progress until a real `RunActivityWorkflow` produces an
|
||||
ActivityRun and one scheduled hourly canary completes.
|
||||
- T06 is blocked until T05 passes; the Codex app fallback should not be paused
|
||||
or deleted before then.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- Hourly RecentlyOnScope reports are generated by activity-core, not Codex app
|
||||
|
||||
Reference in New Issue
Block a user