chore: mark methods in Protocol definitions as abstract#138
Merged
QuantumGhost merged 9 commits intoMay 18, 2026
Conversation
Assisted-By: Codex:GPT-5.5
Assisted-By: Codex:GPT-5.5
Exclude static type contract modules from published distributions and document their development-only role. Add tests that ensure Protocol methods remain abstract enough to reject indirect nominal implementations without overrides. Assisted-by: Codex:GPT-5.4
Replace the hand-maintained Protocol list with AST-based discovery over graphon modules so new Protocol definitions are automatically covered. Assisted-by: Codex:GPT-5.4
This comment was marked as outdated.
This comment was marked as outdated.
Remove type contract files where the implementation already subclasses the Protocol directly, and document that type contracts are intended for structural implementations. Assisted-by: Codex:GPT-5.4
Contributor
Author
|
Adjusted the static type contract scope based on review feedback. Changes:
Validation:
|
This comment was marked as outdated.
This comment was marked as outdated.
3 tasks
Keep the Protocol contract test focused on member abstractness, document the non-empty member guard, and remove direct/indirect instantiation checks. Assisted-by: Codex:GPT-5.4
This comment was marked as outdated.
This comment was marked as outdated.
Protocol definitions as abstract
@WH-2099 suggests removing static assertions as this is unnecessary.
a002a86 to
0ac7db1
Compare
laipz8200
approved these changes
May 18, 2026
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.
AI disclosure: This PR was primarily drafted with Codex using GPT-5.5.
I have reviewed and edited the final diff, and I am responsible for the content.
Important
!Related Issue
Closes #136
Summary
This PR hardens protocol contracts by:
Changes included:
Validation performed:
make checkuv run pytestuv build --out-dir /tmp/graphon-dist.FoJno3Checklist
!