Skip to content

runtime: the mutation deadline is logged but never enforced #317

Closed

Description

@allisonmahmood

packages/runtime/src/Runtime.ts computes deadlineMs for every mutation and integration call and passes it to the runtime log, but only integration calls are wrapped in Effect.timeoutOrElse; a mutation's runWithDeadline is the bare execute. So runtime_calls.deadline_ms is descriptive for mutations: a table or file mutation can still be running after its own log row reads as past deadline / unknown.

Low risk at tier 1 (mutations are single bounded statements), but the tier 2 map's transaction research (#310) leans on that deadline being real: a hosted mutation will hold a company-database transaction open for the invocation, and the fiber timeout is one of the three places the deadline must be enforced. Fix is small: apply the same timeoutOrElse to mutations, with PATCHY_RUNTIME_MUTATION_DEADLINE_MS as the value, and keep the log's deadline_ms equal to what is enforced.

Found while reviewing research for the tier 2 map (#294); filed by Claude Fable 5.1 via Claude Code.

Activity

  1. added
    area:server
    on Sep 19, 2026
  2. added a commit that references this issue on Sep 24, 2026
    13b39dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:server

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions