Skip to content

Fix Bugbot gate contract and rollout docs#1

Merged
thehoegh merged 5 commits into
mainfrom
fix/bugbot-gate-contract
Apr 27, 2026
Merged

Fix Bugbot gate contract and rollout docs#1
thehoegh merged 5 commits into
mainfrom
fix/bugbot-gate-contract

Conversation

@thehoegh

@thehoegh thehoegh commented Apr 27, 2026

Copy link
Copy Markdown
Member

Summary

  • fix the reusable Bugbot Gate workflow to evaluate the latest matching Bugbot check run for a SHA, avoiding stale rerun conclusions
  • align timeout behavior by deriving job timeout from timeout_minutes with a buffer so script-level timeout failures are surfaced consistently
  • sync gate.md and rollout handoff docs with the implemented contract (canonical names, workflow_run.head_sha checkout, downstream check names, and explicit conservative fork guidance)

Test plan

  • review workflow logic in .github/workflows/bugbot-gate.yml to confirm latest-run polling and success-only completion behavior
  • validate timeout expression and workflow syntax consistency (timeout-minutes: ${{ inputs.timeout_minutes + 2 }})
  • cross-check gate.md and docs/bugbot-gate-rollout.md examples to ensure naming and ruleset guidance correspond to emitted checks
  • manual smoke-check recommendation for pilot repo: rerun Bugbot on same SHA and verify the gate follows the newest run

Made with Cursor


Note

Medium Risk
Changes CI gating behavior and required-check naming conventions, which can block PRs or waste minutes if misconfigured. Logic is straightforward but depends on correct check names/timeouts and GitHub Checks API behavior.

Overview
Introduces a shared reusable Bugbot Gate workflow (workflow_call) that polls GitHub Checks for the latest matching Bugbot check run on a provided SHA, failing on non-success conclusions or after a configurable timeout (with job timeout buffered via timeout_minutes + 2).

Adds rollout/hand-off documentation (docs/bugbot-gate-rollout.md and gate.md) that standardizes canonical check/workflow names, shows the thin per-repo caller pattern, and moves expensive CI behind a workflow_run trigger using github.event.workflow_run.head_sha (with explicit fork-safety guidance).

Reviewed by Cursor Bugbot for commit 3d386ab. Bugbot is set up for automated code reviews on this repo. Configure here.

Select the latest matching Bugbot check run before evaluating status, and derive job timeout from the reusable input with a buffer so script-level timeouts surface reliably.

Made-with: Cursor
Synchronize naming and downstream check examples with the implemented gate contract, document workflow_run head_sha checkout requirements, and clarify conservative fork PR expectations for v1 rollout.

Made-with: Cursor
@thehoegh

Copy link
Copy Markdown
Member Author

@cursor review

@thehoegh

Copy link
Copy Markdown
Member Author

@BugBot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cbd04ea. Configure here.

Comment thread .github/workflows/bugbot-gate.yml Outdated
Pass workflow inputs through environment variables and validate required/typed values before use, avoiding direct interpolation into JavaScript literals.

Made-with: Cursor
Document the env/process.env pattern to avoid direct input interpolation in script literals.

Made-with: Cursor
@thehoegh thehoegh merged commit 281b10d into main Apr 27, 2026
1 check passed
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