Skip to content

CI paths gate fails with "404 No common ancestor" when the pushed ref's history was rewritten #330

Closed

Description

@Shinrai

Problem

The reusable CI's paths gate compares the pushed commit with its previous or base commit to decide whether a change is docs-only. When the new commit shares no history with the old one, the GitHub compare API returns 404 No common ancestor and the gate fails the CI run. A new root commit force-pushed over the previous master is one example.

CLDMV dev-trunk repos do this routinely. Their master, next and hotfixes are a single scaffold commit, rewritten whenever the workflow set or tooling changes (tv-control, unifi-cli, rti-videowall-server, io-kasa-api, rummage, the stratax repos). Example:

Expected

When there is no common ancestor, or the comparison fails for another reason (a deleted base, a force-push, a new branch), the gate falls back to "not docs-only" and runs the full CI. It must not fail the run. It should log why it fell back.

Fix

  • In the paths-gate step, treat a compare failure (404 / no merge base) as "run everything" and emit a ::notice:: naming the reason.
  • Cover the push-event cases too, where github.event.before may be 0000000… or not an ancestor.
  • Add a test or fixture covering the no-common-ancestor and zero-SHA cases.

Activity

  1. added theissue type on Sep 28, 2026
  2. added
    type: bug
    priority: high
    status: in progress
    on Sep 28, 2026
  3. cldmv-bot commented on Sep 28, 2026

    @cldmv-bot
    Contributor

    Closed in v4.29.3 — resolved by #331.

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

    priority: highstatus: in progresstype: bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions