feat(rpl): add item-pattern matching and Send/Sync variance predicates - #125
Draft
jellllly420 wants to merge 11 commits into
Draft
jellllly420 wants to merge 11 commits into
jellllly420 wants to merge 11 commits into
Conversation
Parse and lower ADT metavariables, item wildcards, impl bindings, bundle guards, and explicit trait paths while preserving legacy function-pattern behavior. Co-authored-by: GPT-5.6 <codex@openai.com>
Preserve and display trailing item-pattern where blocks in generated pattern documentation. Co-authored-by: GPT-5.6 <codex@openai.com>
Match explicit positive unsafe trait impls by resolved DefId, evaluate temporary true/false guards, follow local reexports, and cover Send, Sync, and custom traits with focused UI fixtures. Co-authored-by: GPT-5.6 <codex@openai.com>
Register the five generic-wrapper Send predicates with input/output signatures and statically validate item-guard arity, sorts, binding order, disjunctions, and closed negation. Co-authored-by: GPT-5.6 <codex@openai.com>
Execute item guards as correlated relational rows, preserve incomplete results through closed negation, and provide initial implementations of the five generic-wrapper Send predicates with focused positive and negative UI coverage. Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
Co-authored-by: GPT-5.6 <codex@openai.com>
Register has_attr so stricter function where-clause validation accepts the predicate added on master. Cover the integration with a dedicated metadata regression test. Co-authored-by: GPT-6 <codex@openai.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.
Summary
Add a framework-level foundation for Rudra-inspired Send/Sync bug detection using composable predicates over Rust program properties, rather than a dedicated Rudra checker.
has_attrpredicate for the stricter where-clause validation and cover the integration with a regression test.The example detection patterns currently live in UI fixtures; this does not enable new default built-in lints. The work is split into eleven commits and rebased onto master at
6fb8514.Example enabled by this change
The Sync examples separately check exclusive resource access requiring Send and concurrent resource access requiring Sync, correlating each trait query with its own access context.
Current precision / draft scope
The predicate evaluators are initial approximations, not a sound or complete Send/Sync analysis:
Rudra fixture expectations intentionally reflect these predicate semantics, not identical diagnostic output from Rudra.
Validation
On macOS/aarch64 after the rebase (subsequent changes only corrected commit attribution):
has_attrregression passed.cargo clippy --workspace -- -D warningsand Clippy for the new regression test passed.cargo fmt --all -- --check,python3 scripts/check_rpl_patterns.py, andgit diff --checkpassed.Outstanding smoke-test caveat: lintcheck's third-party
cc 1.0.67run was stopped after 5m38s at approximately 100% CPU. A process sample located the time in unchanged upstream MIR interblock dependency-graph construction. That smoke check remains unverified; lintcheck's harness returns success even when a checked crate fails, so its exit status alone is not treated as a clean result. Cache-related failures were also observed during the initial smoke runs.Earlier implementation commits are attributed to GPT-5.6; the rebase compatibility fix is attributed to GPT-6.
Generated by Codex (GPT-6) on behalf of @jellllly420