AntFleet

Disagreement · 3a9ae97b-anthropic-2

ProjectManager.list_projects iterates dotfiles/non-directories and crashes on stray files

solo Opus
repo 193af03f·PR #1·reviewed 1 week ago

Opus finding

ProjectManager.list_projects iterates dotfiles/non-directories and crashes on stray files

lowbugmedium
  • backend/app/models/project.py:263-283
list_projects feeds every entry under PROJECTS_DIR — including stray files (e.g. .DS_Store on macOS, lockfiles, or accidental sibling files) — into get_project(). get_project then calls open() on `<entry>/project.json`; for a non-directory entry the os.path.exists check on meta_path returns False so get_project returns None and the entry is silently skipped, so this happens to be non-fatal. However, the sort by created_at='' on entries with malformed project.json (empty meta) would yield silent ordering bugs. Minor maintainability issue more than a crash.

Recommendation

Filter os.listdir to entries where os.path.isdir(_get_project_dir(entry)) before calling get_project.

Other reviewer

The other reviewer flagged nothing in this file/line range.

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 →

From the same review

These findings passed the unanimous gate on the same PR review. The disagreement above was filtered out; the findings below were posted.