← Back to Labs

Auditing AI-Generated Code

Step through reviewer cognitive bias, synthetic code anti-patterns (inverted booleans, missing locks), AST tree-sitter linting, and property tests

COGNITIVE HALO EFFECTAI PR #402 (copilot-bot)Readability: 98%Defects: 4.8/100 LOC• Flawless JSDoc & Types• Phantom Abstractions! Missing Concurrency Mutex! Floating Async PromiseCognitive Skim Rate: 3x FasterSuperficial polish masks fatal race conditionHuman PR #398 (alex-dev)Readability: 82%Defects: 0.0/100 LOC• Pragmatic, Compact Code✓ Explicit Mutex Lock✓ Promise Error Catchers• Validated SDK ArgumentsRigorous Defensive DesignSlower review, zero escaped runtime defectsVS
export class AsyncBatchProcessor { // Flawless JSDoc: High performance flush queue public async pushAndFlush(item: Item) { this.buffer.push(item); // Missing lock! if (this.buffer.length >= 100) this.flushBatch(); // Floating promise! } }
STEP 1 OF 6

The Illusion of Code Quality

AI-generated pull requests often look impeccably styled with clean formatting, type annotations, and JSDoc comments. However, this high superficial polish creates a cognitive halo effect that masks subtle structural defects.

Arrow keys to navigate · R to reset

Tap dots to jump to any step

Read the full article →Take the quiz →