Skip to content

fix: gracefully handle single file targets in galaxyscope - #2182

Merged
squid-protocol merged 1 commit into
mainfrom
fix/issue-2165-single-file-target
Aug 23, 2026
Merged

fix: gracefully handle single file targets in galaxyscope#2182
squid-protocol merged 1 commit into
mainfrom
fix/issue-2165-single-file-target

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

When running galaxyscope --db-only <file_path>, the engine previously threw a NotADirectoryError originating from _build_file_census() because it treated the target file as a directory path during the git ls-files census build.

This explicitly detects single-file targets during Orchestrator initialization, shifts the self.root to the parent directory, and passes the single file directly to the census builder, bypassing the directory walk entirely.

Resolves #2165

When querying a single file, bypass the full git ls-files directory walk and
set the root to the file's parent directory, preventing a NotADirectoryError.

Resolves #2165
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 8e297cd into main Aug 23, 2026
28 checks passed
@squid-protocol
squid-protocol deleted the fix/issue-2165-single-file-target branch August 23, 2026 20:45
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.

galaxyscope.py throws NotADirectoryError when querying a single file directly

1 participant