fix: use last_edited_at instead of updated_at for post-merge edit detection#373
Closed
Grizouforever wants to merge 1 commit intoentrius:mainfrom
Closed
fix: use last_edited_at instead of updated_at for post-merge edit detection#373Grizouforever wants to merge 1 commit intoentrius:mainfrom
Grizouforever wants to merge 1 commit intoentrius:mainfrom
Conversation
…ection The anti-gaming check uses issue.updated_at > pr.merged_at to detect edits after merge. However, GitHub's updatedAt reflects any activity (comments, labels, closing event), not just content edits. Since the closing event always updates updatedAt to >= merged_at, this check incorrectly penalizes nearly all legitimately solved issues. Use issue.last_edited_at (from GitHub's lastEditedAt field) which specifically tracks body/title edits. The Issue class already has this field populated. Fixes entrius#372
ClawdiaHedgehog
pushed a commit
to ClawdiaHedgehog/gittensor
that referenced
this pull request
Apr 11, 2026
…ection Bug: Issue discovery was penalizing nearly all legitimately solved issues because GitHub's updatedAt field is updated by ANY issue activity (including the closing event itself), not just body/title edits. Fix: - Added last_edited_at field to Issue class (populated from GitHub's lastEditedAt) - Added lastEditedAt to _PR_TIMELINE_QUERY GraphQL query - Updated _search_issue_referencing_prs_graphql to capture and return lastEditedAt - Updated find_solver_from_cross_references to return last_edited_at as 3rd value - Updated repo_scan.py to pass last_edited_at to Issue objects - Updated scoring.py anti-gaming check to use last_edited_at (with updated_at fallback) Now the anti-gaming check correctly identifies actual post-merge body/title edits rather than conflating them with the issue closing event. Fixes entrius#372 Fixes entrius#373
Author
|
Hi! This PR is ready for review — 259 tests pass locally. Happy to make any changes if needed. Thanks! |
Author
|
Closing — duplicate of #375. Apologies for the overlap. |
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
Fixes #372
The anti-gaming post-merge edit detection in issue discovery scoring uses
issue.updated_at > pr.merged_at. However, GitHub'supdatedAtreflects any activity on the issue (comments, label changes, and the closing event itself), not just content edits. Since closing an issue always updatesupdatedAtto >=merged_at, this check incorrectly penalizes nearly all legitimately solved issues by reclassifying them fromsolved_counttoclosed_count.Changes
gittensor/validator/issue_discovery/scoring.py: Replaceissue.updated_atwithissue.last_edited_atin the post-merge edit check (line 240). TheIssueclass already haslast_edited_atpopulated from GitHub'slastEditedAtGraphQL field, which specifically tracks body/title edits by the author.Impact
Prevents legitimate issue discoveries from being incorrectly penalized. Without this fix, the anti-gaming check fires on nearly every solved issue because the closing event updates
updatedAt.