Skip to content

Refuse images in a folder that also holds subfolders - #46

Merged
guijacquemet merged 3 commits into
mainfrom
claude/mixed-folder-refused
Oct 30, 2026
Merged

guijacquemet merged 3 commits into
mainfrom
claude/mixed-folder-refused

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Summary

  • discovery.py: images (TIFF or OME-Zarr) in a folder that also has subfolders are now an error instead of a warning. The issue code stays tiff_outside_leaf, so code that reads issue codes keeps working. With an error, check and run stop and write nothing. The new message says a folder holds either images or subfolders, never both.
  • report.py, notebook_ui.py: these images are no longer counted under "skipped" items, because they now block the run.
  • Docs: contract §1 (Leaf folder) and §8 (moved from the warning row to the error row), user guide (folder rules and message table), plan §2/§5 and AGENTS.

Decisions

Owner decision (October 2026), passed on by the coordinator: every MorphoBricks brick refuses a mixed folder, and CellPatcher already does, so its images are never dropped with only a warning. Excluding the paths does not clear this error, just as with other folder-structure errors (folder_too_deep).

Tests

  • test_images_beside_subfolders_are_an_error replaces the old warning test. test_a_run_with_images_beside_subfolders_writes_nothing is new. Both fail on main.
  • pytest: 1122 passed, 1 skipped (test_discovery.py:472, root ignores file modes). ruff check . and ruff format --check . are clean.

Generated by Claude Code

Owner decision (October 2026): a folder holding both image files and
subfolders is an error in discovery, not a warning, as in every other brick
(CellPatcher already refuses it). The code stays tiff_outside_leaf (OME-Zarr
images included); its severity becomes error, so check/run block and nothing
is written. It is no longer counted as a skipped item in the CLI report or the
notebook tiles. Contract §1/§8, user guide, plan and AGENTS updated.
Regression tests test_images_beside_subfolders_are_an_error and
test_a_run_with_images_beside_subfolders_writes_nothing (both fail on main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VbytvBRB9CmKQ5AAkhEFcv

Copy link
Copy Markdown
Contributor Author

Merged main (#45) in with no conflicts. tiff_outside_leaf is now an error: a mixed folder blocks check and run. Both new regression tests fail on the old main. 1130 passed, 1 skipped (test_discovery.py:472, root), ruff clean, CI 7/7 green on 3bfc57b. Merging.


Generated by Claude Code

@guijacquemet
guijacquemet merged commit 455a4e3 into main Oct 30, 2026
7 checks passed
@guijacquemet
guijacquemet deleted the claude/mixed-folder-refused branch November 1, 2026 18:05
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.

2 participants