Skip to content

Failed analysis keeps no trace of the reply ("analysis returned no parseable JSON") and is retried every run #193

Open

Description

@Pantoria

Problem

When extractJson(result.text) finds nothing, analysis throws analysis returned no parseable JSON (src/analyze.js). The evidence record then keeps only status: "failed" and that error string. The reply is dropped.

A failed record is never fresh (isEvidenceFresh needs status === "ok"), so the transcript is analyzed again on every run, with no limit.

Measured

In one repo, 27 of 211 evidence records failed this way (13%). Analysis agent: claude, Sonnet, auto-picked, effort medium, jobs: 10. The failures do not track transcript size: median 0.62 MB for failed records against 0.79 MB for ok records.

From the record alone, the user cannot tell the cause: an empty turn, prose instead of JSON, JSON cut off at a length limit, or a fence the extractor does not accept. Each run pays for the same failures again.

Proposal

  1. On this failure, save in the evidence record, after redaction: the reply length in characters, the first and last ~300 characters, and the harness stop reason if acpx gives one.
  2. Show a short class in status: empty, prose, truncated or unparsed.
  3. Optional: after N failures of the same transcript at the same key, skip it and say so, instead of retrying it forever.

VISION: "Failure is loud and named."

backpass 0.1.30 (main d1e7550).

Activity

  1. kunchenguid commented on Sep 30, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    Outcome: ready-for-pr — real failure-path gap on main (d1e7550). No open PR that fixes provenance or the retry storm. #183 (blank-turn retry-once) may reduce some empty replies but does not keep the failed reply, classify it, or bound retries — not existing-pr.

    On main: extractJson miss → analysis returned no parseable JSON (src/analyze.js); catch writes { status: "failed", error } only. isEvidenceFresh requires status === "ok", so every run re-pays the same failures. Comment in-tree already says “retried next run” with no cap.

    contract-class: restore — VISION “Failure is loud and named” plus measured artifacts (reply shape / stop reason) are the promised failure path; today’s mute failed + infinite retry is that path broken. Optional skip-after-N is fine only if the skip is named in status (not a quieter degraded path).

    VISION (per rule):

    1. Evidence is the only currency — aligns (keep a redacted slice of the reply so the failure is inspectable).
    2. The human owns the weights — aligns (no memory write).
    3. Nothing the model says is taken on faith — aligns (measure reply length / harness stop reason from the artifact).
    4. The budget is the constraint — aligns strongly (13% fail × every run is pure spend).
    5. It reads what you already have and owns nothing — aligns (save after redaction; no upload).
    6. Failure is loud and named — aligns strongly (class in status: empty/prose/truncated/unparsed; resist silent skip).
    7. Scope — aligns.

    Alignment criteria: resist a quieter degraded path — if skipping after N, say so and keep the last failure trace.

    ready-for-pr + bug. I will not open a competing PR.

  2. added
    bugSomething isn't working
    ready-for-prIssue is in scope and ready for a PR
    on Sep 30, 2026
  3. kunchenguid commented on Oct 14, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    Still-real pass (14-day restamp): ready-for-pr. Rechecked latest main (29c46e7): src/analyze.js still throws analysis returned no parseable JSON and the catch still writes only { status: "failed", error } with the comment "retried next run", so the reply is dropped and the transcript is re-paid on every run with no cap. #183 (blank-turn retry) is still open and awaiting a decision, and it doesn't keep the failed reply, classify it, or bound retries, so it isn't the fix here. No other open PR helps.

    contract-class: restore. VISION's "Failure is loud and named" is the promised failure path; a mute failed record with unbounded retries is that path broken. A skip-after-N is fine only if status names the skip.

    VISION (per rule):

    1. Evidence is the only currency: aligns (a redacted slice of the reply makes the failure inspectable).
    2. The human owns the weights: aligns (no memory write).
    3. Nothing the model says is taken on faith: aligns (reply length and stop reason are measured from the artifact).
    4. The budget is the constraint: aligns (stops re-paying the same failures).
    5. It reads what you already have and owns nothing: aligns (saved after redaction, never uploaded).
    6. Failure is loud and named: aligns strongly (empty / prose / truncated / unparsed classes in status).
    7. Scope: aligns.

    Leaving ready-for-pr. I won't open a competing PR.

  4. Pantoria commented on Oct 15, 2026

    @Pantoria
    ContributorAuthor

    PR #212 is up for review (raised through no-mistakes). Failed records keep a redacted head/tail, the reply length, and a class (empty/prose/truncated/unparsed) shown in status. After 3 unparseable replies at the same key the transcript is skipped, and the skip is named in status, the run summary, and --json, including for nested files.

  5. kunchenguid commented on Oct 15, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    existing-pr: #212 (thanks @Pantoria). It keeps a redacted head/tail, chars and a class on the failed record and shows them in status. That part is the restore this issue asked for. The skip after 3 unparseable replies is on by default, so #212 is waiting on Kun's decision about that default (details on the PR). Keeping ready-for-pr until it lands.

    VISION: evidence, human-owns-weights, nothing-on-faith, budget, owns-nothing, loud failure (strongly) and scope all align.

  6. added a commit that references this issue on Oct 16, 2026
    39b5a43
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

    bugSomething isn't workingready-for-prIssue is in scope and ready for a PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions