Skip to content

Fix predictable conflict auto-resolver for wiki submodule gitlinks #321

Description

@coisa

Problem

The Auto-resolve Predictable Conflicts workflow currently treats .github/wiki as a predictable conflict, but it can still fail before staging the gitlink resolution when the target pull request updates the wiki submodule pointer.

This happened on April 30, 2026 in workflow run 25191747468, job 73863131667, while trying to auto-resolve PR #319 (dependabot/github_actions/toshimaru/auto-author-assign-3.0.2). GitHub reported the PR as CONFLICTING, so the workflow inspected it as expected, but the resolver crashed with:

error: .github/wiki does not have a commit checked out
error: unable to index file .github/wiki
fatal: updating files failed

Current Behavior

  • .github/workflows/auto-resolve-conflicts.yml dispatches .github/actions/github/resolve-predictable-conflicts.
  • .github/actions/github/resolve-predictable-conflicts/run.sh clones the parent repository into a temporary directory and merges origin/main into the PR branch.
  • When the unmerged paths include .github/wiki, the script currently runs:
    • git checkout --ours -- .github/wiki
    • git add .github/wiki
  • The temporary clone never initializes the .github/wiki submodule checkout before trying to resolve that gitlink path.
  • For PRs that conflict only on the wiki submodule pointer, the action fails with exit code 128 instead of resolving the predictable conflict.

Expected Behavior

When the only conflicting paths are within the predictable scope (CHANGELOG.md and/or .github/wiki), the workflow should either:

  • resolve the .github/wiki gitlink conflict without needing a working tree checkout for the submodule, or
  • initialize whatever submodule state is required before staging the chosen gitlink.

In both cases, the workflow should finish by pushing the resolution commit and dispatching the required test workflow when appropriate.

Scope

  • Fix .github/actions/github/resolve-predictable-conflicts/run.sh so wiki gitlink conflicts are resolved deterministically.
  • Preserve the current rule that only CHANGELOG.md and .github/wiki are auto-resolved.
  • Add regression coverage for the .github/wiki conflict path.
  • Keep the summary output explicit about resolved, skipped, and failed pull requests.

Non-goals

  • Broadening auto-resolution to arbitrary submodule conflicts.
  • Changing the manual-review fallback for conflicts outside the predictable set.

Acceptance Criteria

  • A pull request whose only conflicts are CHANGELOG.md and/or .github/wiki no longer fails with does not have a commit checked out during predictable conflict resolution.
  • The auto-resolve workflow can stage and commit the chosen .github/wiki gitlink without depending on an already materialized submodule checkout.
  • Regression coverage reproduces the failing .github/wiki conflict scenario and passes after the fix.
  • Workflow summaries and exit behavior remain deterministic for resolved, skipped, and failed PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Released

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions