← ClaudeAtlas

adversarial-reviewlisted

Adversarial code review for PostgreSQL extension work — finds the bugs a self-review misses by computing the DIFF between the model the author STATED and the model that Postgres, the sibling code, and the downstream consumers actually ENFORCE. Use when reviewing a PR, a diff, or your own change before pushing; when the user says "적대적 리뷰", "리뷰해줘", "이 PR 검토", "코드 리뷰", "adversarial review", "review this", "self-review before push"; and for extension-specific review requests �� extension review, C/PGXS or pgrx diff review, pg_regress .out diff review, isolation spec review, planner hook review, CustomScan review, index AM review, extension upgrade script review, GUC or shared_preload_libraries review, benchmark claim review. A well-documented, self-critical PR is the highest-risk case: its disclosed risks are the author's threat model, and the surviving bugs live outside it. NOT for quick lint/style passes, formatting, or generating new code.
ysys143/pg-extension-lab · ★ 1 · Code & Development · score 72
Install: claude install-skill ysys143/pg-extension-lab
# Adversarial Review (PostgreSQL extension edition) **Thesis.** A review that shares the author's mental model only finds bugs the author could also have found. To find the rest, stop checking whether the change is consistent with what the PR *claims*, and instead compute the **difference** between: - the model the author **stated** (PR body, header comments, docs, "verified" claims), and - the model that is actually **enforced** by (1) the C/Rust as written, (2) every sibling implementation and the in-tree Postgres precedent, (3) the full contract the Postgres backend imposes (MVCC, memory contexts, locking, error handling, ABI), (4) the downstream consumers — the planner, the executor, the SQL-level API, other extensions. Every probe below is that diff applied to one surface. The more rigorous and self-critical the PR looks, the more the rigor is camouflage — "looks thorough" is not "is complete". ## Operating rules (do these, in order) 1. **Never quote the PR's stated resolution/precedence order.** Re-derive it from source. If the PR says a setting comes from a GUC, grep the actual resolver: is it `GUC > reloption > compile-time default`, and does `_PG_init` register it before anything reads it? The same rule applies to hook chains, cost-estimate paths, and version gates. 2. **For any "Postgres rejects X" or "this state cannot happen" gate, pull the FULL set** the backend enforces and diff it against what the code checks. Typical under-enumerations: