Skip to content

fix(init): surface directory read errors - #1405

Draft
betegon wants to merge 1 commit into
feat/init-scan-metadatafrom
fix/init-surface-readdir-errors
Draft

fix(init): surface directory read errors#1405
betegon wants to merge 1 commit into
feat/init-scan-metadatafrom
fix/init-surface-readdir-errors

Conversation

@betegon

@betegon betegon commented Aug 11, 2026

Copy link
Copy Markdown
Member

The init directory walker currently catches every readdir failure and returns an empty array. A missing or unreadable directory is therefore indistinguishable from a genuinely empty repository and can produce a misleading no-files or unknown-platform bail.

Summary

  • Let readdir failures propagate from the directory walker
  • Preserve registry behavior that converts suspended tool failures into an explicit ok false result for the server
  • Make direct pre-scan failures surface to the CLI instead of silently starting with an empty listing

Stack

This PR is based on #1404 because both touch the directory walker. Its own diff only removes the silent readdir fallback and adds error-path coverage; scan metadata and exclusion policy remain in the preceding PR.

Test plan

  • 25 targeted list-dir and filesystem-tool tests
  • Biome check on changed files
  • pnpm typecheck

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cli Ready Ready Preview Aug 11, 2026 1:11pm

Request Review

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