Rust guard: honor GraphQL authorAssociation in project items - #9697
Merged
Conversation
Copilot
AI
changed the title
[WIP] Update Rust Guard to use get_author_association consistently
Rust guard: honor GraphQL authorAssociation in project items
Jul 20, 2026
lpcox
marked this pull request as ready for review
July 20, 2026 15:00
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes #9687 by correctly deriving project-item integrity from both REST and GraphQL author-association fields.
Changes:
- Uses the cross-API
get_author_associationhelper. - Centralizes remaining
"login"field lookups. - Adds focused GraphQL project-item coverage.
Show a summary per file
| File | Description |
|---|---|
response_paths.rs |
Handles camelCase GraphQL associations and adds a regression test. |
helpers.rs |
Uses the centralized login constant. |
backend.rs |
Uses the centralized login constant. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Medium
This was referenced Jul 20, 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.
Project-item integrity labeling in the Rust guard handled REST-style
author_associationbut missed GraphQLauthorAssociation, causing GraphQL-backedlist_project_items/projects_listitems to lose association-derived integrity labels. This change aligns project-item labeling with the existing cross-API helper and finishes the remainingloginfield-name centralization.Project item integrity labeling
get_str_or(..., "author_association", "")lookup inresponse_paths.rswithget_author_association(...).Field-name centralization
"login"lookups withfield_names::LOGINin:labels/helpers.rslabels/backend.rsCoverage for GraphQL payloads
content.authorAssociationreceives the expected association-derived integrity label.Example of the core change: