review-rigor: R12 — verify a fix against the API's real failure behavior - #277
Open
ClintonSarkar wants to merge 1 commit into
Open
review-rigor: R12 — verify a fix against the API's real failure behavior#277ClintonSarkar wants to merge 1 commit into
ClintonSarkar wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 bufferedFileAccessdiscards 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 (aRLIMIT_FSIZE=0write) 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`