Skip to content

fix(supervise): missing-receipt error masks the real upstream failure in streamDurableBridgeRun #809

Description

@drewstone

Summary

In streamDurableBridgeRun (src/runtime/supervise/runtime.ts, ~lines 2630–2636 on current main), the missing-receipt BackendTransportError is thrown BEFORE pendingUpstreamError is consulted on done. When a bridge run fails for a real reason AND therefore lacks a materialization receipt (materialization failure, backend crash before receipt), the runtime reports the generic "completed without cli-bridge.profile-materialization.v2 (classified transient)" and retries — masking the actual error.

Field case

discovery-lab run strong-lead-smoke-a: the true failure was codex exited 1: Read-only file system (os error 30) (fs-jail mounted CODEX_HOME read-only — fixed bridge-side in drewstone/cli-bridge#154). The runtime surfaced only the missing-receipt transport error across 3 driver attempts; the EROFS cause was recoverable only by bridge-side archaeology.

Ask

Swap the order: surface pendingUpstreamError first when present; throw the missing-receipt error only when the run completed with no upstream error. The receipt check stays load-bearing — it just must not outrank the real cause.

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