Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug] CI accepts obsolete PR targets after retargeting or force-push

Open
#3,296 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

  • #3297 by @contrueCT — closed without merging

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
git, github
Domain
ci-cd

Research direction

Start with require_current_pr(), which checks the target repository but not the target branch name or whether the tested base is still in the target's history, and with create_plan() and the all, memory and advisory gates that accept the stale snapshot. Build the Git fixture from the reproduction (base commit, PR head, two-parent synthetic merge) and check that a retargeted base or force-pushed unrelated history is rejected while a normal advance and a changed-head control behave as described. Done when those cases pass and the Memory metadata-outage policy is unchanged. PR #3297 is already open against this issue, so coordinate with it first.

Written by the indexing model from the issue text.

Description

Problem

On Apache master 68855199031d5801edb4fe41b2bacbacffe8fe68, CI accepts an old synthetic merge after a PR is retargeted within the same repository or the target branch is force-pushed to unrelated history. require_current_pr() checks the target repository, but omits the target branch name and whether the tested base remains in the target's history.

Reproduction

Create a local Git fixture with a base commit, a PR head and a two-parent synthetic merge. Build a plan against master, then supply live PR metadata with either a different base ref or an unrelated commit at the same base ref. With unchanged head identity and successful selected results, create_plan() and the all, memory and advisory gates accept the obsolete snapshot. A changed-head control is correctly rejected.

Expected behavior

Bind the plan to its target ref and reject rewritten target history. Continue to allow normal target-branch advancement, consistent with non-strict protection, and preserve the documented metadata-outage policy for completed Memory tests.

Scope and existing work

This concerns CI planning and reporting; the fixture does not establish that GitHub branch protection can be bypassed. Existing issues and PRs were searched for retargeting, force-push and plan freshness. Merged CI changes #3271 and #3277 retain the gap; no active fix was found. The earlier report is in the Topling review.

Dominant language
Java
Stars
3.2k
Forks
641
Avg merge
1d 16h
Merged PRs (30d)
38

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/hugegraph

All issues in apache/hugegraph

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.