test(source-context): cover partial-label and mismatched promotion markers - #2866
Conversation
…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.
|
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. |
📝 WalkthroughWalkthroughThe source-context tests now cover incomplete and invalid dependency-repair promotion metadata. They also compare the primary and consumer-repository resolvers across trusted, partial, and absent promotion-label states. ChangesPromotion trust routing
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Automated Status SummaryHead SHA: 7b84e60
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.
Pull request overview
Adds targeted test coverage for dependency-repair promotion trust boundaries in the PR source-context resolver, focusing on the previously untested “partial label” and “trusted labels + bad marker payload” paths, plus a parity check to prevent root/template behavior drift.
Changes:
- Adds tests for partial promotion-label combinations to ensure issue routing is not suppressed unless both trust labels are present.
- Adds tests for malformed/mismatched promotion payloads even when both trust labels are present, ensuring issue routing is preserved.
- Adds a root vs
templates/consumer-reporesolver deep-equality assertion across key label combinations to guard against behavioral drift.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0ae031947
ℹ️ 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".
|
Runner dispatch state for codex on PR #2866. Do not edit. |
🤖 Bot Comment Handler
The agent has been assigned to this PR to address the bot review comments. Instructions for agent
The bot comment handler workflow has prepared context in the artifacts. |
Opener lane: routing repaired, but keepalive cannot be dispatched (owner action required)Routing repair applied this round. This PR was opened with zero labels, so Repair confirmed effective, then blocked by a repo-level approval gate. The label change did trigger Evidence gathered, with alternatives ruled out:
Owner decision required: approve/enable these runs from the Actions UI (they should show Approve and run), or identify the account/org-level policy that changed at ~19:37Z on 2026-07-31. This is the same condition already recorded against #2863 (PR #2810) and #2864 (PR #2826), so it is now blocking three PRs. Next lane owner: closer. This PR is non-draft,
The closer should either resolve those two threads directly and merge, or merge and carry them as a bounded follow-up. No opener action remains. Posted by the opener lane (cursor) — routing repair + blocker evidence only; no code changes to this branch. |
|
Addressed both actionable review findings in 39b3d7a. The malformed-payload cases now assert |
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 351-381: Update the parity assertion in the consumer template
resolver synchronization test to use assert.deepStrictEqual instead of
assert.deepEqual, ensuring templateResolvePrSourceContext and
resolvePrSourceContext match exactly, including primitive types.
🪄 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: 70f77b99-b717-40b4-a8fd-98cc400363a9
📒 Files selected for processing (1)
.github/scripts/__tests__/source-context.test.js
Provider Comparison ReportProvider Summary
📋 Full Provider Details (click to expand)openai
anthropic
Agreement
Disagreement
Unique Insights
🔍 LangSmith Traces |
Closes #2865
Automated Status Summary
Scope
Trusted dependency-repair promotion metadata must suppress incidental issue-link routing, while forged or incomplete markers must preserve normal issue routing.
Context for Agent
Related Issues/PRs
Tasks
Acceptance criteria
Summary by CodeRabbit