Skip to content

Missing base commit on main despite earlier covered ancestors #861

@nikosatwork

Description

@nikosatwork

Describe the bug

On main commits in a merge-heavy history, Codecov intermittently shows Missing base commit even though earlier covered ancestors exist in git history and in Codecov. This causes parent lookup/carryforward to fail for some head commits.

Environment

  • Browser: Chrome (used to verify in Codecov UI)
  • System: GitHub Actions + public GitHub repo + public Codecov

To Reproduce

Steps to reproduce the behavior:

  1. Clone/fork the public repro repository: https://github.com/nikosatwork/codecov-base-commit-test.
  2. In GitHub Actions, run CI with Test Suite = Both (Runs core and ext test suites & uploads to Codecov with core and ext flags respectively).
  3. Inspect the upload in Codecov (works as expected).
  4. Run Create Stress Batch PRs with count=10.
  5. Run Merge Batch PRs.
  6. Run CI with Test Suite = Core.
  7. Inspect the upload in Codecov: no base-commit error, and ext flag is carried forward as expected.
  8. Run Create Stress Batch PRs again with count=40.
  9. Run Merge Batch PRs.
  10. Run CI with Test Suite = Core.
  11. Inspect the upload in Codecov: Missing base commit error appears, and ext flag is not carried forward.

Expected behavior

Codecov should consistently resolve a valid base commit on main and carry forward ext flag from the nearest valid covered ancestor, regardless of merge-batch size (10 PRs vs 40 PRs).

Actual behavior

After the larger stress batch (40 PRs), running Core-only CI results in Missing base commit, and the ext flag is not carried forward. The smaller batch (10 PRs) does not show this failure.

  • Inspect in Codecov here

Additional context

  • See main-full-graph.txt, output of git --no-pager log --graph --oneline --decorate --max-count=200 main, showing the full commit graph around the relevant main heads.

    • ad4d07954ba9a187b25c134ba33e9911a58b7078 - initial commit and upload - Missing base commit expected - view in Codecov here
    • 5c09c9921e187828946de5034aea4aaac647182f - Upload after first 10-batch PRs landed - Shows correctly, base commit found - ext flag is carried forward - view in Codecov here
    • edef8d914d8e5e7829f87365cb0d2f25935d242b - Upload after second 40-batch PRs landed - Shows Missing base commit - ext flag is not carried forward - view in Codecov here
  • Reproduced in public GitHub + public Codecov.

  • Repository: https://github.com/nikosatwork/codecov-base-commit-test

  • Codecov: https://app.codecov.io/github/nikosatwork/codecov-base-commit-test

  • Pattern is intermittent and correlates with merge-heavy batches + partial/intermittent flag uploads.

  • Not a broken git graph: affected commits have valid covered ancestors on main.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions