Adaptive Cadence ExecModule
Overview
AdaptiveCadenceModule is a deterministic, local control module that selects the next review interval for an operating workflow. Version 2.0 declares all six signal collections it reads, bounds each collection to 1,000 items, validates event urgency, and emits a content-free receipt explaining the selected interval.
The module does not sleep, schedule a job, dispatch an agent, approve an action, or mutate a business object. A downstream scheduler or workflow controller must apply cycleIntervalSeconds according to its own authorization and lifecycle rules.
Usage
- Assemble the current accepted events, approval state, stale references, plan blockers, and agent health projections.
- Pass those arrays to Adaptive Cadence after the operating-loop reconciliation step.
- Use
cycleIntervalSecondsto propose or configure the next review time. - Persist or inspect
cadenceReceiptwhen cadence decisions require an audit trail.
High urgency and stale context take precedence over approval and health signals. An empty accepted-event list is treated as an idle loop only after the other governance signals are clear.
Inputs
All inputs are optional and default to an empty array. When supplied, every field must be a JSON array with at most 1,000 items.
| Input | Item shape | Description | Validation |
|---|---|---|---|
acceptedEvents | object | Accepted operating events used to calculate maximum urgency. | Each optional urgency is an integer from 0 through 10. |
pendingApprovals | any JSON value | Outstanding approvals. | The item count contributes to blockedApprovals. |
approvalRequests | any JSON value | New governed approval requests. | The item count contributes to blockedApprovals. |
stalePointerRefs | any JSON value | Canonical references whose context is stale. | Any item selects the minimum interval. |
planQualityBlockers | any JSON value | Plan-quality blocker identifiers. | Any item selects the minimum interval. |
agents | object | Agent health projections. | Only case-insensitive healthy and online statuses avoid the unhealthy count. |
Malformed arrays, non-object event or agent entries, oversized collections, fractional urgency, and urgency outside 0–10 fail closed. The module clears prior output before validation, so a failed rerun cannot reuse an earlier cadence.
Outputs
| Output | Type | Description |
|---|---|---|
cycleIntervalSeconds | integer | Selected interval: 900, 1,800, 3,600, or 14,400 seconds. The hard policy bounds are 900 and 86,400 seconds. |
cadenceReceipt | object | Policy version, selected interval, bounds, maximum urgency, and counts for blocked approvals, stale signals, and unhealthy agents. |
The receipt contains counts and policy values only. It does not copy event content, approval payloads, reference values, or agent records.
IntegrationAccount Requirements
No IntegrationAccount is required or read. Adaptive Cadence performs no network request, credential lookup, persistence, external delivery, or provider operation.
Any downstream scheduling, notification, or dispatch module remains responsible for its own IntegrationAccount, authorization, idempotency, and provider limits.
Configuration
The module has no configuration fields. Its policy constants are versioned in code so Workflow Studio metadata, tests, receipts, and documentation describe the same deterministic behavior.
Operations
The module evaluates signals in this order:
- Select 900 seconds (15 minutes) when maximum urgency is at least 8 or any stale pointer or plan blocker exists.
- Otherwise select 1,800 seconds (30 minutes) when any approval is blocked/requested or any agent is neither healthy nor online.
- Otherwise select 14,400 seconds (4 hours) when there are no accepted events.
- Otherwise select the 3,600-second (1 hour) default.
- Apply the hard 900–86,400-second bounds and emit
adaptive-operating-cadence/v2receipt data.
For identical inputs, repeated execution produces identical outputs and has no side effects.
Errors and Failure Modes
| Failure | Cause | Retryable | Recovery |
|---|---|---|---|
<field> must be an array | A supplied signal field is not a collection. | No | Normalize the workflow-state value to a JSON array. |
<field> exceeds the 1,000-item limit | A supplied collection is too large. | No | Aggregate or page upstream signals before cadence evaluation. |
<field> entries must be objects | acceptedEvents or agents contains a non-object item. | No | Supply object projections for every event or agent item. |
acceptedEvents urgency must be an integer from 0 through 10 | Urgency is fractional, non-numeric, or outside the supported range. | No | Normalize urgency before retrying. |
Errors do not include rejected values. No automatic retry is necessary because all failures are deterministic input-contract violations.
Example
Input workflow state:
{
"acceptedEvents": [
{
"eventRef": "event:incident-42",
"urgency": 9
}
],
"pendingApprovals": [],
"approvalRequests": [],
"stalePointerRefs": [],
"planQualityBlockers": [],
"agents": [
{
"agentRef": "agent:valor",
"status": "healthy"
}
]
}
Expected result:
{
"cycleIntervalSeconds": 900,
"cadenceReceipt": {
"policyVersion": "adaptive-operating-cadence/v2",
"intervalSeconds": 900,
"minimumSeconds": 900,
"maximumSeconds": 86400,
"maximumUrgency": 9,
"blockedApprovals": 0,
"staleSignals": 0,
"unhealthyAgents": 0
}
}
The output recommends a 15-minute review because urgency 9 meets the high-urgency threshold. It does not prove that a scheduler applied the interval.
Notes
- Pagination: the module does not page; each input collection is limited to 1,000 items. Aggregate or page records upstream.
- Limits: the selected policy values are 900, 1,800, 3,600, and 14,400 seconds, inside hard bounds of 900–86,400 seconds.
- Idempotency: natural and deterministic for identical input; no idempotency key is required.
- Rate limits: none; no external service is called.
- API constraints: urgency accepts integers from 0 through 10, including numeric strings such as
"8". - Destructive behavior: none. The module does not schedule, dispatch, approve, persist, or delete anything.
- Observability: execution emits a generic completion event without logging input content.
- Runtime boundary: a downstream authorized controller must apply the recommendation; module execution alone does not change a schedule.