platform.extension.runs.sweep
Close app invocations left running by a kernel process that died mid-run: any whose last movement is older than the deadline is marked failed with an “abandoned” outcome, which also releases the one-live-background-run interlock they were holding. Idempotent and safe to run concurrently.
- Scope:
platform.extension.write - System: yes
- Reachable from: no request — the CONTROL face does not mount this command. It closes app invocations a dead kernel left
running, and its deadline comes FROM THE CALLER (older_than_ms, deliberately unclamped so a test and an operator mid-incident can both name a small one). Unclamped on a wire it is a fleet-wide kill switch: one request with a low enough number marks every in-flight invocation of every tenant failed. The kernel drives it in-process, from its own maintenance loop, through a dispatch narrowed to this one name (onlySweepOrphanRuns). - Events: none — It closes rows in forge_control’s own invocation ledger, which every reader of it queries directly (read.extension_health, read.extension_runs); nothing a shopper can load renders a run, so no cached page moves. Fanning an event per swept row into each tenant’s outbox would put a burst of platform bookkeeping on the shoppers’ invalidation channel for a fact no page reads.
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "limit": { "default": 200, "exclusiveMinimum": 0, "maximum": 1000, "type": "integer" }, "older_than_ms": { "exclusiveMinimum": 0, "maximum": 9007199254740991, "type": "integer" } }, "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "older_than_ms": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "runs": { "items": { "additionalProperties": false, "properties": { "background": { "type": "boolean" }, "extension_id": { "type": "string" }, "idle_ms": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" }, "job_name": { "type": "string" }, "run_id": { "type": "string" }, "tenant_id": { "type": "string" } }, "required": [ "run_id", "extension_id", "tenant_id", "job_name", "background", "idle_ms" ], "type": "object" }, "type": "array" }, "swept": { "maximum": 9007199254740991, "minimum": -9007199254740991, "type": "integer" } }, "required": [ "older_than_ms", "swept", "runs" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)