Skip to content

Release 6/13#179

Merged
LandynDev merged 3 commits into
mainfrom
test
Jun 14, 2026
Merged

Release 6/13#179
LandynDev merged 3 commits into
mainfrom
test

Conversation

@LandynDev

Copy link
Copy Markdown
Collaborator

Summary

  • fix(installation): case-insensitive repo removal without lowercasing PK
  • fix(webhook): case-insensitive registered repo lookup
  • fix(webhook): self-heal PR state drift from missed merge webhooks

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)
    • More robust handlings introduced.

Yurii214 and others added 3 commits June 5, 2026 22:23
…PK (#127)

Fixes #120. Removal handler now matches LOWER(repo_full_name) so uninstall clears all case-variant rows and ingestion stops; warns on zero-row removals. Add path keeps canonical GitHub casing (no lowercasing), so webhook registration gate and miner JOINs still match.
Resolve registered repos with LOWER(repo_full_name) so webhook events
are not dropped when GitHub payload casing differs from the stored PK.
Normalize payload.repository.full_name to the canonical row before
handlers run, and apply the same case-insensitive match on repository
events.

Fixes #140
PR state (OPEN -> MERGED/CLOSED) was written only by the pull_request
webhook handler. A single missed/dropped `pull_request.closed` delivery
left a merged PR stuck OPEN forever: the frequent metadata-fetch path
deliberately never touched state, there was no reconciliation, and
backfill only ran on manual trigger. Observed on phase-rs/phase
(#2745/2751/2752/2753/2756/3095 merged on GitHub, OPEN in the mirror),
which makes the validator under-credit the miner since it reads PR state
verbatim from the mirror.

- Fetcher: fetchPrMetadata now also returns authoritative GraphQL
  state/mergedAt/closedAt/mergedBy.
- Metadata handler: re-asserts that state (MERGED is terminal, so an
  in-flight stale fetch can't revert it) and logs corrected drift.
- PrReconcileService: hourly sweep enqueues a metadata fetch for every
  still-open PR in registered repos within the scoring window, so missed
  merge events self-heal. Window/interval env-tunable.
- RepoBackfillScheduleService: daily full backfill per registered repo as
  a coarse safety net; env kill-switch (NIGHTLY_BACKFILL_ENABLED=false).
- Webhook handler: derive merged state from `merged` alone (synthesize
  merged_at from closed_at) so a closed event with a not-yet-populated
  merged_at isn't pinned to OPEN.
@LandynDev LandynDev merged commit d5b6f44 into main Jun 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants