fix: verify scoreboard ownership before mutation - #121
Open
sankalpsthakur wants to merge 4 commits into
Open
Conversation
A stored scoreboard id whose user.login is not the current gh actor 404s on edit; post a fresh kind:scoreboard instead, matching the review-thread guard from TauCetiProject#110.
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.
This PR makes scoreboard publication verify comment ownership before any PATCH or DELETE, preventing a shared ledger or changed
ghidentity from cross-editing another worker's scoreboard or stranding publication on a 404.Scoreboard discovery now returns every marked comment, including outside contributors, and fails closed if the GitHub response is unavailable or incomplete. A stored scoreboard is edited only when its login matches the current actor; otherwise the poster reuses that actor's newest scoreboard, or posts one when none exists. Duplicate cleanup happens only after the replacement scoreboard is confirmed. This completes the scoreboard side of the cross-identity repair begun in #110.
The regression coverage exercises stored and planned foreign IDs, missing comments, outside authors, discovery failure, reuse of an existing scoreboard, failed edits, duplicate cleanup, and the transactional
execute_postpath.python3 -m py_compile runner/*.pyand every script in thetestsworkflow pass. A read-only live lookup against TauCeti#3934 also confirmed that the discovery parser returns its contributor-authored scoreboard.Closes #98
🤖 Prepared with OpenAI Codex