Skip to content

Propagate overlay directory listing errors - #749

Open
smigolsmigol wants to merge 1 commit into
pydantic:mainfrom
smigolsmigol:fix/overlay-iterdir-errors
Open

Propagate overlay directory listing errors#749
smigolsmigol wants to merge 1 commit into
pydantic:mainfrom
smigolsmigol:fix/overlay-iterdir-errors

Conversation

@smigolsmigol

@smigolsmigol smigolsmigol commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Overlay iterdir returned an empty list when the host directory listing failed.
Direct mounts return the mapped error, so permission, not-found, not-a-directory, and entry iteration failures could appear as an empty directory only in overlay mode.

Propagate the error returned by host_list_visible_dir_entry_names.
The helper's existing symlink filtering and memory accounting remain unchanged.

The existing direct and overlay permission parity test now covers Iterdir.

Tests

  • cargo test -p monty-fs overlay_permission_errors_match_direct_mode
  • cargo test -p monty-fs
  • make format-rs
  • make lint-rs

Summary by cubic

Propagates host directory listing errors from overlay iterdir to match direct mounts. Previously overlay returned an empty list on host listing failure; now it returns the mapped error (permission, not-found, not-a-directory, iteration).

  • Return the host error from host_list_visible_dir_entry_names; keep symlink filtering and memory accounting unchanged.
  • Extend the overlay_permission_errors_match_direct_mode test to cover iterdir.
  • Migration: callers that treated an empty list as success must handle iterdir errors in overlay mode.

Written for commit ee50785. Summary will update on new commits.

Review in cubic

Return host listing failures from overlay iterdir instead of presenting unreadable directories as empty. Extend the existing direct/overlay permission matrix with directory enumeration.
@codspeed-hq

codspeed-hq Bot commented Aug 14, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 36 untouched benchmarks
⏩ 16 skipped benchmarks1


Comparing smigolsmigol:fix/overlay-iterdir-errors (ee50785) with main (edeb82a)

Open in CodSpeed

Footnotes

  1. 16 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@smigolsmigol
smigolsmigol marked this pull request as ready for review August 14, 2026 21:21

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Re-trigger cubic

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