Skip to content

fix(read): lead file-inspection diagnosis with the cause - #1234

Closed
TheGreatAxios wants to merge 1 commit into
mainfrom
cl-9474-file-inspection-diagnosis-polish
Closed

TheGreatAxios wants to merge 1 commit into
mainfrom
cl-9474-file-inspection-diagnosis-polish

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • File-inspection errors lead with the gap (missing extractor, permission boundary, malformed, unreadable) so a 72-character collapsed tool row still names it when the path is long
  • Diagnosis text uses the call path, not the absolute temp path, so the pdftotext hint matches what the model should run
  • A .pdf that is valid UTF-8 without magic is left as a normal text read; only NUL-without-magic .pdf files count as malformed

Verification

  • bun run typecheck passes
  • bun test src/plugins/file-inspection-diagnosis.test.ts src/plugins/read-file-guard-plugin.test.ts passes (50 pass, 0 fail)

Related to CL-9474

Collapsed tool rows clip to 72 characters, so a long path buried the
gap. The first sentence now names missing extractor, permission
boundary, or malformed file, and the message uses the call path.
@linear-code

linear-code Bot commented Sep 29, 2026

Copy link
Copy Markdown

CL-9474

@TheGreatAxios

Copy link
Copy Markdown
Collaborator Author

Closing as duplicate of #1238. Stacked onto that PR: 1234 copy polish (lead-with-cause diagnosis + displayPath) plus 1238 UTF-8 .pdf text reads, quoted pdftotext, and tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant