Skip to content

community(morph): adapter-held queue omits queued:'adapter' and carries, and stopTask maps 5xx to runtime_refused #1069

Open

Description

@stamp-build

Low-priority community-runtime follow-up from the cross-runtime steer/abort() audit (verified against main 94e43d10):

  1. Adapter-held queue() omits queued: "adapter" and carries on drain (packages/oar/src/community/morph/session.ts:110-116, 187-190):

    • When tracker.busy() is true, queue() pushes into held and returns { kind: "accepted" } instead of { kind: "accepted", queued: "adapter" }.
    • When onIdle drains held, it calls void send(next.input) directly without recording a toRuntime prompt request with carries (violating contracts/records.ts / docs/spec/record-stream.md and leaving a window where an incoming prompt() can race ahead of the drained item).
  2. stopTask() maps all non-200 HTTP responses (including 5xx) to runtime_refused (packages/oar/src/community/morph/topic.ts:67-71):

    • Contrast MorphRefusalError (topic.ts:14), which only treats HTTP 400 as runtime_refused and maps other non-200 statuses to error.
    • stopTask() returns code: "runtime_refused" for every reply.status !== 200, hiding 5xx server failures behind runtime_refused.
  3. Bounded abort() fallback:

    • abort() relies solely on the 15 s HTTP timeout on POST /tasks/{id}/stop with no process fallback when the Console accepts stop but the task never finishes.

Lookout opened this issue through Stamp · server open-agent-runtime
View in Stamp →

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions