Collapse superseded benchmark comments rather than prefixing them - #202
Merged
Conversation
The step already tracked which of its own comments were stale; it just had no way to act on it beyond prepending a warning banner, which left every old result at full height. GitHub's `minimizeComment` mutation with `classifier: OUTDATED` is the real thing -- the comment folds into the collapsed "marked as outdated" state. Listing moves to GraphQL out of necessity, not taste: REST's comment payload omits `isMinimized`, and since minimizing no longer touches the body, that flag is the only remaining idempotency guard. Without it every run would re-minimize the whole history. Neither half may throw. The step exists to post the new result, and losing that to a hiccup in tidying up the old ones would be a poor trade -- so a failed listing or a failed collapse warns and the comment still lands. The likeliest such failure is a token without the scope `minimizeComment` needs. This job declares no `permissions:` block, so it runs on the repository default; if the warning fires, that is where to look. Comments already carrying the old banner keep it, and will be collapsed banner-and-all on the next run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #202 +/- ##
=======================================
Coverage 95.55% 95.55%
=======================================
Files 56 56
Lines 5045 5045
=======================================
Hits 4821 4821
Misses 224 224 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
GitHub can genuinely collapse a superseded comment —
minimizeCommentwithclassifier: OUTDATED— rather than leaving it at full height behind a⚠️banner. The benchmark comment step now does that.
What changed
issues.listCommentsto GraphQL, because REST'scomment payload omits
isMinimized. Minimizing no longer edits the body, sothat flag is the only remaining idempotency guard; without it every run would
re-minimize the entire history.
the new result, and losing that to a hiccup while tidying up the old ones
would be a poor trade.
Worth knowing
⚠️banner keep it, and are not minimized,so the first run under this code collapses them banner and all — one slightly
ugly comment per open PR, then it is clean.
as before.
permissions:block, so its token comes from therepository default.
minimizeCommentneeds write access to the comment; ifthe default proves too narrow, the run log says so and the benchmark comment
still posts.
No
NEWS.md/DESCRIPTIONbump: CI plumbing is not user-visible packagebehaviour.
Companion PRs apply the same change to the other repos carrying this script
(
ms609/Coreset,ms609/TreeTools,ms609/TreeDist).TreeSearch'sagent-benchmark.ymlis dispatch-only and uploads artifacts without commenting,so it needs nothing.
Agent work, filed under @ms609's own account because the
ms609-agentaccountis currently suspended — so it has not had the independent review that
agent-authored PRs normally get.
🤖 Generated with Claude Code