NVIDIA / NVIDIA/TensorRT-LLM

[Bug]: AutoDeploy import checker silently passes unreadable source files

Open Beginner friendly
#17,753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

AutoDeploy
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.