Skip to content

Refactor reviewer-bot runtime context interface#441

Merged
PLeVasseur merged 1 commit intoSafety-Critical-Rust-Consortium:mainfrom
PLeVasseur:refactor/reviewer-bot-context-interface
Mar 17, 2026
Merged

Refactor reviewer-bot runtime context interface#441
PLeVasseur merged 1 commit intoSafety-Critical-Rust-Consortium:mainfrom
PLeVasseur:refactor/reviewer-bot-context-interface

Conversation

@PLeVasseur
Copy link
Copy Markdown
Collaborator

@PLeVasseur PLeVasseur commented Mar 17, 2026

Summary

  • introduce an explicit runtime context protocol for the core extracted reviewer-bot infrastructure modules
  • type the central infrastructure modules against that protocol instead of relying on a purely implicit bot contract
  • remove one leftover dynamic queue wrapper and add a structural regression test for the context surface

What Changed

  • add scripts/reviewer_bot_lib/context.py with a ReviewerBotContext protocol for the core runtime service surface
  • annotate the core infrastructure modules against that protocol:
    • scripts/reviewer_bot_lib/app.py
    • scripts/reviewer_bot_lib/github_api.py
    • scripts/reviewer_bot_lib/state_store.py
    • scripts/reviewer_bot_lib/lease_lock.py
  • remove the unused sync_members_with_queue_wrapper() dynamic queue helper
  • add a regression test asserting that the main reviewer-bot module satisfies the runtime context protocol

Validation

  • uv run python -m pytest .github/reviewer-bot-tests/test_main.py .github/reviewer-bot-tests/test_reviewer_bot.py
  • uv run ruff check --fix scripts .github/reviewer-bot-tests/test_main.py .github/reviewer-bot-tests/test_reviewer_bot.py

Notes

  • this PR is intended to make the runtime service contract explicit; it should not change reviewer-bot semantics
  • follow-up slices can now narrow the lock/state layer and continue shrinking the facade against an explicit interface

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 17, 2026

Deploy Preview for scrc-coding-guidelines ready!

Name Link
🔨 Latest commit a8dab2f
🔍 Latest deploy log https://app.netlify.com/projects/scrc-coding-guidelines/deploys/69b9a57589e4980008d1bf98
😎 Deploy Preview https://deploy-preview-441--scrc-coding-guidelines.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PLeVasseur PLeVasseur merged commit 078a58d into Safety-Critical-Rust-Consortium:main Mar 17, 2026
16 checks passed
@PLeVasseur PLeVasseur deleted the refactor/reviewer-bot-context-interface branch March 17, 2026 19:05
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.

1 participant