AntFleet

Disagreement · 4c349ef3-openai-2

Non-portable shebang hard-codes a local Homebrew Python path

mismatch
repo 703f69ec·PR #3·reviewed 5 days ago

Primary finding

Non-portable shebang hard-codes a local Homebrew Python path

mediumbuild-releasehigh
  • infra/app.py:1
The script pins a machine-specific interpreter path that will fail on most systems and CI environments. CDK apps are typically run via the active Python in the environment; hard-coding a Homebrew path reduces reproducibility.

Recommendation

Use a portable shebang like #!/usr/bin/env python3 or remove the shebang and rely on the environment’s interpreter (e.g., invoking via python -m or the CDK toolchain).

Counterpart finding

`app.py` uses a non-portable shebang and imports `stack` without package context

lowbuild-releasehigh
  • infra/app.py:1-8
The shebang `/opt/homebrew/bin/python3.13` is a developer-machine-specific path (Apple Silicon Homebrew) and will fail in CI/Linux. The `from stack import GeoTradingStack` works only when CWD is `infra/`, which is brittle if `cdk` is invoked from elsewhere; this implicitly couples to `cdk.json`'s `app` command (not shown). Lambda runtime is also pinned to Python 3.12 while app.py targets 3.13 — version skew worth flagging.

Recommendation

Use `#!/usr/bin/env python3`, and either convert `infra/` to a package with `from infra.stack import GeoTradingStack` or document the required CWD in `cdk.json`'s `app` field.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →