fix(sync): distinguish missing active PR from missing delivery record - #3415
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🤖 Keepalive Loop StatusPR #3415 | Agent: Codex | Iteration 2/12 Current State
Last Codex Run
To retry:
🔍 Failure Classification| Error type | infrastructure | |
Keepalive Work Log (click to expand)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (3)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughMaint 71 now distinguishes missing active sync PRs from missing delivery records. New tests cover both classifications and empty-hash candidate selection. Operations documentation defines the resulting decision-log and JSON-row behavior. ChangesMaint 71 delivery classification
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to Maint 71 now reports absent matching sync PRs separately from selected PRs lacking delivery records, with coverage and documentation for the distinct outcomes. No merge-blocking risk remains. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Runner dispatch state for codex on PR #3415. Do not edit. |
|
Runner dispatch state for claude on PR #3415. Do not edit. |
There was a problem hiding this comment.
🟡 Changes recommended
The new no_active_sync_pr fallback in the contract-blocked path is unsafe/incomplete for the “eligibility is null” case and should be handled explicitly to avoid incorrect output and potential runtime errors.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes Maint 71’s merge-block reporting so operators can distinguish “no open sync PR matched the expected branch” from “a selected PR is missing a delivery record,” aligning logs and JSON output with the delivery/merge contract.
Changes:
- Update Maint 71 decision logging + per-repo JSON rows to emit
no_active_sync_pr(including expected branch + active hash) when the expected PR is missing. - Preserve
missing_delivery_recordstrictly for the “selected PR exists but has no delivery record” case. - Add focused Node tests covering the two distinct states and an empty-hash dispatch sanity case.
File summaries
| File | Description |
|---|---|
| docs/ops/CONSUMER_REPO_MAINTENANCE.md | Documents the two distinct Maint 71 reporting states and how to interpret them. |
| .github/scripts/maint71_merge_sync_prs.js | Implements distinct no_active_sync_pr vs missing_delivery_record reporting in logs/JSON. |
| .github/scripts/tests/maint71_merge_sync_prs.test.js | Adds regression tests for the two reporting states and the empty-hash selection behavior. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Review disposition for Fresh validation on the unchanged head: Premerge absent-check audit: the mirror reporter is missing (exit 2), so this is an explicit manual audit, not a reporter PASS. All 126 reported check runs on this head and 179 from reference #3404 were enumerated. The reference-only Python reusable children are conditional on Python/run_core changes; this PR changes only two JS files and one operations Markdown file, and its parent The required |
Provider Comparison ReportProvider Summary
📋 Full Provider Details (click to expand)openai
anthropic
Agreement
Disagreement
Unique Insights
🔍 LangSmith Traces |
Verifier disposition complete — source #3342 closedPost-merge verification for exact head Provider comparison (durable report): OpenAI PASS 93%, Anthropic PASS 68%. Both providers agree the change correctly distinguishes Human-disposition audit: Anthropic's caveats about truncated diff context and unchecked issue boxes are dispositioned:
Closing source #3342. No follow-up debt. |
Closes #3342
Automated Status Summary
Scope
maint71_merge_sync_prs.jsreportsmissing_delivery_recordfor two different states.selectMergeEligibleSyncPrin.github/scripts/sync_pr_merge_contract.js:776-780returnseligibility: nullwhen no open PR matches the expected branch for the active sync hash, and returns{ eligible: false, reason: 'missing_delivery_record' }only when a matching PR exists whose body has no delivery record. The caller at.github/scripts/maint71_merge_sync_prs.js:1987then doesselection.eligibility?.reason || 'missing_delivery_record', so the null case prints the same words as the real missing-record case.Observed 2026-09-04: Maint 71 run 33825274345 (a
workflow_dispatchwith an emptyactive_sync_hash) printedDelivery contract blocks merge: missing_delivery_recordforstranske/Travel-Plan-Permissionwhile the canary PR #1480's body carried a validsync-pr-delivery-record:v1whosemergeEligibilityevaluates tocurrent_unexpired. The operator reading that line looked for a missing record that was present; the actual state was "no PR matched the expected lane because no sync hash was supplied". One sentinel meaning both "unmeasurable" and "measured absent" is the latched-gate reporting defect: the message points the reader at the wrong drain.Context for Agent
Related Issues/PRs
Tasks
selectMergeEligibleSyncPralready exposesmissingExpectedandexpectedBranchon the selection; the caller can printno_active_sync_pr (expected <branch>, active hash '<hash>')whenselection.eligibilityis null.missing_delivery_recordfor the case that actually means it. Do not changemergeEligibility.Acceptance criteria
node --test .github/scripts/__tests__/*.test.jsexits 0 and includes the two new cases.|| 'missing_delivery_record'default on a scratch copy and run the tests; case (a) must fail; revert; tests green again.active_sync_hashprintsno_active_sync_prwith the expected branch and active hash, and persists thatdelivery_reasoninartifacts/sync-pr-merge-report.json. An empty selector preserves newest-candidate selection and must not falsely report either missing state for a valid record. Verify withnode --test .github/scripts/__tests__/maint71_merge_sync_prs.test.jsand retain the branch-specific Maint 71 smoke run URL/report.Implementation and validation evidence
Maint 71 now reports
no_active_sync_prwith the expected branch and active hash when open sync PRs exist but none matches the selector. The JSON row carries the samedelivery_reason;target_missingand merge eligibility behavior stay unchanged. A selected PR without a record still reportsmissing_delivery_record.The current selector already handles an empty hash by selecting the newest candidate. The issue's historical empty-hash reproduction therefore no longer describes main. An executor regression explicitly preserves this behavior; changing it would violate the issue's non-goal of preserving selection/merge semantics. The second default in
confirmExactHeadReviewClearcorrectly represents an existing PR losing its record and was retained. This is Workflows-only reporting; no distributed template or sync-manifest entry changes.dry_run=true,auto_merge=false,cleanup_branches=false, explicit Travel-Plan-Permission target). Completed successfully. Downloadedsync-pr-merge-and-canary-evidence: exact branch/head, dry_run=true, auto_merge=false, empty sync_hash; one resultTravel-Plan-Permission: no_prs, zero mutation/error rows. Fresh live inventory confirms no open PRs in that repo. This validates branch execution and artifact delivery only; no live missing-target fixture was available. The actual-executor fixtures prove the three reporting cases; do not claim the live run exercised them./Users/teacher/.codex/automations/pd-workloop-resume/runs/20260908T2201.All implementation acceptance is covered by the executor regressions and retained smoke artifact; the historical live candidate1480 is no longer open. Keepalive/closer should preserve the stated evidence limit instead of creating artificial sync delivery work.