Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs(control-api): correct Forbid worker and CRD wording

Jose Ramirez51be5efc409a
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index e202849e8..df3391491 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.739",
+ "version": "0.1.740",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.739",
+ "version": "0.1.740",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index 38771b118..f03e556c0 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.739",
+ "version": "0.1.740",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/src/services/workflowScheduleWorkerService.ts b/control-api/src/services/workflowScheduleWorkerService.ts
index e930261f6..94a73672e 100644
--- a/control-api/src/services/workflowScheduleWorkerService.ts
+++ b/control-api/src/services/workflowScheduleWorkerService.ts
@@ -135,8 +135,9 @@ interface ActiveRecipeRun {
* never duplicated. `expectedFireAt` is the next_fire_at this replica wrote
* with its last skip; if the row arrives with any other slot (another replica
* fired or skipped it, or the batch rolled back) the streak restarts at 1.
- * Entries are deleted when the schedule fires, so the map is bounded by the
- * number of schedules that are currently being skipped.
+ * Only a fire deletes an entry; a schedule skipped and then deleted, disabled
+ * or actor-gated keeps its entry until restart. The map is therefore bounded
+ * by the number of schedules.
*/
const forbiddenSkipStreaks = new Map<string, { count: number; expectedFireAt: string }>()
@@ -313,9 +314,12 @@ export async function processMaturedSchedules(
* the SELECT, defeating the concurrency guard). `fireOneSchedule` surfaces
* malformed cron expressions and insert errors as
* `{fired:false, reason:'invalid_cron'|'error'}`, so committing at the end is
- * safe. The one exception is the concurrency-policy active-run lookup: its
- * error propagates so the whole batch rolls back and no run is ever created
- * without the check. A catastrophic DB error (lost connection, deadlock on
+ * safe. Exceptions: the concurrency-policy active-run lookup and the Forbid
+ * skip's own `UPDATE workflow_schedules` propagate their errors, so the batch
+ * rolls back and no run is created without the check. A DB-level `createRun`
+ * failure aborts the transaction (the final COMMIT becomes a ROLLBACK), and
+ * the next Forbid lookup in the batch throws "current transaction is aborted",
+ * so the sweep surfaces as an error. A catastrophic DB error (lost connection, deadlock on
* COMMIT) also triggers a best-effort ROLLBACK before re-raising.
*/
async function fireOneBatch(client: DbClient, batchSize: number): Promise<ScheduleFireResult[]> {
diff --git a/docs/crds/workflowrecipe.md b/docs/crds/workflowrecipe.md
index def649df5..28c7737fc 100644
--- a/docs/crds/workflowrecipe.md
+++ b/docs/crds/workflowrecipe.md
@@ -1183,11 +1183,11 @@ spec:
**`concurrencyPolicy`** (and `spec.scheduling.concurrencyPolicy` on the legacy path, §3.14) applies to scheduled ticks only; on-demand and autonomous triggers are never gated by it.
-- `Forbid` (default): a tick is skipped while a run of the recipe is still live, whatever started it. Live means `Pending` for less than 15 minutes, or `Running` for less than `maxRunDurationSeconds` (capped at 24 hours, the controller maximum, and assumed when unset) plus a 5-minute grace. The schedule advances to its next future window; skipped windows are not replayed.
+- `Forbid` (default): a tick is skipped while a run of the recipe is still live, whatever started it. Live means `Pending` for less than 15 minutes, or `Running` for less than `maxRunDurationSeconds` plus a 5-minute grace. The schedule worker caps that duration at 24 hours (the controller maximum) and assumes 24 hours when it is unset; the WRC's own default run duration is 1 hour, so this is only the blocking bound, not how long a child runs. The schedule advances to its next future window; skipped windows are not replayed.
- `Allow`: every tick fires, and runs may overlap.
- `Replace`: accepted but **not implemented**. It currently behaves exactly like `Allow`.
-A run that never reaches a terminal phase stops blocking once it passes that bound, so a stuck run cannot silence a schedule forever. After the bound, one new scheduled run may overlap the stuck one. Set `spec.runRetention.maxRunDurationSeconds` so a stuck run is failed (and the schedule resumes) sooner than the 24-hour default. Every skip is logged as `workflow_schedule_worker_concurrency_forbidden` with the blocking run id and age. Six consecutive skips of one schedule also log `workflow_schedule_worker_concurrency_forbidden_sustained` (warn) and increment `wrc_schedule_worker_concurrency_forbidden_sustained_total`.
+A run that never reaches a terminal phase stops blocking once it passes that bound, so a stuck run cannot silence a schedule forever. After the bound, one new scheduled run may overlap the stuck one. Set `spec.runRetention.maxRunDurationSeconds` so a stuck run is failed (and the schedule resumes) sooner than the 24 hours the worker assumes when it is unset. Every skip is logged as `workflow_schedule_worker_concurrency_forbidden` with the blocking run id and age. Six consecutive skips of one schedule also log `workflow_schedule_worker_concurrency_forbidden_sustained` (warn) and increment `wrc_schedule_worker_concurrency_forbidden_sustained_total`.
### 3.14 Scheduling (`spec.scheduling`) — legacy