Internal Built for the Optidata engineering team

The teammate that lives
in your pull requests

OptiBotinho is a GitHub bot. It reviews every pull request with a panel of AI reviewers, merges the safe ones through its own queue, and keeps issues, releases and the team chat in step with the code.

acme / web
Code Issues 31 Pull requests 12 Actions

Retry webhook deliveries with backoff #5932

Openalex wants to merge 3 commits into dev from 5932-webhook-retries
AL
alex commented 2 minutes ago
Failed webhook deliveries are retried up to five times, with exponential backoff and jitter.Fix: #5910- ENV: WEBHOOK_RETRY_MAX=5
Talknow
OptiBotinhosam mentioned you in acme/web#5932: “@alex nice. Can the retry count show up on the dashboard later?”

Listens to webhooks, works through the tools the team already uses

Every pull request needs a reviewer.
Every reviewer already has a backlog.

A small team ships across dozens of repositories. Dependency bumps wait days for an approval nobody has to think about. Issues sit in the wrong column because no one moved them. Mentions go to an inbox nobody reads during the day. OptiBotinho takes the repetitive part of that loop and leaves the decisions to people.

Code review

A review panel,
not a single opinion.

Every pull request is routed to a review tier. The tier's reviewers run in parallel through the Claude Code and Codex CLIs on a real checkout. A manager then checks their findings against the head commit and publishes one consolidated review.

