Skip to content

review-rigor: R12 — verify a fix against the API's real failure behavior - #277

Open
ClintonSarkar wants to merge 1 commit into
benitogf:mainfrom
ClintonSarkar:grow/verify-fix-against-api-ground-truth
Open

review-rigor: R12 — verify a fix against the API's real failure behavior#277
ClintonSarkar wants to merge 1 commit into
benitogf:mainfrom
ClintonSarkar:grow/verify-fix-against-api-ground-truth

Conversation

@ClintonSarkar

Copy link
Copy Markdown
Contributor

What

Adds R12 to the shared review-rigor mandatory checks (docs/core/review-rigor.md): when a change's correctness depends on how an external/framework/library API behaves — especially whether it reports a failure — verify against the API's actual behavior or source, not its name/signature, and require the test to drive the real failure mode (or read the achieved effect back) rather than a self-authored debug seam that models the author's assumption.

Why

A review pass cleared a write-integrity fix that gated on a write helper's success return plus its get_error() — but the framework's buffered FileAccess discards the flush error, so both read clean while the bytes never reached disk. The fix shipped the corruption it meant to stop. Its test passed because it forced the failure through a debug hook the change itself introduced — testing the author's model of the failure, not the API. The real failure (a RLIMIT_FSIZE=0 write) went undetected until a reviewer reproduced it against production code. The durable fix was to read the closed file back and compare; R12 encodes that as a check.

The rule generalizes past that incident to the class: any fix whose correctness turns on an external API's failure signal (write/flush/close/network err/get_error()/errno), and any test that arms the failure through a mock/seam the change introduced with no real-resource or read-back check.

📚 Learned by detritus — grow `godot-idx#184 review round 2`

…ehavior

A fix whose correctness depends on whether an external/framework API reports a
failure must be verified against that API's actual behavior or source, not its
name or signature. A buffered write helper can return success and read a clean
error while the bytes never persisted; a fix gating on that signal still ships
the corruption. Sharpened for the case where the change's own debug seam forces
the failure — that tests the author's model, not the API — so R12 requires the
real failure mode (a genuine resource limit) or a direct read-back of the
achieved effect.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant