Skip to content

shape-doctor.py: the partial-clone row's NEXT names the first promisor remote, so it loops where the pinned commit sits only on another remote or another branch, and no test covers a partial clone that lacks the pinned commit itself #754

Closed

Description

@brettheap

Goal: the partial-clone row (#683, PR #742) prints a NEXT that, once run, lets the doctor answer, in every partial clone. Its tests also pin the case where the clone lacks the pinned commit itself.

Filed by lane openRepoShape-3 under v1.1.1, on Brett Heap's word of 2026-10-16T13:35:28Z ("yes create v1.1.1"). Lane 3's reviewer RV-f found these while reviewing #742, as S1, S2 and N1-N3, measured on git 2.43.0.

What happens on #742's head 3027937d:

  • S2: the NEXT is git -C <shape> fetch --refetch --no-filter <remotes[0]> (shape-doctor.py:4462). It loops in two cases:
    • Two promisor remotes, with the pinned commit only on the second: the NEXT exits 0, and the doctor run again still says lacks 1 object at the pinned commit and prints the same NEXT.
    • A --single-branch partial clone whose pinned commit is on another branch: after the NEXT the clone lacks 0 objects, and it still says git cannot list the pinned commit and prints the same NEXT.
    • The full-clone precedent row's fetch --all has the same single-branch weakness.
  • S1: no test reaches objects_lacking returning None, which happens when the clone does not hold the pinned commit (:4448-4451). A mutant counting that as complete survives all 21 tests. On a --single-branch blob:none clone, that mutant makes the doctor fetch 6 times and answer COMPLIANT, SHAPE BEHIND.
  • N1: with tree:0 the row says lacks 1 object when only the root tree's absence can be counted. It should say "at least".
  • N2: --refetch needs git 2.36, and Ubuntu 22.04 ships 2.34.
  • N3: git 2.43 on Ubuntu honours GIT_NO_LAZY_FETCH=1, contrary to shape-doctor.py: run from a partial clone of the standard, the shape currency row fetches what the clone lacks, and with its remote out of reach calls each copy the standard changed since the pin both, so a doctor that fetches nothing fetches, and offline says DRIFTED of copies nobody edited #683's text. Setting it in the doctor's environment would make a missed path fail instead of fetching.

What to do:

  • Pick the promisor remote whose tracking refs contain the lacking commit (git for-each-ref --contains <commit> refs/remotes/<name>/). That does not fetch, because commits are present under both filters. Where none does, name every promisor remote in the why.
  • When the count is None, say in the why that the commit is not in the clone at all.
  • Add the S1 test: a partial clone lacking C1, asserting exit 3 and lacking == {C1: None}.
  • Fix N1's and N2's wording. Consider N3.

Lands after: #742.

Activity

  1. added this to the v1.1.1 milestone on Oct 16, 2026
  2. brettheap commented on Oct 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoShape-3, session b30e8b49-f249-4668-adb1-1dbfa93c09e1@Eagle, 2026-10-16T23:34:03Z, for #754

    Logged in lanes/log/openRepoShape-3.md at 299b804baa3a5d3326fa27a17975ddd937455cae.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoShape#754:
       none
    2. `gh pr list --repo opensoft/openRepoShape --state all --search "#754"`, kept where the row or its body names `#754`:
       none
    3. `git ls-remote --heads git@github.com:opensoft/openRepoShape` branches naming `754` as a whole token:
       none
    
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions