Skip to content

fix: exclude empty sibling directories from reporting when peers have visible files#32

Merged
dimalvovs merged 2 commits into
mainfrom
copilot/validate-empty-directory-reporting
May 20, 2026
Merged

fix: exclude empty sibling directories from reporting when peers have visible files#32
dimalvovs merged 2 commits into
mainfrom
copilot/validate-empty-directory-reporting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

  • Locate project version declaration(s)
  • Bump version for the empty-directory bugfix release
  • Run tests to confirm no regressions
  • Run CodeQL check and report results

- Add `_has_visible_files` helper to check whether a directory directly
  contains at least one visible (non-ignored, non-ontrack.yml) file.
- In `_find_reporting_directories`, after collecting results from all
  subdirectories, filter out any empty-leaf entries when the result set
  also contains directories that have visible files.  An empty directory
  is still reported when it is the only (or deepest) reachable leaf, but
  is silently dropped when it would otherwise appear alongside real content.
- Add `test_find_reporting_directories_empty_sibling_not_reported` to
  reproduce the bug and verify the fix.

Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/9d81e458-efda-4b1c-892b-4525bad9e81e

Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
Agent-Logs-Url: https://github.com/FertigLab/ontrack/sessions/101e0071-7411-4437-a466-286653c5aab8

Co-authored-by: dimalvovs <1246862+dimalvovs@users.noreply.github.com>
Copilot AI requested a review from dimalvovs May 20, 2026 20:02
@dimalvovs dimalvovs merged commit caf5053 into main May 20, 2026
1 check passed
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