file_read .ts/.tsx path mismatch leaves complete review without recovery evidence

Author: elvizlaiCreated Sep 28, 2026Updated Oct 1, 2026

Summary

On the official OCR CLI v1.12.9, a real range review requested a TypeScript hook using a .ts path, while the tracked file at the reviewed target commit actually had the .tsx extension. file_read failed with Git's “path does not exist” error, but the final result was complete, with zero findings, one recorded tool failure, and all selected items marked completed.

This report focuses on path-miss recovery and its machine-readable evidence. It does not establish that the model failed to recover, skipped the review, or missed a defect. The retained result does not tell us whether it subsequently found and read the correct .tsx file.

Related:

  • #989 — nonexistent target-tree paths requested through file_read.
  • #84 — path grounding and candidate suggestions on read failures.
  • #1196 — distinguishing recovered exploration failures from unresolved failures for automated admission.

If this is better tracked under one of those issues, please feel free to consolidate it; this adds a current-version observation with an extension mismatch.

Environment

  • Official @alibaba-group/open-code-review CLI: v1.12.9, confirmed in the execution manifest.
  • GitHub Actions on Linux, with an OpenAI-compatible model endpoint. Model/gateway details are withheld.
  • Reusable Action pinned to public upstream commit 579b9319151aa734f2d25df6e59efa59eec5a577.
  • Range review with explicit base and target commits; JSON output, concurrency 1, per-task timeout input 30 minutes.
  • NPM auto-updates disabled with OCR_NO_UPDATE=1.

Observation (sanitized)

All file paths below are illustrative replacements, not original repository paths. Commit identifiers are redacted. No reviewed source, credentials, endpoint addresses, private repository names, or internal run links are included.

The requested path was:

src/hooks/use-feature-toggle.ts

Inspection of the reviewed target commit confirmed that the actual tracked path was the corresponding .tsx file:

src/hooks/use-feature-toggle.tsx

Sanitized stderr:

[ocr] ✘ file_read failed: file "src/hooks/use-feature-toggle.ts" not found: git show <HEAD_SHA>:src/hooks/use-feature-toggle.ts: exit status 128: fatal: path 'src/hooks/use-feature-toggle.ts' does not exist in '<HEAD_SHA>'

Minimal JSON excerpt (unrelated fields omitted; paths and SHA redacted, observed counts/status preserved):

json
{
  "status": "complete",
  "tool_calls": {
    "total": 14,
    "failure": 1,
    "failure_by_tool": {
      "file_read": 1
    },
    "failure_details": [
      {
        "tool_call_number": 5,
        "tool_name": "file_read",
        "arguments": "{\"file_path\":\"src/hooks/use-feature-toggle.ts\"}",
        "error": "file \"src/hooks/use-feature-toggle.ts\" not found: git show <HEAD_SHA>:src/hooks/use-feature-toggle.ts: exit status 128: fatal: path 'src/hooks/use-feature-toggle.ts' does not exist in '<HEAD_SHA>'"
      }
    ]
  },
  "comments": [],
  "manifest": {
    "terminal_state": "complete"
  }
}

Manifest coverage counts were:

  • selected: 2
  • completed: 2
  • failed: 0
  • reused: 0
  • waived: 0

The Action finished successfully. There was no top-level warnings field. This is an observed LLM-driven run, not a deterministic end-to-end reproduction. We retained the structured result and stderr, but not the full session transcript in the uploaded artifacts, so we cannot establish whether a successful corrective read followed the failed call.

Relevant current behavior

Reading the v1.12.9 implementation suggests:

  • internal/tool/file_read.go returns the read error without path candidates or automatic extension correction.
  • internal/llmloop/loop.go returns that error to the model as a tool result; the model can choose to search and retry.
  • internal/llmloop/tool_failure_streak.go escalates repeated failures per task/tool. It resets the streak on success, but does not reconcile the cumulative failure record with the specific missing path.
  • complete is derived from coverage, rather than the absence of tool failures.

These behaviors explain why a failure counter and complete can coexist. They do not establish recovery of this particular read.

Requested improvement / clarification

  1. On a missing target-tree path, consider returning bounded candidate paths from that same commit, e.g. the corresponding .tsx file. Prefer explicit suggestions over silently substituting a possibly different file, especially when multiple candidates exist.
  2. Guide the agent to use file_find / code_search before repeating a nonexistent-path read, rather than merely repeating the same arguments.
  3. Expose recovery evidence separately from historical failure counts and coverage: for example, an unresolved/recovered indication with the original failed call and corrective read where such a relationship can actually be established. A later success of the same tool on an unrelated file should not by itself prove recovery.
  4. Document how an automated admission gate should treat an exploratory file_read failure when the final result is complete, and whether session inspection is currently the only way to investigate it.

We are not requesting that every recoverable lookup error automatically fail a review. A blanket tool_calls.failure > 0 policy can reject a review that successfully corrected itself; accepting complete alone cannot prove that the missing context was obtained. A clear contract would help downstream CI distinguish those cases.

A focused regression fixture could use a tracked .tsx file with an extensionless import and a deliberately wrong .ts tool request, verifying the candidate/recovery behavior without private source or a paid model call.

Source: alibaba/open-code-review