Specification · RFC
RFC-0009: Runtime Time-Bound Semantics
Version: 0.4.0 | Status: normative | Phase: stable Owners: @Zihua Wu
1. Summary
Section titled “1. Summary”[RFC-0009:C-SUMMARY] Summary (Informative)
Section titled “[RFC-0009:C-SUMMARY] Summary (Informative) ”This RFC defines one time-bound model for InferLab runtime operations: an operator or resolved policy supplies a duration, one owning operation establishes one elapsed-time budget, nested attempts consume its remaining time, and lifecycle cleanup begins only after the operation has reached a terminal outcome.
Scope: The model applies to finite and deliberately unbounded runtime waits, including server readiness, integration and image probes, profiler control, Eval and Bench cases, external measurement clients, and cleanup verification. It distinguishes operation budgets from per-attempt caps, cleanup grace, polling cadence, progress reporting, and transport liveness. It does not require arbitrary wall-clock limits for installation, builds, capture-armed readiness, or another workflow whose governing contract deliberately leaves it unbounded. It does not introduce a general workflow language or operation graph. It also distinguishes waits for an environment to finish an action InferLab already requested — a process exiting, a container disappearing, device memory freeing — whose valid duration no operator or product value can predict, and judges them by observed progress rather than by elapsed time. —
Rationale: Existing paths reuse duration values at multiple nested enforcement points. A duration can consequently mean an end-to-end budget in one layer, a single network-attempt cap in another, and a process timeout in a third. Naming one authority and requiring nested work to consume remaining time prevents those layers from extending, racing, or preempting the operator-visible bound.
Since: v0.1.0
2. Specification
Section titled “2. Specification”[RFC-0009:C-OPERATION-BUDGETS] Operation Budgets And Deadlines (Normative)
Section titled “[RFC-0009:C-OPERATION-BUDGETS] Operation Budgets And Deadlines (Normative) ”Every configured runtime timeout MUST identify the concrete operation whose elapsed time it bounds and the event at which that budget begins.
A finite runtime operation MUST have exactly one control-plane authority that establishes its deadline from the frozen resolved duration when the operation reaches its declared start event.
The owning authority MUST classify the operation as timed out when that deadline expires before another terminal outcome is accepted.
A nested step MUST consume the owning operation’s remaining budget and MUST NOT establish a fresh copy of the original duration.
A bounded single attempt, including a connection, request, probe, child-process wait, or external-tool guard, MUST use no more than the lesser of its own attempt cap and the owning operation’s remaining budget.
A subordinate attempt MAY fail before the owning operation’s deadline when its effective attempt bound expires. That attempt failure MUST NOT by itself classify the owning operation as timed out; the owning authority decides whether the operation retries, fails for that attempt error, or continues through another supported path.
A downstream native timeout or startup guard MUST NOT classify the owning InferLab operation as timed out and MUST NOT extend its deadline.
An operation governed as unbounded MUST remain terminable by every non-time terminal condition required by its owning workflow, including process exit and operator interruption where they apply.
Polling cadence, retry backoff, progress-report timing, and transport keepalive MUST NOT be treated or recorded as operation budgets.
An operation that is intentionally unbounded MUST NOT acquire an arbitrary finite deadline solely because it invokes an external command.
Rationale: One deadline is the authority for one operation, while attempt caps keep individual I/O or tool calls responsive inside that authority. An attempt cap may produce an earlier, accurately classified attempt failure without becoming a second operation-timeout authority. Explicit unbounded operation semantics preserve workflows such as instrumented startup and package installation where an invented wall-clock limit would convert legitimate progress into false failure.
Since: v0.1.0
[RFC-0009:C-MEASUREMENT-CASE-BUDGETS] Measurement Case Budgets (Normative)
Section titled “[RFC-0009:C-MEASUREMENT-CASE-BUDGETS] Measurement Case Budgets (Normative) ”For an Eval or Bench definition, timeout_seconds MUST be the end-to-end elapsed-time budget of each individual measurement case.
A measurement-case budget MUST begin immediately before the first case-owned action is permitted after admission and non-effectful preflight. The first action is prefix-cache reset when a Bench case requests it; otherwise it is the built-in endpoint request or release of the external measurement client to begin tokenizer loading, endpoint probing, or native-engine execution.
A requested prefix-cache reset MUST use the measurement case owner’s remaining budget as its complete HTTP request deadline and MUST NOT acquire a shorter fixed request or connection cap.
The same measurement-case budget MUST cover every later case-owned probe, request, native-engine execution, and result publication needed for the InferLab control plane to accept a successful or failed business result.
All trials requested by one repeated Eval definition MUST remain one measurement case under that single budget. Task and tokenizer preparation, endpoint probes when applicable, every released trial request, incremental result evidence, aggregate pass-rate calculation, and gate adjudication MUST consume that budget. A repeated Eval MUST NOT create a fresh operation deadline for each trial.
An Eval or Bench runtime MUST NOT grant the tokenizer, endpoint probe, native engine, individual model request, or result wrapper a fresh copy of the case duration.
The InferLab control plane MUST remain the authority that accepts a client result or classifies timeout, interruption, process failure, and cleanup outcome for an external measurement case under RFC-0003:C-RUNTIME-WORKFLOWS and RFC-0006:C-INTEGRATIONS.
A measurement runtime MAY use the remaining case budget to bound a native operation so that it can publish more specific evidence before the control-plane deadline. That native bound MUST NOT extend the case deadline or replace the control plane’s terminal authority.
A measurement case’s business result MUST become terminal when the control plane accepts its result or classifies its failure, timeout, or interruption. Attached profiler stop, collection finalization, and report-coverage verification MUST occur after that case terminal point and MUST NOT consume the measurement-case budget.
Attached profiling MAY independently cause the overall profiled measurement or capture record to fail under RFC-0004:C-WORKLOAD-PROFILING. That later profiling outcome MUST preserve the case business result and MUST NOT reclassify the case as timed out.
Manual and closed-loop execution MUST use the same measurement-case budget start, consumption, timeout, and cleanup semantics for the same effective definition under RFC-0004:C-MEASUREMENTS.
Rationale: Eval and Bench definitions expose one operator timeout, so the observable case must have one budget. Treating that value as both a whole-case duration and a fresh per-request or per-process duration makes sequential probes exceed it and causes nested supervisors to race over the terminal result. Profiling observes the case but has its own finalization and report authority, so its post-case lifecycle can fail the containing profiled workflow without rewriting the case’s time-bound outcome.
Since: v0.1.0
[RFC-0009:C-CLEANUP-GRACE] Cleanup Grace And Terminal Evidence (Normative)
Section titled “[RFC-0009:C-CLEANUP-GRACE] Cleanup Grace And Terminal Evidence (Normative) ”An operation’s cleanup MUST begin only after that operation has reached success, failure, timeout, interruption, or cancellation.
Time spent terminating process groups, removing containers, stopping profiler sessions, reaping children, or verifying absence MUST NOT count toward an Eval or Bench measurement-case budget.
A cleanup stage that waits for the environment to complete a requested action MUST be a completion wait under RFC-0009:C-COMPLETION-WAITS. Any other cleanup stage that can block on an external process, daemon, or network operation MUST have its own explicitly named finite deadline so cleanup cannot hang indefinitely. Escalation from a termination request to a forced kill MUST follow a named product-owned grace whose expiry escalates and never by itself fails cleanup. An immediate cleanup action MUST NOT acquire an arbitrary delay solely to fit that model.
A cleanup grace MUST NOT extend the preceding operation deadline, defer its timeout classification, or convert its terminal outcome into success.
A cleanup failure MAY cause the containing workflow or record to fail when its governing lifecycle requires verified cleanup. That failure MUST preserve the preceding operation’s terminal cause rather than reclassifying it.
When a deadline-bounded cleanup stage invokes nested attempts, those attempts MUST consume that stage’s remaining deadline under RFC-0009:C-OPERATION-BUDGETS. Attempts within a completion wait follow RFC-0009:C-COMPLETION-WAITS.
Runtime evidence for a finite operation MUST preserve its configured budget, declared start boundary, elapsed time, and terminal cause.
Runtime evidence for a deliberately unbounded operation MUST preserve that it was unbounded and its non-time terminal cause.
When cleanup is attempted, evidence MUST separately preserve its trigger, elapsed time, configured grace or deadline where one applies, termination and removal actions, verification result, and failure context. For each completion wait, evidence MUST preserve the stall window, the attention ceiling, the attempt bound, the progress signals used and any that were unavailable or failed with the number of failed observations, the elapsed time at which progress was last observed, what remained unobserved when the wait ended, and whether it ended by observing the awaited state, by a stall, by the attention ceiling, or by operator interruption. —
Attempt evidence whose timeout affects diagnosis MUST distinguish its effective attempt bound from the owning operation budget.
Rationale: Cleanup is mandatory lifecycle work after the business outcome, not hidden capacity in that business operation. Recording the two intervals separately keeps operator expectations truthful while still bounding cleanup paths that can themselves wedge. A cleanup or profiling failure can truthfully fail the containing workflow without erasing the already-established business result or inventing a later timeout for it.
Since: v0.1.0
[RFC-0009:C-TIME-CONTROL-OWNERSHIP] Time-Control Ownership And Configuration (Normative)
Section titled “[RFC-0009:C-TIME-CONTROL-OWNERSHIP] Time-Control Ownership And Configuration (Normative) ”A finite duration imposed by InferLab that can cause a runtime operation to reach a terminal business failure before its configured owning budget expires MUST be either that owner’s remaining budget or a separately named effective policy resolved before the first external effect.
A nested connection, request, probe, child-process wait, or external-tool action whose failure immediately ends its owning operation MUST NOT receive an undeclared subordinate cap shorter than the owner’s remaining budget.
A retrying or deliberately unbounded operation MAY apply a finite per-attempt deadline to regain control for retry, process-exit detection, or operator interruption. Expiry of that attempt deadline MUST remain an attempt outcome and MUST NOT by itself make the unbounded operation terminal.
When a per-attempt deadline governs an operation whose valid latency varies with operator-selected placement or transport, the owning framework-neutral workflow MUST expose a typed effective setting, define a stable default, preserve the effective value in dry-run and records, and apply the same value across local, SSH, and container realizations.
Connection establishment, response headers, and response-body consumption within one HTTP action MUST consume one request-attempt deadline. InferLab MUST NOT impose a shorter undeclared phase cap that can reject the action before that request-attempt deadline.
Escalation graces, completion-wait stall windows, attention ceilings, notice delays, and attempt bounds, finite deadlines of non-completion cleanup stages, polling cadence, retry backoff, progress timing, and presentation refresh MAY remain product-owned fixed policy when they cannot replace the preceding business terminal decision. Effective cleanup durations and stall windows that affect verification MUST remain explicit in cleanup evidence under RFC-0009:C-CLEANUP-GRACE. —
InferLab MUST preserve an external tool as the authority for its operator-owned transport configuration unless the corresponding value is an explicit resolved InferLab fact. A product-owned noninteractive invocation mode MAY remain fixed without making connection or keepalive timing an InferLab timeout policy.
Rationale: A hidden cap is harmless only when it controls another chance or control-plane responsiveness; it becomes real product policy when it can permanently exclude an otherwise valid execution. Classifying by the observable decision keeps latency-sensitive values adjustable without exposing polling and cleanup mechanics as a universal timeout surface or duplicating configuration already owned by an external tool.
Since: v0.3.0
[RFC-0009:C-COMPLETION-WAITS] Environment Completion Waits (Normative)
Section titled “[RFC-0009:C-COMPLETION-WAITS] Environment Completion Waits (Normative) ”A completion wait is a wait for the environment to finish an action InferLab has already requested and cannot hasten: termination of a process group or a marked process after a forced kill, disappearance of a container after its removal was requested, and release of device memory after the processes holding it are gone. Escalation from a termination request to a forced kill, including a runtime’s own stop-then-kill grace, and the operation budgets of RFC-0009:C-OPERATION-BUDGETS, are not completion waits.
A completion wait MUST NOT be bounded by a deadline derived from how long the awaited action is expected to take. It MUST end at the first of: the awaited state is observed; operator interruption arrives; no progress has been observed for one stall window; or the attention ceiling elapses. The stall window and the attention ceiling MUST be product-owned fixed policy under RFC-0009:C-TIME-CONTROL-OWNERSHIP.
Progress MUST be judged only from observations attributable to the wait’s targets: release of resources the targets hold, a decrease in the targets’ remaining tasks, or work the targets’ remaining tasks perform. Any one such observation MUST count as progress. A task’s scheduler state MUST NOT count as progress, and a change in a host-wide or device-wide quantity that cannot be attributed to the targets MUST NOT count as progress.
Each action or observation attempt within a completion wait MUST have a finite attempt bound shorter than the stall window. A failed or expired attempt MUST count as no observed progress for that attempt and MUST NOT by itself end the wait.
An external tool’s own wait or give-up within a completion wait — such as a container runtime reporting that a killed container did not exit within its internal kill wait — MUST be treated as an attempt outcome and MUST NOT by itself end the wait.
A completion wait that ends without observing the awaited state MUST leave the cleanup unverified, MUST NOT report it as verified, and MUST keep it retryable through the owning lifecycle’s stop command. Later cleanup stages that do not depend on the awaited state MUST still run.
A completion wait that has not ended after a product-owned notice delay SHOULD report on diagnostics what it awaits and the progress last observed.
Rationale: The time a large server needs to exit after a forced kill grows with what it holds, so any deadline predicting it is a guess that a larger footprint eventually defeats, and an operator-tunable deadline only moves that guess to someone who cannot make it either. A stalled exit, by contrast, shows no attributable work at all. Judging stalls rather than duration separates the two without a size-dependent value, and an external tool’s internal patience is evidence about that tool, not about the environment. Work alone does not prove an exit is converging — a task can consume CPU indefinitely without finishing — so the attention ceiling keeps cleanup terminable; it bounds how long a workflow withholds control before recording a retryable unverified cleanup, not how long an exit takes. The attempt bound below the stall window keeps one slow observation from being mistaken for a stall, so the window need not track transport latency.
Since: v0.4.0