Review Agent PRs That Leave Promises Unawaited
说明与用途
自动化代理经常删除 await,导致无声错误。该工作流程识别、回滚并测试此类更改,确保事务持久性和正确的状态码。
问题
Automated code agents often remove await statements for perceived speed, causing silent failures and ordering bugs in critical side‑effects.
结果
The workflow prevents silent failures by ensuring all critical async calls are awaited or properly outboxed, aligning status codes with durability guarantees.
工作流
- 1. Fetch agent branch and generate diff
- 2. Run scan script to flag unawaited calls
- 3. Review flagged hunks and decide to trust, revert, or test
- 4. Revert dropped await on critical operations
- 5. Add tests for rejection handling, outbox durability, and zero unhandled rejections
- 6. Verify status code matches durable acknowledgment
- 7. Merge after passing tests
证据
The agent patch had removed three await keywords for speed.
Revert dropped await on money, mail, auth, or deletion.
- 记录日期: 2026-09-18T00:30:34.745Z