Repository navigation
fix: preserve PR promotion close semantics - #446
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 9, 2026, 12:39 PM ET / 16:39 UTC. Summary Reproducibility: yes. from source inspection: current main still records promoted PR closes as duplicate_or_superseded unconditionally, and the PR changes that path. I did not run a live apply repro because this review is read-only. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land the close-reason semantics after removing the release-owned changelog line and adding redacted live apply or dry-run proof demonstrating duplicate, low-signal, and no-diff promotion behavior. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main still records promoted PR closes as duplicate_or_superseded unconditionally, and the PR changes that path. I did not run a live apply repro because this review is read-only. Is this the best way to solve the issue? Mostly yes: carrying the resolved closeReason through report upgrade and apply selection is a narrow fix, and the previous unsafe supersession fallback concern appears addressed. The merge-ready path still needs the changelog line removed and live apply proof added. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 458cfdc1a59d. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (2 earlier review cycles)
|
e632ade to
b26b1e5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b26b1e5ffd
ℹ️ 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".
| return ( | ||
| frontMatterValue(markdown, "pr_rating_overall") === "F" || | ||
| frontMatterValue(markdown, "pr_rating_proof") === "F" || | ||
| sectionLineValue(markdown, "Overall tier") === "F" || | ||
| sectionLineValue(markdown, "Proof tier") === "F" | ||
| overallTier === "F" && | ||
| (proofTier === "F" || ["missing", "mock_only", "insufficient"].includes(proofStatus)) | ||
| ); |
There was a problem hiding this comment.
Preserve old F-rated PR promotion selection
For stale external PR reports that predate pr_rating_proof / real_behavior_proof_status but do record pr_rating_overall: F (or an Overall tier F), this predicate now returns false because the proof tier/status is blank. The apply path would treat the same report as missing proof when the Real Behavior Proof section is absent and would promote it as low_signal_unmergeable_pr if selected, but scheduled apply only sees numbers from this workflow utility, so those older F-rated reports are skipped indefinitely. Please default absent proof metadata for PRs to the same missing-proof state used by apply.
Useful? React with 👍 / 👎.
| { reportDirs: [itemsDir, closedDir] }, | ||
| ); | ||
| if (promotion) { | ||
| if (promotion && closeReasonEnabled(promotion.closeReason, applyCloseReasons)) { |
There was a problem hiding this comment.
Record filtered live promotion checks
When a filtered apply run selects an ambiguous promotion because an enabled outcome is possible (for example --apply-close-reasons low_signal_unmergeable_pr) but live hydration resolves it to a disabled reason such as duplicate_or_superseded, this guard drops the promotion without recording a skip or apply_checked_at. The loop later continues as a non-close item, so cursor rotation still sees the record as unchecked and can keep selecting the same disallowed PR ahead of later enabled low-signal candidates. Record a checked skip for disabled resolved reasons so filtered runs can make progress.
Useful? React with 👍 / 👎.
* fix: preserve promotion close semantics * fix: gate resolved promotion reasons * fix: preserve no-diff promotion precedence * fix: block unsafe promotion fallthrough * fix: align low-signal promotion selection
Summary
low_signal_unmergeable_prunless the higher-priority no-diff path resolves toduplicate_or_supersededThis is rebased onto
76360b9874(#444), retaining its apply-throughput changes while making promotion reason selection and filtering consistent.Proof
corepack pnpm install --frozen-lockfilecorepack pnpm run build:allnode --test test/apply-pr-promotion.test.ts test/apply-pr-duplicate-proof.test.ts test/apply-pr-coverage-proof-close.test.ts test/apply-label-sync.test.ts test/close-reasons.test.ts test/review-close-policy.test.ts test/repair/workflow-utils.test.ts— 140/140 passedcorepack pnpm run lint:srccorepack pnpm run lint:repaircorepack pnpm run lint:scriptscorepack pnpm exec oxfmt --check src/clawsweeper.ts src/repair/workflow-utils.ts test/helpers.ts test/apply-pr-promotion.test.ts test/repair/workflow-utils.test.tsgit diff --check origin/main...HEAD/Users/steipete/Projects/agent-skills/skills/autoreview/scripts/autoreview --mode branch --base origin/main --parallel-tests 'corepack pnpm run build:all && node --test test/apply-pr-promotion.test.ts test/repair/workflow-utils.test.ts' --stream-engine-output— clean, findings[], 52/52 parallel tests passed