[Bug]: AutoDeploy import checker silently passes unreadable source files
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.7k
- Forks
- 2.8k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 489
Description
System Info
Platform-independent source inspection.
Reproduction
scripts/check_auto_deploy_imports.py::_check_file() currently does:
try:
source = path.read_text()
except (OSError, UnicodeDecodeError):
return []
If an AutoDeploy Python file cannot be read or decoded, the checker reports zero violations. The caller therefore treats that file as passing the import-discipline check.
Expected behavior
A checker that cannot inspect an in-scope source file should fail closed and report the read/decode failure as a violation.
Actual behavior
Read and decode failures are silently accepted.
Proposed fix
Return a diagnostic violation for read/decode failures and add a regression test that simulates an OSError.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scripts/check_auto_deploy_imports.py at _check_file() and trace how its returned violations are handled by the caller. Add a regression test that simulates an OSError while reading an in-scope source file. Done means read or decode failures produce a diagnostic violation instead of allowing the checker to pass silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100