docs: test the broken contract at the lowest reachable layer - #306
Merged
Conversation
.brainrot fixtures are for language-visible behavior. Internal APIs with no Brainrot-level caller (arena_reset() is the example) need a host-side C test under ASan/UBSan, wired into make test. If the harness cannot reach the behavior, extend it rather than skipping the test.
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.
Description
Follow-up to #305. The first version of the tests policy said that if you cannot show the bug in a
test_cases/*.brainrotprogram, you have not proven the fix. That is too narrow.arena_reset()is the counterexample: it has no Brainrot-level caller, so a.brainrotfixture cannot exercise the broken contract. The review on #304 already said the proper regression is a host-side C test that calls the arena API directly under ASan/UBSan, wired intomake testthe same way astests/abi/struct_layout_abi_check.c.The rule is now:
test_cases/*.brainrotfor language-visible behavior.make test.The PR checklist is updated to match. This PR is docs-only (
CONTRIBUTING.mdand.github/PULL_REQUEST_TEMPLATE.md).Related Issue
N/A — policy correction after #305. Related discussion: #304 / #286 (
arena_reset()).Type of Change
Checklist
test_cases/*.brainrotfor language-visible behavior; a host-side C test wired intomake testfor internal APIs Brainrot source cannot reach). Required for every bug fix, feature, refactor, performance change, and breaking change — not optional, not "if applicable". See CONTRIBUTING.md ("TESTS ARE MANDATORY").make format-checklocally (ormake formatto fix)Docs-only: no interpreter or harness change, so there is nothing for
test_cases/or a host-side C test to prove.