andreahlert opened a new pull request, #823: URL: https://github.com/apache/burr/pull/823
## Problem The `Stale Assignments` workflow (`.github/workflows/stale-assignments.yml`) is supposed to warn at 14 days of inactivity and unassign at 21. It **never unassigns**. It measures inactivity from `issue.updated_at`: ```js const updatedAt = new Date(issue.updated_at); const daysSinceUpdate = Math.floor((now - updatedAt) / (1000 * 60 * 60 * 24)); ``` `updated_at` is bumped by **any** change to the issue, including the bot's own warning comment and label edits. So each weekly warn resets the clock, capping `daysSinceUpdate` at the warn interval. The 21-day unassign branch is effectively dead code: the bot warns forever and never removes an assignee. ### Evidence (#400) Bot warning timestamps on #400: | Date | Text | |---|---| | 2026-04-15 | inactive for **17 days** | | 2026-04-29 | inactive for **14 days** | | 2026-06-03 | inactive for **16 days** | | 2026-06-24 | inactive for **20 days** | Apr 15 to Apr 29 is exactly 14 days. An honest counter would have read 31, not 14, the warning comment reset `updated_at`. The assignee was never removed despite four warnings. ## Fix Measure inactivity from the last **human** activity, taking the most recent of: - last non-bot comment (`github-actions[bot]` excluded), - the `assigned` timeline event for a current assignee (so a freshly assigned issue is not instantly stale), - issue creation time (fallback). Bot comments no longer pollute the signal, so the clock accumulates past 14 and the 21-day unassign threshold becomes reachable. The paginated comments are reused for the existing recent-warn spam guard. ## Notes - No behavior change to thresholds (14 warn / 21 unassign) or to the `lifecycle/frozen` exemption. - Security note in the header still holds: only numeric IDs and login names from the API are used; no untrusted input reaches a shell. - Validated locally: YAML parses, embedded script passes `node --check`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
