Skip to main content

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

  1. Assemble the current accepted events, approval state, stale references, plan blockers, and agent health projections.
  2. Pass those arrays to Adaptive Cadence after the operating-loop reconciliation step.
  3. Use cycleIntervalSeconds to propose or configure the next review time.
  4. Persist or inspect cadenceReceipt when 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.

InputItem shapeDescriptionValidation
acceptedEventsobjectAccepted operating events used to calculate maximum urgency.Each optional urgency is an integer from 0 through 10.
pendingApprovalsany JSON valueOutstanding approvals.The item count contributes to blockedApprovals.
approvalRequestsany JSON valueNew governed approval requests.The item count contributes to blockedApprovals.
stalePointerRefsany JSON valueCanonical references whose context is stale.Any item selects the minimum interval.
planQualityBlockersany JSON valuePlan-quality blocker identifiers.Any item selects the minimum interval.
agentsobjectAgent 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

OutputTypeDescription
cycleIntervalSecondsintegerSelected interval: 900, 1,800, 3,600, or 14,400 seconds. The hard policy bounds are 900 and 86,400 seconds.
cadenceReceiptobjectPolicy 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:

  1. Select 900 seconds (15 minutes) when maximum urgency is at least 8 or any stale pointer or plan blocker exists.
  2. Otherwise select 1,800 seconds (30 minutes) when any approval is blocked/requested or any agent is neither healthy nor online.
  3. Otherwise select 14,400 seconds (4 hours) when there are no accepted events.
  4. Otherwise select the 3,600-second (1 hour) default.
  5. Apply the hard 900–86,400-second bounds and emit adaptive-operating-cadence/v2 receipt data.

For identical inputs, repeated execution produces identical outputs and has no side effects.

Errors and Failure Modes

FailureCauseRetryableRecovery
<field> must be an arrayA supplied signal field is not a collection.NoNormalize the workflow-state value to a JSON array.
<field> exceeds the 1,000-item limitA supplied collection is too large.NoAggregate or page upstream signals before cadence evaluation.
<field> entries must be objectsacceptedEvents or agents contains a non-object item.NoSupply object projections for every event or agent item.
acceptedEvents urgency must be an integer from 0 through 10Urgency is fractional, non-numeric, or outside the supported range.NoNormalize 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.