Skip to content

ReviewSLA: keep standing approvals across drafts; reassign overdue reviews - #50

Merged
willson556 merged 1 commit into
mainfrom
review-sla-standing-approval
Oct 15, 2026
Merged

willson556 merged 1 commit into
mainfrom
review-sla-standing-approval

Conversation

@willson556

@willson556 willson556 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Two reviews on the Review SLA dashboard stayed with thebhef although the PTO calendar has him out Oct 15–16, while the same run reassigned his reviews on StaflSystems/StaflLib#2393 and #2394.

StaflSystems/StaflLib#1870: a standing approval was treated as no response.

  • He approved #1870 on Oct 8 while it was a draft. It was marked ready on Oct 14, and first-response clocks only counted reviews from after that, so he showed as owing a first response due Oct 15.
  • reassign() keeps PRs whose approval stands, so it had nothing to change and returned without a log line.
  • Fix: in clockFor, an approval that still stands counts as a response whenever it was given. A re-request after a push still starts a re-review clock. Comments, and approvals that were since replaced by a change request or dismissed, still don't carry over a draft round-trip.

StaflSystems/stafl-bms2000-template#52: overdue reviews were never reassigned.

  • outBefore() checked the days from today through the due date. For a review overdue since Oct 12, that range is empty.
  • Fix: also check today when the review is already overdue.

Tests:

  • 5 new: 3 clock cases in owed.test.js, and 2 in run.test.js (out today on an overdue review → reassigned; out only before today → left alone).
  • 3 of them fail on the old code: one for #1870's approval, one for the re-review path after a draft round-trip, and one for an overdue review.
  • node --test passes all 109 tests.

The README's Drafts and out-of-office bullets now describe both rules.

🤖 Generated with Claude Code

…views

An approval that still stands now counts as a response even if the PR
went back to draft and ready again afterwards; only a re-request after a
push starts a new clock. StaflLib#1870 showed thebhef owing a first
response there although his approval stood, and reassign() (which
already treats it as standing) then silently skipped it.

An assignee the PTO calendar has out today is now replaced on overdue
reviews too. outBefore() only checked today through the due date, so
an overdue review (template#52) was never reassigned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

willson556 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

@staflsystemsci

staflsystemsci Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review SLA

Nobody owes a review on this PR right now.

Due times are in business hours, 10:00 to 17:00 Pacific: 4 h for a PR under 250 added lines, 7 h otherwise, and 4 h for a re-review. Mid-stack, an assignee owes a response on the lowest PR they haven't approved. Dashboard

willson556 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

Merge activity

  • Oct 15, 8:19 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 15, 8:19 PM UTC: @willson556 merged this pull request with Graphite.

@willson556
willson556 merged commit 1dd9e73 into main Oct 15, 2026
4 checks passed
willson556 added a commit that referenced this pull request Oct 15, 2026
…approved (#51)

When ReviewSLA hands an out-of-office assignee's reviews to someone else, it also requests a review from the new assignee on every PR they take over, even ones they've already approved. On StaflSystems/StaflLib#2393, willson556 approved at 18:18. At 18:40 he replaced thebhef as assignee and got a fresh review request, and he approved again at 18:48.

**Fix:** `reassign()` still makes them assignee, but only requests their review on PRs where they don't already have a standing approval.

**Tests:** 1 new test in `run.test.js`: the new assignee had already approved the bottom PR of a two-PR stack, so only the top PR gets a request. It fails on the old code. `node --test` passes all 110 tests.

Stacked on #50, which adds the standing-approval rules this relies on.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants