AntFleet

Disagreement · 7284403c-anthropic-0

bin.ts top-level await wrapper cannot catch clipanion errors — runExit calls process.exit() directly

solo Opus
repo 799b2361·PR #2·reviewed 5 days ago

Opus finding

bin.ts top-level await wrapper cannot catch clipanion errors — runExit calls process.exit() directly

lowbugmedium
  • src/bin.ts:42-51
The comment claims the try/catch wraps clipanion so synchronous throws during registration/arg-parsing flow through fail(). But clipanion's runExit internally calls process.exit() and catches its own errors; it does not throw to the caller in normal failure paths. The catch block will essentially never fire for the cases the comment advertises (arg-parsing errors). The comment is misleading about what this safety net actually protects.

Recommendation

Either use cli.run() (which returns an exit code and can throw) and call process.exit() yourself, or rewrite the comment to accurately describe what this catch covers (e.g. top-level module init throws only).

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.