Repository navigation
Conversation
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#10970 Project event sync misreports merged delivery progress · 3 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | A merged PR event uses the PR subject and merge-commit ancestry when calculating delivery progress. | ✅ Met | Event reconciliation now keeps the result from delivery(), which evaluates a PullRequest subject itself and checks its merge commit against the trusted mainline. |
| 2 | An Issue event reports integrated delivery only when all associated merged PR commits are reachable from the trusted default branch. | ✅ Met | The event-only any(MERGED) override is removed; delivery() checks the associated PRs and their merge-commit ancestry. |
| 3 | Event runs defer stable-release lookup and clear stale release fields when implementation links change. | ✅ Met | Release lookup remains limited to full scans; event reconciliation preserves existing published fields only when the implementation links are unchanged, otherwise it clears them. |
Sourcery assessment
Needs a human reviewer. A faulty event reconciliation could leave a Project item showing the wrong delivery progress, because the field is stored on the item. A later sync can recompute and correct it, so the error is bounded and repairable.
|
The Windows failure is isolated to I attempted to rerun only the failed job, but GitHub returned |
…fix/project-merged-event-delivery
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The conflict was in .github/PROJECT_SYNC.md, which upstream restructured from
a bullet list into numbered setup steps plus a rules table. Took the upstream
structure and re-applied this branch's sentence to the corresponding rule, so
the doc keeps upstream's organization rather than reverting it:
Event runs preserve an existing release result while implementation links
are unchanged. They still require every associated merge commit to be
reachable from the trusted default branch before reporting 已合入待发布;
a merged state alone is not integration evidence.
scripts/sync_github_project.py merged without conflict and the deletion this
PR makes is intact: the event-run branch no longer overwrites 交付进度 from
pr["state"] == "MERGED" alone, so the value computed by delivery(), which
already checks ancestor(commit, mainline), is what gets written.
Offline suites on the merged tree, no credentials:
tests/test_project_events.py 10 tests OK
tests/test_sync_github_project.py 16 tests OK
tests/test_project_delivery.py 28 tests OK
Red-green through the merged tree: restoring the upstream
sync_github_project.py fails
test_issue_event_keeps_unreachable_merge_out_of_integrated_delivery
('已合入待发布' != '尚未合入') and
test_merged_pr_event_marks_integrated_delivery_pending_release
('尚未合入' != '已合入待发布'); restoring this branch's file passes all 10.
The file is byte-identical to its pre-probe state afterwards.
Linked issuesChecked at commit 2b44bc9 #10970 Project event sync misreports merged delivery progress · 3 of 3 met
|
|
Merged current The conflict was in
Offline suites on the merged tree, no credentials: Red-green through the merged tree, not just the original base: restoring the upstream and restoring this branch's file passes all 10. The file is byte-identical to its pre-probe state afterwards (sha256 |
Fixes #10970
Summary
Keep bounded Issue/PR event reconciliation consistent with
delivery()when calculating交付进度.The previous event-only override had two failure modes:
尚未合入because the linked-PR map is keyed by issue number and does not include the PR itself.已合入待发布whenever any linked PR was merged, even if its merge commit was unreachable from the trusted default branch.Event runs now retain the integrated delivery result, including all associated PR and ancestry checks. Stable-release lookup remains deferred to full scans, and stale release fields are still cleared when implementation links change.
Tests
尚未合入, while the fix returns已合入待发布.已合入待发布, while the fix returns尚未合入.python3 -I tests/test_sync_github_project.py -v: 16 passed.python3 -I tests/test_project_delivery.py -v: 28 passed.python3 -I tests/test_project_events.py -v: 10 passed.git diff --checkpasses.No live Project mutation was attempted.
Summary by Sourcery
Preserve accurate integrated delivery status during Project event reconciliation while continuing to defer release verification to full scans.
Bug Fixes:
Enhancements:
Documentation:
Tests: