Merged
Conversation
Introduces on-call rotation management for @core-team members: - Slash commands: list, me, switch, skip, unavailable (via /nf-core on-call) - Background scheduler: auto-extends roster, sends reminders (assignment, week-before, daily at user's local 8am), posts #core announcements - Round-robin assignment with skip queue priority and unavailability tracking - DynamoDB operations for roster, round-robin state, unavailability, reminders Includes simplification pass: deduplicated ddb_table test fixture into conftest.py, extracted add_to_queue_front helper, parallelized independent API/DB calls, added date pre-filtering in reminder loop, cached tz lookups. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- All on-call commands now require @core-team membership (checked centrally in _route_oncall before dispatching) - ack() called once in the router; individual handlers no longer receive or call ack - New 'on-call reboot' command wipes schedule and rebuilds from scratch (useful for initial deployment and membership changes) - Updated CLAUDE.md with on-call architecture, key patterns, and command documentation - Updated help text to mark all on-call commands as admin-only
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.
Summary
/nf-core on-callslash commands, backed by the existing DynamoDB table@core-teammembers (permission checked centrally in the router)#core@core-teamusergroup membership — no separate member list to maintainadmin.py:669that was failing CI onmainCommands
All commands require
@core-teammembership.on-call liston-call meon-call switch [YYYY-MM-DD]on-call skipon-call unavailable <start> <end>on-call rebootNew files
src/nf_core_bot/db/oncall.py— DynamoDB CRUD (roster, round-robin state, unavailability, reminder tracking)src/nf_core_bot/commands/oncall/— 6 command handlers + shared helperssrc/nf_core_bot/scheduler/oncall_jobs.py— Background scheduler (roster extension, reminders, cleanup)tests/test_oncall_db.py,tests/test_oncall_commands.py,tests/test_oncall_scheduler.py— 84 new testsModified files
app.pyrouter.pyon-callsubcommands;ack()+is_core_team()checked centrally before dispatchhelp.pyadmin.pyorg_listsslice)CLAUDE.mdDynamoDB key patterns
ONCALL#<YYYY-MM-DD>ROSTERONCALL_METAROUND_ROBINONCALL_METAREMINDERS#<YYYY-MM-DD>ONCALL_UNAVAIL#<user_id><start>#<end>Architecture notes
@core-teammembership check in_route_oncall().ack()called once centrally; handlers do not receiveack.asynciotask (60s loop). Monday jobs (roster extension, cleanup) fire once per week via_last_weekly_runguard. Daily reminders respect user Slack timezone.last_assigneddate.queue_frontlist gives priority to people who previously skipped. When all members exhausted, cycles through again.Quality