## Lesson — When reviewing PR diffs that add a new return-statement

**Tags:** review-guidance, gca-decline, type-system, interface-contracts, lint-runner

When reviewing PR diffs that add a new return-statement to a function with an existing typed return interface, do not suggest adding fields to the return object based on cross-surface name similarity (e.g., "the manifest tracks `rule_count`" or "the `LintResult` expects `ruleCount`"). Verify the actual TypeScript interface bytes before recommending a field addition. The compiler is the authority: if a field is genuinely required, `tsc` rejects the omission at compile time, and a green test suite on the diff is empirical proof the type is satisfied. Two surfaces with similar names — one a write-side manifest field, one a runtime result type — are not contracts that need to be reconciled inside the result type. Empirical example (mmnto-ai/totem#1832 R1): GCA recommended adding `ruleCount: 0` to a `RunCompiledRulesResult` early-return object on the grounds that `compile-manifest.json` carries `rule_count`. The interface at `run-compiled-rules.ts:36-49` defines five fields (`violations | findings | rules | output | regexTimeouts`); no `ruleCount` field exists, the manifest field is write-side telemetry only, and the count is already exposed via `rules.length`. Decline protocol: cite the interface line range with bytes, point at the type-checker as authority, and capture the rule in `.gemini/styleguide.md` §6 so the same hallucination does not surface on future reviews of the same module.

**Source:** mcp (added at 2026-05-06T00:08:46.825Z)
