fix(meta): suppress issue links for dependency promotions - #2862
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 55 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: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughDependency-repair promotion metadata is trusted only with both required labels. Trusted metadata suppresses incidental issue routing and sets Dependabot context. Untrusted metadata preserves GitHub issue classification. The policy documentation and tests reflect this behavior. ChangesDependency-repair source context
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
Workflow source neededPR #2862 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely. Please do one of:
Once a valid source is present, this warning will not be reposted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b851d1366e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Automated Status SummaryHead SHA: 3a782fe
Coverage Overview
Updated automatically; will refresh on subsequent CI/Docker completions. Keepalive checklistScopeNo scope information available Tasks
Acceptance criteria
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/scripts/__tests__/source-context.test.js:
- Around line 197-217: Extend the dependency-repair promotion marker tests with
a format-valid but forged or mismatched marker alongside “Fixes `#99`”, and assert
that both resolver copies keep the issue route active rather than treating it as
Dependabot promotion metadata. Reuse the existing marker structure and verify
the resulting source context preserves issueNumber 99 and requiresIssue true.
In @.github/scripts/source_context.js:
- Around line 384-387: The issue is that untrusted dependency-repair promotion
markers can override issue routing. In both
.github/scripts/source_context.js:384-387 and
templates/consumer-repo/.github/scripts/source_context.js:384-387, require
trusted PR and commit validation before assigning issueNumber from
dependencyRepairPromotion; update both copies identically. In
.github/scripts/__tests__/source-context.test.js:197-217, add coverage for a
forged marker and verify Fixes `#99` remains routed through issue synchronization.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: f2c41c0e-8f74-4715-a0e1-bb2b266e52e3
📒 Files selected for processing (3)
.github/scripts/__tests__/source-context.test.js.github/scripts/source_context.jstemplates/consumer-repo/.github/scripts/source_context.js
There was a problem hiding this comment.
Pull request overview
This PR adjusts PR source-context resolution so that dependency-repair promotion provenance (marker + promotion labels) overrides incidental Fixes #... references, preventing unintended issue-body synchronization while keeping issue routing intact for untrusted markers.
Changes:
- Treat dependency-repair promotion markers as authoritative only when paired with both
dependency:repair-promotionandworkflow:source-dependabotlabels. - Suppress extracted issue numbers (
Fixes #..., title/branch/body references, etc.) when the promotion is trusted, so routing stays on the dependency path. - Update ops documentation and add regression tests covering incidental issue references and untrusted markers.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
templates/consumer-repo/.github/scripts/source_context.js |
Mirrors the source-context trust model update in the consumer template copy. |
docs/ops/DEPENDENCY_REPAIR_PROMOTION.md |
Documents that the promotion marker is only trusted alongside both promotion labels. |
.github/scripts/source_context.js |
Implements trusted-promotion gating and suppresses incidental issue routing for promotions. |
.github/scripts/__tests__/source-context.test.js |
Adds/updates tests for trusted promotion behavior vs untrusted marker behavior. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/scripts/__tests__/source-context.test.js:
- Around line 227-247: Extend the test for resolvePrSourceContext to assert that
the untrusted promotion marker falls back to the issue reference sourceRef value
"`#99`", rather than "dependency-pr:`#2795`". Keep the existing sourceType,
issueNumber, and requiresIssue assertions unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 960e885b-f7f3-49e0-a9f1-cdec45986550
📒 Files selected for processing (4)
.github/scripts/__tests__/source-context.test.js.github/scripts/source_context.jsdocs/ops/DEPENDENCY_REPAIR_PROMOTION.mdtemplates/consumer-repo/.github/scripts/source_context.js
Provider Comparison ReportProvider Summary
📋 Full Provider Details (click to expand)openai
anthropic
Agreement
Disagreement
Unique Insights
🔍 LangSmith Traces |
…rkers The #2862 verifier comparison flagged that promotion trust was only exercised for the both-labels and no-labels paths, so a weakened gate could suppress issue routing undetected. Adds partial-label, mismatched payload, and root/consumer-template parity coverage.
…rkers (#2866) * test(source-context): cover partial-label and mismatched promotion markers The #2862 verifier comparison flagged that promotion trust was only exercised for the both-labels and no-labels paths, so a weakened gate could suppress issue routing undetected. Adds partial-label, mismatched payload, and root/consumer-template parity coverage. * test: cover source context review cases --------- Co-authored-by: Codex Automation <codex-automation@users.noreply.github.com>
Closer verifier disposition — openai
|
…context (#2872) `Health 45 Agents Guard / guard` cannot be a required status check. It is a commit status posted by agents-guard.yml only inside the "Report agents guard commit status" step, whose condition is `always() && steps.eligibility.outputs.should-run == 'true'`, and eligibility requires one of the agent labels (agent:codex, agents:auto-pilot, ...). On any PR without such a label the status is never posted, and a required check that never reports leaves the PR permanently un-mergeable. Verified absent on the heads of all 12 most recent PRs (#2850-#2862), where the only statuses are `Gate / gate` and `CodeRabbit`. This was not merely theoretical: health-44 passes .github/config/required-contexts.json to `enforce_gate_branch_protection.py --apply` on workflow_dispatch/workflow_call whenever an enforcement token is present, so dispatching that workflow today would have added the context and frozen every non-agent PR in the repo. Remove it from the required-contexts set (shared config, the tool's DEFAULT_CONTEXTS, both health-40 invocations) and record why in the config so it is not re-added. `Gate / gate` remains required-worthy: it is posted on every PR by pr-00-gate.yml and passes on all 12 most recent PRs. agents-guard.yml still posts its status; it is simply informational rather than gating. Also give health-40's "Root allowlist guard" `if: always()`. Steps run sequentially, so the failing branch-protection snapshot step was skipping it — which is how six unlisted repo-root files accumulated unseen for a month. Refs #2858. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Closes #2865
Summary
Authenticates dependency-repair promotion provenance before source routing can suppress incidental issue links.
Pipeline status
Adopted into the agent pipeline; consumer-template parity and review recovery remain tracked by the source issue.