Skip to content

waiting_until has no production writer — 89/89 runs report NULL while MCP promises 'until when' #591

Description

@serge-ivo

waiting_until can only ever be NULL, and the MCP description promises it

One writer: agent-loop-store.ts:272-273, binding wait?.until ?? null. Three production call sites, none passes until:

  • coding-session.ts:440null (a clear)
  • coding-session.ts:581{ reason: wait }
  • coding-session.ts:713{ reason: "platform_interrupt" }

Only run-liveness.test.ts:166 supplies one. This is the #570 pattern exactly: the helper is tested, the call sites are not, so the column reads as implemented while nothing populates it. Measured live: waitingUntil null on 89 of 89 runs, including one that parked ~6h51m by its own wall clock.

The instant exists and is thrown away

coding-wait.ts:210 returns until: now + ms, consumed at coding-pause.ts:174, and rendered into chat prose at coding-wait.ts:274,304. It never reaches recordLiveness, because pauseDeps(round, parkReason) closes over the reason only.

Two descriptions disagree, and the wrong one is the general-purpose read

  • composition.ts:255"waiting (deliberately parked — waitNote says what for and until when)"
  • coding.ts:170"saying what for"

The sibling that omits the promise is the correct one, which is the tell. work-report.ts:127's "expected to resume in …" clause is unreachable code.

Why this misleads

"Parked, resuming at 16:00" and "parked, indefinitely" are different decisions for the owner. The platform computes the first and reports the second.

Acceptance criteria

  1. recordLiveness receives the instant coding-wait.ts:210 already computes; waitingUntil is populated wherever a park has a known end.
  2. A park with genuinely no known end stores NULL and the prose says so — the distinction is the point, not the field being non-null.
  3. composition.ts:255 matches behaviour, or behaviour matches it.
  4. A guard asserts every writer of a nullable status column is exercised from a production call site, denominator stated per ADR 0002. A helper test that supplies an argument no caller supplies is the failure mode here and in instance_runtime_nodes.status is a write-once "online" column — every machine an instance has ever seen reports online forever, including one last seen four days ago #570.
  5. Red demonstrated: an engine-limit park records its reset instant.

Verified vs inferred

  • Verified: the single writer, all three call sites, the test-only supplier, both descriptions, coding-wait.ts:210/coding-pause.ts:174, and the 89/89 live measurement.
  • Inferred: nothing.

Activity

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

    P2: correctnessReal defect, no live harm today — inert fields, miscounts, missing guardsbackendBackend / Worker / API workbugSomething isn't workingcoderThe Coder wedge agent (#68) — Engine, Pilot, Co-pilot, Loop, OverseermcpMCP server surface — the operator's instrument panel, not the productobservabilityA displayed value the code cannot produce, or that means something other than its label

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions