Conversation
…ead nothing BASE=HEAD~1 scans one commit of a multi-commit push and reports the rest as passing; when HEAD~1 does not resolve it degrades to BASE=HEAD, an empty diff and a green job. Resolve to the empty-tree object so the full tree is scanned, and add merge_group so the gate runs in the merge queue. Refs #1747.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_d1c16997-2e82-4411-992b-1c79ddf1dd47) |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 48 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
PR Summary by QodoFix governance-enforce to never pass without scanning (merge_group + empty-tree base)
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
ApprovabilityVerdict: Approved 5e2d08e CI workflow change to fix governance gate that could silently pass without scanning files. Author owns this workflow file. The unresolved comment about empty-tree compatibility is addressed by the explicit version bump to ^0.4.6, which uses two-arg diff form accepting tree objects. You can customize Macroscope's approvability policy. Learn more. |
|
Running ultrareview automatically — This edits the governance-enforce CI gate's diff-base logic and adds a merge-queue trigger, so a subtle error could silently skip scanning and let secrets or hardcoded paths merge.. I'll post findings when complete. |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTo customize comments, go to the Qodo configuration screen, or learn more in the docs. |
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
… fail open Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
| MERGE_BASE_SHA: ${{ github.event.merge_group.base_sha }} | ||
| PUSH_BEFORE_SHA: ${{ github.event.before }} | ||
| run: | | ||
| BASE="${PR_BASE_SHA:-$PUSH_BEFORE_SHA}" | ||
| BASE="${PR_BASE_SHA:-${MERGE_BASE_SHA:-$PUSH_BEFORE_SHA}}" |
There was a problem hiding this comment.
🔍 merge_group base_sha resolvability under the checked-out ref
For merge_group events, checkout runs against the gh-readonly-queue/... ref with fetch-depth: 0, so github.event.merge_group.base_sha should be an ancestor and resolvable by git diff. Worth confirming once in a real merge-queue run: with 0.4.6 now failing closed on git errors, an unresolvable base would hard-fail the required check and stall the queue rather than silently passing.
Was this helpful? React with 👍 or 👎 to provide feedback.
Defect
.github/workflows/governance-enforce.ymlresolved its diff base toHEAD~1, which scans onlyONE commit of a multi-commit push and reports every earlier commit as passing. On an initial push,
force-push, or shallow clone this degrades further:
HEAD~1fails to resolve and falls back toBASE=HEAD, diffing HEAD against itself — an empty diff, zero lines scanned, job green. A gatethat passes without reading any line is worse than no gate.
Changes (targeted,
.github/workflows/governance-enforce.ymlonly)Add a
merge_group:trigger alongsidepull_request:/push:— also clears a latentmerge-queue deadlock (the gate previously never ran in the merge queue).
Add
MERGE_BASE_SHA: ${{ github.event.merge_group.base_sha }}to the env of the step thatcomputes
BASE.Replace the base resolution:
BASE="${PR_BASE_SHA:-$PUSH_BEFORE_SHA}"becomesBASE="${PR_BASE_SHA:-${MERGE_BASE_SHA:-$PUSH_BEFORE_SHA}}", and the indeterminate-basefallback (previously
git rev-parse HEAD~1 2>/dev/null || git rev-parse HEAD) now diffs againstgit's empty-tree object (
git hash-object -t tree /dev/null) so the full tree is scanned —loud (
::warning::) and never a silent empty/partial pass.Raise the enforcer floor to
@wave-av/governance@^0.4.6: 0.4.4/0.4.5 diffed<base>...HEAD(three-dot requires a commit base) inside a fail-open catch, so the empty-tree fallback would
have scanned 0 files and passed; 0.4.6 diffs
<base> HEAD(accepts a tree) and fails closed.wave-av/wave-conferencing-bridge,wave-monitor,wave-desktop, andwave-multivieweralreadycarry the correct form of this file; this brings the same fix to this repo.
Out of scope (tracked separately, claude-workstation#1747)
This repo's gate still has three OTHER open defects tracked in #1747 which are deliberately NOT
addressed here: fail-open token scope, unpinned install scripts, and a caret (
^) version rangeon the
@wave-av/governancedependency.Refs claude-workstation#1747.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is enabled.Note
Cursor Bugbot is generating a summary for commit e5e1636. Configure here.
Note
Fix governance-enforce gate to scan full tree when diff base is indeterminate
merge_groupas a workflow trigger in governance-enforce.yml so the gate runs on merge queue eventsHEAD~1fallback with a diff against the empty-tree object (git hash-object -t tree /dev/null) and emits a workflow warning, ensuring nothing is silently skippedMERGE_BASE_SHAfromgithub.event.merge_group.base_shawith precedence afterPR_BASE_SHAbut beforePUSH_BEFORE_SHA@wave-av/governancefrom^0.4.4to^0.4.6Macroscope summarized 5e2d08e.