Skip to content

fix(mirror): reconcile stale solved issue links#96

Draft
JSONbored wants to merge 1 commit into
entrius:testfrom
JSONbored:codex/das-reconcile-solved-by-pr
Draft

fix(mirror): reconcile stale solved issue links#96
JSONbored wants to merge 1 commit into
entrius:testfrom
JSONbored:codex/das-reconcile-solved-by-pr

Conversation

@JSONbored
Copy link
Copy Markdown

Summary

  • Reconcile issues.solved_by_pr whenever PR metadata is refreshed.
  • Clear stale solver links that still point to the refreshed PR after closing references change or the PR is no longer merged.
  • Reapply current closing-reference links for merged PRs.

What changed

  • handlePrMetadata() now records the previous closing issue set before fetching fresh metadata.
  • The refreshed closing issue set is normalized before storage and reconciliation.
  • Stale links are cleared only when solved_by_pr still points at the refreshed PR, so links already moved to another PR are preserved.

Why

solved_by_pr was previously write-only on merged PR metadata refreshes. If a merged PR body was edited to remove or change a closing reference, the old issue row could remain permanently linked to that PR and downstream scoring/API views could attribute the issue to the wrong solver.

Fixes #59

Validation

  • npm ci
  • npm run build
  • npm run lint
  • npm run format:check
  • git diff --check
  • Codex Security diff scan: no findings
  • CodeRabbit uncommitted review: 0 findings

Notes

  • Scope is limited to PR metadata reconciliation.
  • No webhook delivery changes, DB migrations, GraphQL rewrites, or periodic reconciliation jobs are included.

Clear solved_by_pr links that still point to a refreshed PR when its closing references change or it is no longer merged, then reapply current merged links.

Fixes entrius#59
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] issues.solved_by_pr can become stale when PR closing references change after merge

1 participant