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.
Formal verification for policy module: 2 bugs fixed, 44 Z3 proofs, 100% MC/DC #7932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Formal verification for policy module: 2 bugs fixed, 44 Z3 proofs, 100% MC/DC #7932
Changes from all commits
da0b4a72cbc874a35dd7fab8e990aeebbb58a9d85122b01c2f28168409e4eecb68c1255581e9c19f23dfdd1bebe05fdb3e99845646dcd14934e63d55c6044f8f0002fFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check warning on line 1 in .claude/settings.local.json
undefined Issue
Raw output
Check warning on line 52 in .claude/settings.local.json
security Issue
Raw output
Check failure on line 102 in internal/policy/apply.go
architecture Issue
Raw output
Check warning on line 435 in internal/policy/apply.go
performance Issue
Raw output
To optimize the merge operation, convert the slice of types into a map before the loop for O(1) lookups. This would reduce the overall complexity from O(N*M) to O(N+M). Example for `RestrictedTypes`: ```go // Before line 422 restrictedTypesMap := make(map[string]*graphql.Type, len(r.RestrictedTypes)) for i := range r.RestrictedTypes { restrictedTypesMap[r.RestrictedTypes[i].Name] = &r.RestrictedTypes[i] } for _, rt := range v.RestrictedTypes { if existing, ok := restrictedTypesMap[rt.Name]; ok { existing.Fields = appendIfMissing(existing.Fields, rt.Fields...) } else { newType := rt r.RestrictedTypes = append(r.RestrictedTypes, newType) restrictedTypesMap[newType.Name] = &r.RestrictedTypes[len(r.RestrictedTypes)-1] } } ```Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.