GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — muse-proxy: a run that fails after producing partial output is reported as a successful 'stop' — failure is masked whenever any content exists · Issue #672 · developing-today/code

muse-proxy: a run that fails after producing partial output is reported as a successful 'stop' — failure is masked whenever any content exists #672

New issue
Copy link
New issue
Copy link
Closed
#673
Closed
muse-proxy: a run that fails after producing partial output is reported as a successful 'stop' — failure is masked whenever any content exists#672
#673
Copy link
Assignees
dezren39
Labels
app/muse-proxybin/muse-proxy.mjs OpenAI-compatible Muse bridgekind/bugSomething isn't working (prefixed form of the classic bug label)

Description

@dezren39
dezren39
opened on Oct 23, 2026
Issue body actions

Problem

bin/muse-proxy.mjs decides whether a muse exec run failed with this predicate (line 439):

const failed = (code !== 0 && fullContent.length === 0) || (terminalState && terminalState !== 'completed' && fullContent.length === 0);

Both clauses require fullContent.length === 0. So whenever the CLI emitted any assistant text before failing, the failure is masked: the proxy returns the partial text as a normal successful completion with finish_reason: 'stop'.

Evidence (verified 2026-10-23 with a stub muse on PATH, same harness style as bin/muse-proxy.test.mjs)

Case A — terminal event says the run failed, exit code 0:

  • stub emits run.output.delta "partial answer", then run.terminal.failed with terminal: "failed", exit 0.
  • Non-stream response: 200, message.content: "partial answer", finish_reason: "stop".
  • Stream response: partial chunk, then a finish chunk with finish_reason: "stop" + [DONE]. No error anywhere.

Case B — child crashes mid-run, exit code 3:

  • stub emits run.output.delta "partial answer", writes stderr, exit 3 (no terminal event).
  • Both modes: 200 / finish_reason "stop" with the partial text, exactly as Case A.

The empty-content cases are handled correctly (#670: non-stream 500, stream SSE error frame + [DONE]); only the partial-content cases slip through.

Why it matters

Clients (opencode and any OpenAI-compatible consumer) cannot distinguish a truncated, failed run from a complete answer: they present the partial text as the model's full reply and record the request as successful. A mid-run auth expiry, rate limit, or CLI crash after the first tokens is indistinguishable from success — the worst failure shape for a bridge whose whole job is faithful translation.

Acceptance criteria

  • A run whose terminal state is present and not completed is reported as an error regardless of how much content was produced: non-stream → 500 with the Muse execution failed: … error body; stream → the already-streamed deltas are followed by the muse-proxy: streaming execution failure is sent as unframed JSON on a 200 SSE response — clients see an empty successful stream #670 SSE error frame + [DONE], and no finish_reason: 'stop' chunk is emitted.
  • A run with no terminal event and a non-zero exit code is likewise an error even when partial content exists (same surfacing as above).
  • A run with terminal state completed stays a success even if the exit code is non-zero (the terminal event is authoritative), and all existing behavior for completed runs (tail reconciliation muse-proxy (PR #479): streaming responses silently drop the terminal text tail that non-streaming returns #484, usage accounting) is unchanged.
  • New tests in bin/muse-proxy.test.mjs cover both cases above in both stream and non-stream modes (stub markers in the style of the existing FAILME/DIVERGE cases), and the existing three tests still pass (node --test bin/muse-proxy.test.mjs).

Suggested fix

Make the terminal state authoritative and drop the content-length gate, e.g.:

const failed = terminalState ? terminalState !== 'completed' : code !== 0;

Related sighting (judge separately)

bin/agy-proxy.mjs:553 has a similar content-gated check (code !== 0 && !responseText). That CLI exposes no authoritative terminal event, so the semantics differ; noted here only so the fixer can decide whether it deserves its own issue — it is not part of this issue's acceptance criteria.

Activity

  1. github-actions
    assigned
    dezren39
    on Oct 23, 2026
  2. dezren39
    added a commit that references this issue on Oct 23, 2026

    Merge pull request #673 from developing-today/creator/672-partial-fai…

    4a91edc
  3. dezren39
    closed this as completedin #673on Oct 23, 2026
  4. developing-today-fleet commented on Nov 24, 2026

    @developing-today-fleet
    developing-today-fleetBot
    on Nov 24, 2026 – with developing.today fleet
    Contributor
    More actions

    AUDIT-7 Lane 2 slice 3 — closing evidence. Verified against the issue body and merged implementation PR(s):

    • PR #673 — fix(muse-proxy): surface runs that fail after partial output as errors (#672) (merged 2026-10-23)

    The issue had zero comments in the fresh pre-action read; this comment records the missing close evidence.

  5. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    app/muse-proxybin/muse-proxy.mjs OpenAI-compatible Muse bridge
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/muse-proxybin/muse-proxy.mjs OpenAI-compatible Muse bridgekind/bugSomething isn't working (prefixed form of the classic bug label)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.