Skip to content

feat(github): wire review cooldown into command handler#1834

Merged
atoomic merged 2 commits into
Anantys-oss:mainfrom
BabyKoan:koan.atoomic/review-cooldown-wiring
Jun 9, 2026
Merged

feat(github): wire review cooldown into command handler#1834
atoomic merged 2 commits into
Anantys-oss:mainfrom
BabyKoan:koan.atoomic/review-cooldown-wiring

Conversation

@BabyKoan

@BabyKoan BabyKoan commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

What: Wire the review cooldown tracker into the GitHub command handler so queued reviews record a 30-minute cooldown window.

Why: Prevents the review_requested → review → rebase → new SHA → re-review feedback loop by adding a belt-and-suspenders guard alongside the head-SHA thread tracker.

How:

  • checks before queuing a mission, and calls after queuing.
  • calls after queuing a mission from an @mention.
  • Removed the TODO from since it's now wired.

Testing:

  • 4 new tests: cooldown blocks assignment re-review, cooldown set after assignment review, non-review assignments skip cooldown, @mention sets cooldown.
  • 15865 tests pass, ruff clean.

Quality Report

Changes: 4 files changed, 157 insertions(+), 10 deletions(-)

Code scan: clean

Tests: passed (403
tests)

Branch hygiene: clean

Generated by Kōan

@Koan-Bot Koan-Bot self-requested a review June 9, 2026 03:34
@atoomic atoomic self-assigned this Jun 9, 2026
Comment thread koan/.branch-cleanup-tracker.json Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to remove that file and ignore it from .github if not already the case

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add .branch-cleanup-tracker.json to .gitignore. File tracks local cleanup timestamps, should not be versioned. Check if .github/ references it and remove if present.

@BabyKoan

BabyKoan commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

PR Review — feat(github): wire review cooldown into command handler

Solid implementation of review cooldown wiring. One consistency issue to fix.

  • Cooldown check correctly placed BEFORE queuing review missions
  • Cooldown correctly set AFTER queuing
  • Test coverage comprehensive (4 new tests)
  • Import style inconsistent between two functions


Checklist

  • No hardcoded secrets
  • Input validation at boundaries
  • Error handling
  • Test coverage for new code paths
  • Consistent code style — warning #1

Automated review by Kōan (Ollama-launch · model qwen3.5:cloud) HEAD=9775478 43s

@atoomic atoomic marked this pull request as ready for review June 9, 2026 04:46
Koan-Bot added 2 commits June 8, 2026 22:48
Wire github_notification_tracker review cooldown into the command handler:

- In _try_assignment_notification (review_requested path):
  - Check is_review_on_cooldown before queuing a review mission
  - Call set_review_cooldown after successfully queuing

- In process_single_notification (@mention /review path):
  - Call set_review_cooldown after successfully queuing a review mission

- Remove TODO from set_review_cooldown since it's now wired

- Add tests covering cooldown skip, cooldown set, and non-review
  assignments not touching the cooldown tracker

Belt-and-suspenders guard: the head-SHA thread tracker is the primary
re-review dedup; the cooldown catches cases where a new notification
slips through with the same head SHA within the 30-minute window.
@BabyKoan

BabyKoan commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator Author

Rebase with requested adjustments

Branch koan.atoomic/review-cooldown-wiring was rebased onto main and review feedback was applied.

Changes applied

  • Changes applied:
  • git rm --cached koan/.branch-cleanup-tracker.json — stops versioning local state file per @atoomic / @BabyKoan request. .gitignore already ignores it; .github/ had no references.
  • Combined two local github_notification_tracker imports in process_single_notification into single import line (set_review_cooldown, track_comment) per automated review style warning. Eliminates inline import inside if block, matching _try_assignment_notification pattern.

Stats

4 files changed, 156 insertions(+), 15 deletions(-)
Actions performed
  • Already-solved check: skipped (Claude call failed)
  • Rebased koan.atoomic/review-cooldown-wiring onto upstream/main
  • Applied review feedback
  • Pre-push CI check: previous run passed
  • Force-pushed koan.atoomic/review-cooldown-wiring to origin
  • CI check enqueued in ## CI (async)

CI status

CI will be checked asynchronously.


Automated by Kōan

@BabyKoan BabyKoan force-pushed the koan.atoomic/review-cooldown-wiring branch from 9775478 to 43e5e04 Compare June 9, 2026 04:49
@atoomic atoomic merged commit 70d0a93 into Anantys-oss:main Jun 9, 2026
5 checks passed
@BabyKoan BabyKoan deleted the koan.atoomic/review-cooldown-wiring branch June 10, 2026 01:17
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