Review round 2acme/api#218head 9c1e07d
Tier · first match wins
1Sensitiveapp/Http/Middleware/**
2Trivial≤ 5 files and ≤ 200 lines
3Fullcatch-all
Reviewers
claudeSecurityqueued
codexCorrectnessqueued
claudeTestsqueued
Manager
codexManagerwaiting for reviewers
Optibotinho · AI code reviewReview queued
OptiBotinhobotreviewed now
Changes recommended

The retry middleware is sound, but the signature check can leak timing and the empty-payload path has no test.

Review round: 2 · Reviewers: Security Correctness Tests
Findings: High 1 · Low 1
Open (2)
HighCompare signatures in constant timeVerifySignature.php:41
LowNo test for an empty payloadWebhookTest.php
What changed in this pull request
Full report
app/Http/Middleware/VerifySignature.php
40 $expected = hash_hmac('sha256', $body, $secret);
41 if ($signature == $expected) {
High Compare signatures in constant time

== stops at the first different byte. Use hash_equals($expected, $signature).

Tiers by risk

Ordered rules on paths, sizes, labels and repositories pick how hard to look. Sensitive code gets the full panel; a docs typo gets a light one. The last tier always matches.

Real CLIs, real checkouts

Reviewers are Claude Code and Codex sessions with their own prompts and accounts, run by a separate review runtime. Profiles can add a code graph over MCP.

One verified review

The manager drops what it cannot confirm at the head commit, rates the rest from critical to low, and posts inline comments plus a check run. Drafts and empty diffs are skipped.

Review rounds

Round three remembers
round two.

Every push starts a new round at the current head. Findings are fingerprinted against earlier rounds, so the bot does not say the same thing twice, and the thread stays readable after ten pushes.

  • Novel, carried, duplicate, reintroduced. Each finding is labelled against history; duplicates are not posted again.
  • Old overviews fold away. The previous summary collapses to “Superseded by round N”, keeping the findings it had at the time.
  • Approval waits for open threads. A clean round with carried findings still unresolved does not approve.
OptiBotinhoround 1Changes recommended
HighCompare signatures in constant time
LowNo test for an empty payload
Merge queue

Clean pull requests
merge themselves.

Configured rules put every pull request in one of three lanes. lane:auto merges after a clean AI review. lane:assist also needs enough human approval and a delay. lane:human is left to people. The queue automates; it does not enforce, so anyone can still merge by hand.

Merge queueacmeautomate0 merged today
lane:autoAI review only
acme/web#5941evaluating
chore(deps): bump axios from 1.7.4 to 1.7.7
dependabotAI review: skip
acme/chat#140evaluating
Release: dev → main
version PRmerge commit
lane:assistAI review + approval score
acme/web#5926waiting
feat: CSV export for monthly reports
✓ AI review cleanscore 1 / 2delay 10 min
acme/mobile#87reviewing
fix: keep the session after a token refresh
⠋ AI review
lane:humana person decides
acme/api#219blocked
feat: new billing schema
blocked_by_label: WIPmigration
Merge attempts

Score, not count

Approvals are weighed by a score per GitHub user, with boosts per repository. The author's own approval never counts toward the threshold.

Rechecked before every merge

Head and base SHAs, mergeability, labels and kill switches are read again right before the merge call. Every attempt is recorded: merged, conflict, stale, blocked or merged by a person.

People keep the last word

lane:human is never removed, a WIP label holds the queue, and audited overrides can merge now, hold, force a lane or change the delay.

Webhook deliveries are lost on 502 #5910

Openacme/web · milestone Faster checkout
AL
alex commented yesterday
The same bug shows up in the API and the mobile app.
AL
Comment
Commands

Mention it.
It answers.

Write @OptiBotinho and a command in any issue or pull request. The bot reacts with 👀 so you know it heard, does the work, and replies in the thread. Anything that is not a command gets an AI answer.

  • Pull requests. write drafts the title and body, review queues a review at the current head, approve approves.
  • Across repositories. clone an issue everywhere it applies; create, delete or copy labels and milestones in one comment.
  • Reports. Milestone progress, releases, team contributions and the project board, on request.
Workflow

Issues move
when the code moves.

Opening a pull request puts its issue in In review. Merging into dev moves it to To deploy; merging into main moves it to Testing and tells the assignee. Marks in the pull request body label the issue and end up in the release notes.

In progress 6
In review 9
To deploy 4
Testing 3
#5910AL
Webhook deliveries are lost on 502
Pull request body
Retries failed deliveries with backoff.

Fix: #5910
- ENV: WEBHOOK_RETRY_MAX=5
- MI:
Activity
v2026.11.06.1400Latest
Environment variablesWEBHOOK_RETRY_MAX=5

Status follows the branch

A Fix: #5910 line in the pull request body is all it takes. Nobody drags the card, and nobody forgets to.

Marks that travel

ENV:, FF: and MI: lines add has:env, has:feature-flag and has:migration. When a release is published, the envs and flags from its commits are added to the release body.

A board report, in working hours

On working days the bot posts how many items sit in each column, at a minimum interval, and warns when In review piles up. Nothing is posted at night or on weekends.

Chat

Mentions reach people
where they read.

A GitHub @mention becomes one more notification that is easy to miss. OptiBotinho also sends it as a direct message in the team chat, using a map from GitHub logins to chat users.

  • Every place a mention can hide. Pull request descriptions, conversation comments, review bodies and line comments.
  • Ready for testing. When issues reach Testing, assignees get one message per batch, not one per issue.
  • Never in the way. Messages go out from a queue, exactly once; a slow chat never delays the rest of the webhook.
Talk
OptiBotinhoDirect message
#
dev-newsTeam channel
OptiBotinho
Production errors

One cause.
One issue.

Laravel Nightwatch reports exceptions per application, so a Redis restart seen by ten apps is ten reports. OptiBotinho classifies each one before filing anything, fingerprints the cause, and links repeats to the issue that already tracks it.

Nightwatch webhooksissue.opened
GitHub issues

Four categories

Application errors go to the repository that saw them. Infrastructure and external dependency failures go to the platform repository. The monitoring agent's own noise is dropped.

Fingerprinted causes

Messages are normalised before matching, so the same failure with a different id, path or timestamp joins the open issue as a comment.

Triage, then follow-up

A triage dashboard tracks reports by category and cause. Resolving or ignoring an error in Nightwatch closes the GitHub issue, and a backfill command sorts out the issues filed before triage existed.

Also running the back office.

A web app behind GitHub sign-in, with page-level permissions, for the parts of the job that are not a pull request.

stage.db.password••••••••••L2
smtp.relay••••••••L1
TOTP48102

Vault

Team secrets, each with a clearance level. Revealing one takes a TOTP code and a ten-minute token. Entries above your level look exactly like missing ones.

Confirm the code shown in your terminal
WDJB-MJHT
Approve device

CLI sign-in

A device-code flow signs the team CLI in through GitHub. From there it uploads screenshots for PRs, messages teammates, reads the vault and triggers redeploys.

GET /api/bastion/allowlist?env=stage
[
  { "username": "alex",
    "keys": ["ssh-ed25519 AAAA…"] },
  { "username": "sam", "keys": [] }
]

SSH bastion allow-list

Bastions pull who may connect, with each person's public keys from GitHub. Production access is a separate grant.

claude62%
codex41%
Reviewer · this month$1,284API-equivalent

Spending

Every review run records its tokens and an API-equivalent cost. Subscription accounts show how much of their usage window is left.

coder-bot2 jobs · 1.2M tokens
qa-bot5 testers
docs-botstale

AI agents

The team's other bots push snapshots and events. One page shows what each agent is doing, its jobs and its token use.

Dashboards

Pull requests, issues, commits, reviews, releases, weekly test coverage and a contributor ranking, across every registered repository.

TODOretry on 429 too
FIXMEN+1 in report export
HACKskip tz for legacy rows

Tech debt

@OptiBotinho scan-todos stores TODO, FIXME and HACK comments as tech debt. Any of them becomes an issue in one click.

feature_csv_export80%
feature_new_editor35%
feature_dark_mode100%

Feature flags

An inventory of the flags found in the code, plus their state per tenant, so you can see who has a feature on before you remove it.

✓workspaceready
✓cli-auth:codex:default
✕cli-auth:claude:reviewerlogged out
Runtime alert sent

Watches itself

Preflight checks prove each reviewer CLI is still logged in, and a lost session raises an alert instead of quietly dropping a reviewer. The database is replicated continuously.

Let the bot take the queue.

OptiBotinho is built with Laravel and PHP for the Optidata engineering team, with the Claude Code and Codex CLIs doing the reviewing.