[LFXV2-1555] fix: align vote_response FGA tuples with model#30
Merged
bramwelt merged 2 commits intoApr 22, 2026
Conversation
The vote_response FGA model defines only `owner`, `auditor`, and a `vote` reference. The publisher was sending `writer`, `viewer`, and a `project` reference — none of which exist in the model — causing all batch writes to fail. - Change `writer` → `owner` (matches update rule) - Remove `viewer` relation (not in model) - Remove `project` reference (not in model) - Update docs to reflect correct tuples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1555 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
There was a problem hiding this comment.
Pull request overview
Aligns vote_response FGA tuple publishing with the OpenFGA model to stop invalid relation/reference writes that are currently failing in production.
Changes:
- Update vote response access tuple publishing from
writer/viewertoowner, and remove unsupportedviewerandprojecttuples. - Update FGA and event-processing documentation to reflect the correct
vote_responserelations/references. - Fix API contracts documentation to require
owneronvote_response:{vote_response_uid}where applicable.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/infrastructure/eventing/nats_publisher.go | Publishes vote_response access messages using owner and removes unsupported viewer/project tuple emission. |
| docs/fga-contract.md | Updates documented vote_response relations/references and skip condition wording to match the updated publisher behavior. |
| docs/event-processing.md | Updates narrative docs to reflect owner (instead of writer/viewer) for vote response permissions. |
| docs/api-contracts.md | Updates required permission wording for the resend endpoint to owner on vote_response:{vote_response_uid}. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove ProjectUID from skip condition for create/update vote_response FGA tuples - only Username and VoteUID are checked, matching the updated vote_response section. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Issue: LFXV2-1555 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Contributor
Author
Review Feedback AddressedCommit: bed73cd Changes Made
Threads Resolved1 of 1 unresolved threads addressed in this iteration. |
andrest50
approved these changes
Apr 22, 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.
Summary
writer→ownerrelation forvote_response(matches theownercheck in the Heimdall update rule)viewerrelation forvote_response(not defined in the FGA model)projectreference forvote_response(not defined in the FGA model)fga-contract.md,event-processing.md,api-contracts.md) to reflect the correct tuplesRoot cause: The publisher was sending three tuples (
writer,viewer,project) that don't exist in thevote_responseFGA type, causing all batch writes to fail withrelation 'vote_response#...' not founderrors (2,658/24h in production per LFXV2-1555).Valid
vote_responseFGA relations:owner,auditor(computed viavotereference),vote(reference only).Test plan
make buildpassesmake testpassesviewerorprojecttuples published forvote_responsevote_responsedrop to zero🤖 Generated with Claude Code