Skip to content

fix(librarian): allow .codex-cover dotfiles through ignore filter - #776

Merged
ajslater merged 1 commit into
developfrom
fix-custom-cover-dotfile-filter
May 25, 2026
Merged

ajslater merged 1 commit into
developfrom
fix-custom-cover-dotfile-filter

Conversation

@ajslater

Copy link
Copy Markdown
Owner

Summary

  • Custom folder covers (.codex-cover.jpg) silently stopped importing in v1.12.5. Commit a709a74 added a . prefix to _IGNORED_BASENAME_PREFIXES, which made the poller's walker, the watchfiles filter, and expand_dir_added all skip the file before the cover predicate ever ran.
  • is_ignored_basename now defers to match_folder_cover for dotfiles, so .codex-cover.{jpg,jpeg,png,webp,gif,bmp} passes through while .DS_Store, .git, .Trashes, .codex-cover (no extension), and .codex-cover.txt remain filtered.
  • Added regression tests covering all four code paths that consult the ignore filter (is_ignored_basename / is_ignored_path, DiskSnapshot, CodexWatchFilter, expand_dir_added) plus a negative test for non-image dotfile matches.

Test plan

  • uv run pytest tests/test_fs_filters_ignore.py — 22 passed (4 new regression tests)
  • make lint clean
  • make ty clean
  • Drop a .codex-cover.jpg into a comic folder on a running instance and confirm the folder picks up the custom cover after the next poll / event

🤖 Generated with Claude Code

a709a74 added a "." prefix to _IGNORED_BASENAME_PREFIXES so the
poller's walker, the watchfiles filter, and expand_dir_added all
skip hidden files before any cover predicate runs. User-supplied
folder covers named .codex-cover.jpg / .png / .webp / ... are
dotfiles by name but legitimate covers, so the dotfile filter
swallowed them and broke custom folder covers from v1.12.5 on.

is_ignored_basename now exempts a basename when match_folder_cover
claims it. .DS_Store, .git, .Trashes, .codex-cover (no extension),
.codex-cover.txt etc. still get filtered.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ajslater
ajslater merged commit dc0d86f into develop May 25, 2026
3 checks passed
@ajslater
ajslater deleted the fix-custom-cover-dotfile-filter branch May 25, 2026 10:27
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