Skip to content

ci: replace actions/stale with bot-aware mark-stale script#6477

Merged
brtnfld merged 2 commits into
HDFGroup:developfrom
brtnfld:fix/stale-meaningful-activity
Jun 23, 2026
Merged

ci: replace actions/stale with bot-aware mark-stale script#6477
brtnfld merged 2 commits into
HDFGroup:developfrom
brtnfld:fix/stale-meaningful-activity

Conversation

@brtnfld

@brtnfld brtnfld commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • actions/stale uses updatedAt to measure inactivity, so any bot event resets the stale countdown even with no meaningful human engagement. PR Add test for H5VLget_wrap_ctx API #6332 had its last human activity on 2026-04-02 but was never flagged because a /remove-reviewer bot comment on 2026-06-11 refreshed updatedAt.
  • Replaces the actions/stale step with a custom mark-stale.js script (same pattern as the existing alert-stale.js) that only counts non-bot comments, non-bot review submissions, and commits as meaningful activity.
  • Also removes the stale label if meaningful human activity occurs after the label was applied, replicating actions/stale's remove-stale-when-updated behavior — but bot-aware.

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Review Checklist

This PR touches the following areas. Each needs a sign-off
from its listed owners before merging.

✅ All areas have been signed off.

brtnfld added 2 commits June 22, 2026 09:18
actions/stale uses updatedAt to measure inactivity, so any bot event
(e.g. the /remove-reviewer acknowledgment comment) resets the stale
countdown even when there has been no meaningful human activity for
months.  PR HDFGroup#6332 was last touched by a human on 2026-04-02 but was
not flagged because a reviewer-removal on 2026-06-11 refreshed the
timestamp.

Replace the actions/stale step with a custom mark-stale.js script
(same pattern as alert-stale.js) that only counts non-bot comments,
non-bot review submissions, and commits as meaningful activity.  The
script also removes the stale label if such activity occurs after the
label was applied.
Two bugs with the keepalive checkbox on draft-stale PRs:

1. External contributors (fork authors) lack write access to edit the
   bot's comment, so clicking the checkbox silently fails for them.
   Fix: also treat a new non-bot comment posted after the keepalive
   comment as a sufficient keepalive signal.

2. The stale label could take up to 24 hours to be removed (daily cron
   only). Fix: add an issue_comment.created trigger so draft-pr-policy
   fires immediately when someone comments on a stale draft PR.
   mark-stale and alert-stale are guarded to only run on
   schedule/workflow_dispatch, not on every comment.

Also fix lastRealActivityAt to exclude bot comments (matching
mark-stale.js), so the keepalive and "Thanks for confirming" bot
comments don't count as real activity when measuring staleness.
@brtnfld brtnfld force-pushed the fix/stale-meaningful-activity branch from a6195ba to 31c4924 Compare June 22, 2026 14:19
@brtnfld brtnfld merged commit 884ce02 into HDFGroup:develop Jun 23, 2026
133 checks passed
@github-project-automation github-project-automation Bot moved this from To be triaged to Done in HDF5 - TRIAGE & TRACK Jun 23, 2026
@brtnfld brtnfld deleted the fix/stale-meaningful-activity branch June 23, 2026 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants