Skip to content

chore(pr-gate): avoid repeated latest-dev resync churn on active PRs #4443

Closed

Description

@Vocllum

Area

Other

What are you trying to accomplish?

Avoid repeated no-op resync churn on active pull requests when dev advances with unrelated commits after a PR has already been validated against a recent base.

The goal is to keep contributors on current development history without requiring them to continuously chase the exact latest dev tip while a PR is waiting for review.

What prevents this today?

The current review-readiness checklist requires contributors to attest:

I pushed my PR to the latest dev commit.

On a fast-moving dev branch, this creates a loop where an otherwise review-ready PR is repeatedly resynced only because unrelated commits landed after its last successful validation.

Each resync changes the PR head, invalidates previous exact-head verification, triggers another CI/review cycle, and can create extra sync/backup branches without materially reducing merge risk.

This is especially noticeable on longer-lived PRs such as #4042 and #4062, where dev may advance again shortly after a successful sync even when the intervening changes do not overlap the PR's feature files.

The PR quality gate already has an ancestry concept with a bounded behind-base threshold, while the checklist wording is stricter and effectively encourages exact-tip synchronization. Those two requirements currently pull contributors in slightly different directions.

What should OpenCodex do?

Treat exact-tip synchronization as a review/merge boundary rather than a continuously maintained condition.

A PR should remain review-ready when it was synced to a recent dev revision, newer dev changes have been checked for relevant overlap, and the existing ancestry/staleness gate is still satisfied.

A maintainer can still request an exact-tip sync when the PR is about to merge, or whenever newer upstream changes overlap the affected files or behavior.

This should not weaken CI, review, target-branch, or ancestry requirements; it should only avoid repeated exact-tip chasing caused by unrelated upstream changes.

Example usage or interface

Current checklist wording:

I pushed my PR to the latest dev commit.

Possible replacement:

I synced this PR to a recent dev revision and reviewed newer dev changes for relevant overlap.

The ancestry gate could continue rejecting materially stale branches. A final exact-tip sync could still be requested at the merge boundary or when overlapping upstream changes appear.

Alternatives or workarounds

  • Continuously merge/rebase every new dev tip into the feature branch. This repeatedly invalidates exact-head CI and review evidence even when upstream changes are unrelated.
  • Leave the branch behind and wait for a maintainer to ask for a sync. This avoids churn but conflicts with the current checklist wording.
  • Keep the current wording but enforce exact-tip synchronization only at a defined review/merge transition. This would also solve the main problem.

Additional context

The issue was originally filed freeform and was automatically closed by the issue-quality workflow. This edit reformats the same proposal using the repository's Feature proposal template.

Related examples: #4042 and #4062 have both experienced repeated dev movement while waiting for review, including validation reruns after otherwise unrelated upstream changes.

The request is specifically about the contribution workflow and does not ask to relax CI or branch freshness checks.

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

  1. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    Issue reopened

    The report now contains the information required by the automated check. Thanks for updating it.

  2. lidge-jun commented on Sep 14, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 32 / 80

    이 이슈는 코드 버그 신고가 아니라 기여 워크플로 제안입니다. 지금 리뷰 준비 체크리스트는 I pushed my PR to the latest dev commit.처럼 exact tip 동기화를 기여자에게 계속 요구합니다. 그런데 dev가 빨리 움직이면, 이미 검증된 PR도 관련 없는 커밋 때문에 다시 sync → head 변경 → CI/리뷰 증거가 무효화되는 루프가 납니다. 본문이 든 #4042, #4062 같은 장기 PR에서 특히 티가 납니다.

    한편 품질 게이트 쪽에는 이미 ancestry/behind-base 허용폭이 있습니다. 체크리스트 문장만 더 빡센 exact-tip을 요구하면, 기여자는 게이트가 허용하는 범위와 체크리스트가 요구하는 범위 사이에서 왔다 갔다 하게 됩니다. 제안의 핵심은 exact-tip을 “항상 유지할 조건”이 아니라 “머지/리뷰 경계에서 맞출 조건”으로 옮기자는 것입니다. CI·타깃 브랜치·ancestry를 느슨하게 하자는 말이 아니라, 관련 없는 upstream 이동 때문에 같은 일을 반복하지 말자는 뜻입니다.

    지금 dev 스냅샷의 round 2/3 방향에도 “admin squash merges on exact-head CI”가 있습니다. 즉 머지 순간 exact-head는 유지하되, 대기 중 PR이 매 tip마다 쫓아갈 필요는 없다는 운영 감각과 이 이슈가 맞닿아 있습니다. 다만 이 변경은 문서/체크리스트/게이트 카피 조정이라 제품 런타임 버그보다 우선순위는 낮습니다. 자동화 문구를 바꾸면 기여자 행동과 봇 코멘트가 같이 바뀌므로, 어디에 어떤 문장을 심을지 한 번에 정하는 편이 낫습니다.

    체크리스트 문구 - latest dev commit을 recent dev revision + overlap 확인으로 바꾸자는 제안은 명확합니다. 다만 “recent”와 “relevant overlap”의 판정 주체(기여자 자가 선언 vs 봇)를 정하지 않으면 새 모호함이 생깁니다.

    ancestry 게이트 - 이미 behind 허용이 있다면, 체크리스트만 고치고 게이트 숫자는 그대로 둘지, 허용폭과 문구를 같이 문서화할지 정해야 합니다.

    머지 경계 - 메인테이너가 머지 직전에 exact-tip sync를 요구하는 운영은 round 2/3 계획과 잘 맞습니다. 이슈를 받아도 런타임 코드 변경은 거의 없을 가능성이 큽니다.

    중복/범위 - 비슷한 “PR이 dev를 쫓느라 CI가 도니 돈다” 류 논의가 다른 이슈/PR 게이트 문서에 흩어져 있으면 하나로 묶는 게 좋습니다. 제품 기능 요청이 아니라 프로세스 이슈라 enhancement 라벨은 맞지만 릴리스 블로커는 아닙니다.

    메인테이너의 판단이 필요한 지점

    • 체크리스트만 고칠지, pr-gate 봇 코멘트/자동 닫힘 문구까지 같이 고칠지.
    • “recent”의 공식 정의(예: ancestry 허용 커밋 수/일수)를 문서에 숫자로 박을지, 메인테이너 재량으로 둘지.
    • round 2/3 closure 정책과 이 이슈를 같은 문서 PR로 처리할지.

    너의 추천
    지금 당장 제품 코드보다 낮은 우선으로 두세요. round 2/3 문서/게이트 정비 때 체크리스트 문장과 ancestry 허용폭을 한 PR로 맞추는 게 좋습니다. 그 전까지는 메인테이너가 머지 직전에만 exact-tip을 요청하는 운영으로 충분합니다. 닫을 중복은 아니고, 타입스플릿과도 무관합니다.

    이 댓글은 grok-bot이 작성했습니다

  3. added
    choreMaintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).
    on Sep 16, 2026
  4. added a commit that references this issue on Sep 23, 2026
    2b60f1c
  5. lidge-jun commented on Sep 23, 2026

    @lidge-jun
    Owner

    Landed on dev in 2b60f1c via #5471: the latest-dev readiness box now states the behind-base threshold the gate actually enforces, derived from the gate constant. Merges into dev do not auto-close issues, so closing manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions