Skip to content

🐛🧑‍💻 - Cancelled PR linking loses original base and recovery marker after a newer invocation #785

Closed

Description

@efraespada

Is there an existing issue for this?

Which actions are affected?

Pull Request

Which platforms are affected?

Linux

Description

Cancelling a PR analysis during its temporary issue-link retarget can leave the PR targeting the production/default branch. A subsequent invocation generated a new description and persisted that transient base as parentBranch, removing the pending recovery marker. The intended target in the admitted issue and the contributor's PR creation was develop.

This is not a complaint about the intentional temporary retarget documented in #759. The defect is that cancellation prevented restoration and later processing erased the evidence needed to restore the original target.

Observed consumer: vypdev/zstandard issue #177, draft PR #183. No merge or deployment occurred. Copilot's code, installed workflows and configuration have not been modified. The PR has now been returned to develop through a normal maintainer PR metadata update; no managed Git branch/ref was rewritten.

Reproducing the issue

  1. Admit a bugfix issue whose Action-selected parent is develop and let the Action create its managed branch.
  2. Open its PR with gh pr create --base develop (not the repository default master).
  3. Start native PR processing. It appends the pending issue-link marker and temporarily changes the base to the default branch.
  4. Push another normal commit while the linking workflow waits. The installed PR job has cancel-in-progress: true, so the earlier invocation is cancelled before its restoration finally-block completes.
  5. Observe that the PR remains on master. Allow the synchronize event to process the current body. In this incident the rewritten body no longer contained the pending marker and its embedded configuration used parentBranch: master.
  6. Re-running the original PR job on the original event did not restore the original target in this incident; attempt 2 ended workflow.stale after processing a newer head. Its log used develop for the diff only after the maintainer restored that base.

Expected: after any cancellation/retry, the final PR target and persisted parent remain the admitted develop, or the operation fails closed with actionable recovery state that subsequent description updates cannot discard. A temporary default target should never become the settled parent merely because the worker was terminated.

copilot Version

vypdev/copilot@v3, version 3.10.6, resolved engine commit f5e5a4cf9a80248994469cd88ad55eecab5b95ca in the affected run. The installed Action references remain version tags.

Relevant Log Output

Run 40849860701, attempt 1, job 123366350392, head 44e4203b502cb02a21723015b810cf8f209359ed
2026-10-29T09:31:31.2485316Z pending marker:
<!-- copilot:pr-issue-link:v1;pr=183;issue=177;base=develop;state=pending -->
2026-10-29T09:31:32.6125241Z Changed base branch to master
2026-10-29T09:31:42.8048229Z workflow cancelled

Later settled PR: draft=true, base=master, no pending marker
Embedded PR configuration: parentBranch=master
Issue's admitted managed branch parent: develop

Original-job rerun: run 40849860701, attempt 2, job 123402291364
2026-10-29T10:50:35.7887032Z Impact: A newer state superseded this workflow invocation.
Error code: workflow.stale

Additional context and comments

Activity

  1. added
    bugSomething isn't working
    bugfixSomething isn't working
    priority: highCritical issue, needs immediate attention.
    on Oct 29, 2026
  2. added theissue type on Oct 29, 2026
  3. moved this to Todo in vypdevon Oct 29, 2026
  4. changed the title [-]Cancelled PR linking loses original base and recovery marker after a newer invocation[/-] [+]🐛 - Cancelled PR linking loses original base and recovery marker after a newer invocation[/+] on Oct 29, 2026
  5. vypbot commented on Oct 29, 2026

    @vypbot
    Contributor

    Hi! I’m @vypbot, the Copilot assistant for this repository.

    I can answer questions, explain the codebase, propose implementation and test plans, review issues and pull requests for potential bugs or security problems, and help authorized maintainers apply changes.

    Try /copilot help to see the available commands, or mention @vypbot with your question.

  6. efraespada commented on Oct 29, 2026

    @efraespada
    MemberAuthor

    Additional recovery evidence after a fresh successful invocation:

    • Consumer PR 🚀🧑‍💻 - 2.0.0 - Task Size #183 is now correctly targeting develop, with no pending issue-link marker. Its head is 6b1c45bd1d07ac3795d035745501bb2fd7e8659e.
    • The normal synchronize invocation 40868901551, job 123430597497, completed successfully at 2026-10-29 11:58 UTC. It resolved the same vypdev/copilot@v3 engine commit f5e5a4cf9a80248994469cd88ad55eecab5b95ca.
    • After that successful invocation, the regenerated PR description still persists parentBranch: master. The associated issue 📝🧑‍💻 - Missing PR information #177 retains parentBranch: develop, and the PR's actual GitHub base is develop. No contributor has edited the embedded configuration.
    • The normal managed branch-sync run 40868893816 also succeeded. Managed refs were left to the Action.
    • For comparison, completed bugfix PR zstandard #165 targets develop and its persisted PR parent is also develop.

    This narrows the recovery problem: the wrong persisted parent survives a fresh successful invocation, not only the earlier original-event retry that ended workflow.stale. The temporary retarget itself remains expected behavior; the concrete inconsistency is the retained transient parent after interrupted restoration and loss of the pending suffix. Please cover convergence between the admitted issue parent, settled GitHub base, and regenerated PR configuration in the recovery regression.

    The consumer fix continues through normal CI/review against its verified develop base. Copilot source, installed workflows, policies and operational configuration have not been patched to repair this state.

  7. moved this from Todo to In Progress in vypdevon Oct 30, 2026
  8. added
    branchedIndicates that a branch has been created for this issue.
    on Oct 30, 2026
  9. 30 remaining items

  10. vypbot commented on Oct 30, 2026

    @vypbot
    Contributor

    Issue closed: synchronization recommendation retired

    No branch synchronization is required for this closed issue.

    The previous recommendation is historical. Issue closure does not certify that the branches are synchronized.

  11. moved this from In Progress to Done in vypdevon Oct 30, 2026
  12. added
    100%Progress: 100%
    and removed
    in-progressStart work on an admitted issue.
    state:workingWork can proceed on the verified branch or without a branch.
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

100%Progress: 100%branchedIndicates that a branch has been created for this issue.bugSomething isn't workingbugfixSomething isn't workingpriority: highCritical issue, needs immediate attention.size: XXLIndicates an extremely large task or issue that requires significant time and effort to complete.

Type

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions