NewsCrawler.org

Adversarial AI code review vs. running the code: a pstack case

【pstack】AIに敵対的レビューをさせるな。トークンは検証に使え
Adversarial AI code review vs. running the code: a pstack case
Adversarial AI code review vs. running the code: a pstack case
Adversarial AI code review vs. running the code: a pstack case
Image: zenn.dev

A developer building a personal expense app first assumed that adversarial review[1], where AI models critique AI-written code over several rounds, would raise quality. After rewriting an aggregation logic, two other models returned 47 comments on the diff, covering variable names, comments and possible future multi-currency support. None pointed to the bug that surfaced later: expenses entered between 23:00 and 23:59 Japan time on the last day of a month were counted in the next month, because dates were split by month in UTC[4].

The author points to pstack, a collection of agent skills by the developer poteto, published in Cursor's public plugin repository. Its core principle is to verify real behavior rather than infer results from proxy indicators, self-reports or a successful compile. The interrogate skill runs adversarial review, but poteto wrote on X that he now considers such reviews mostly a waste of tokens, that abstract code review adds little value, and that agents get lost in nitpicks and suggestions based on YAGNI[2]. pstack also includes skills that create app-level verification and formal verification[3] for properties that tests rarely reach, such as concurrency and state transitions.

When the author reran the bug fix with pstack, the agent first wrote a reproduction test and confirmed that it failed on the old code. It then found the cause, grouping by month in UTC, and showed test results before and after the fix; the whole job took about 20 minutes. The author advises stating completion criteria and the evidence to be shown in the request, and sees lasting value in adversarial review for discussing design intent and security risks.

Read the original zenn.dev

Sources

  • Zenn JA

    【pstack】AIに敵対的レビューをさせるな。トークンは検証に使え

    164 likes59 bookmarks3 comments

Published: First seen: Читать по-русски

Open as a page