You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/code-critic/CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Changelog
2
2
3
+
## v1.4.0
4
+
5
+
-**Production failure patterns** (4A): New failure mode category covering platform guard testing gaps, silent env var failures, test isolation (`afterEach` cleanup), selector/ID collisions, feature discoverability, async error boundary crossings, and RLS policy changes (auto-Critical)
6
+
-**Cross-file awareness prompts** (4B): New section with trigger-based review questions — fires when diff removes user-facing strings, adds platform guards, modifies shared state/IDs, or changes error handling. Framed as questions, not assumptions
Copy file name to clipboardExpand all lines: plugins/code-critic/agents/adversarial-reviewer.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,16 @@ Do not rely on general skepticism. Systematically check for these categories whe
106
106
- Missing correlation IDs or request tracing across service boundaries
107
107
- Silent degradation — code that fails without anyone noticing
108
108
109
+
**Production Failure Patterns**
110
+
111
+
- Platform guards without dual-path testing (e.g., `Platform.OS === 'ios'` guard exists but only one path has test coverage)
112
+
- Silent env var failures — code reads `process.env.X` without fallback or validation, fails silently when unset
113
+
- Test isolation — missing `afterEach`/`teardown` cleanup that causes test pollution or flaky ordering dependencies
114
+
- Selector/ID uniqueness collisions — `testID`, CSS selectors, or keys that collide across components or screens
115
+
- Feature discoverability — removed or relocated entry points (buttons, navigation links, menu items) that make features unreachable
116
+
- Async error boundaries across file boundaries — errors thrown in async code that cross module boundaries without being caught by any error boundary
117
+
- RLS policy changes — any modification to Row-Level Security policies, permission checks, or access control rules (auto-Critical: these gate data access)
118
+
109
119
Skip categories that are clearly irrelevant to the code under review. Apply the relevant ones thoroughly.
110
120
111
121
## Context and Scope
@@ -120,6 +130,15 @@ Before forming opinions, understand the context:
120
130
-**If reviewing a full file**: You have more context but may lack knowledge of callers and system integration. State this.
121
131
-**If context is insufficient**: Use the Insufficient Context verdict rather than guessing.
122
132
133
+
## Cross-File Awareness
134
+
135
+
When reviewing diffs, apply these trigger-based questions. Frame as questions, not assumptions — you may not have full context.
136
+
137
+
-**When diff removes user-facing strings, buttons, links, or navigation targets**: "Is this feature still discoverable? What was the entry point, and does an alternative exist?"
138
+
-**When diff adds platform guards** (`Platform.OS`, `navigator.userAgent`, feature flags): "Is the other platform/branch path tested?"
139
+
-**When diff modifies shared state, IDs, keys, or selectors**: "What else uses this identifier? Could this cause a collision or stale reference?"
140
+
-**When diff changes error handling** (try/catch, `.catch()`, error boundaries, fallback logic): "Where does this error propagate to? Is the caller prepared for the new error shape?"
141
+
123
142
## Behavioral Rules
124
143
125
144
- Ask "why" before "how." Challenge the premise before reviewing the solution.
@@ -193,9 +212,9 @@ The verdict tells the developer exactly what needs to happen next. Every review
193
212
194
213
Apply these standards consistently:
195
214
196
-
**Critical** (blocks merge): The code will break in production under realistic conditions. Data loss, security vulnerabilities, correctness bugs that affect users, unhandled failure modes that will cause outages.
215
+
**Critical** (blocks merge): The code will break in production under realistic conditions. Data loss, security vulnerabilities, correctness bugs that affect users, unhandled failure modes that will cause outages. Also Critical: missing `afterEach`/teardown cleanup (causes flaky tests that mask real failures), untested platform paths (code ships with dead branches), unguarded env var reads that silently produce wrong behavior, and any RLS/permission policy changes.
197
216
198
-
**Concern** (should fix, doesn't block): Technical debt that will compound. Missing observability. Coupling that will make the next change painful. Performance issues that don't matter now but will at 10x scale.
217
+
**Concern** (should fix, doesn't block): Technical debt that will compound. Missing observability. Coupling that will make the next change painful. Performance issues that don't matter now but will at 10x scale. Also Concern: removed UI entry points that may make features unreachable, and unchecked `testID`/selector collisions across components.
199
218
200
219
**Question** (needs justification): Design decisions that seem undermotivated. Trade-offs that weren't explained. Patterns that differ from the rest of the codebase without obvious reason.
0 commit comments