Surfaced by CodeRabbit on #46 (review spans the full stack; this is peer-sync code from #35).
In sync.rs the per-repo sync does:
let withheld = fetch_withheld(client, &origin_url, owner_short, repo_name).await;
let mode = classify_mirror(withheld);
fetch_withheld collapses 404, 5xx, network errors, and parse failures all into None, and classify_mirror(None) yields MirrorMode::Plain. For an existing promisor mirror that flows into fetch_repo(.., Plain), which clears remote.origin.promisor and remote.origin.partialclonefilter before refetching. So a transient withheld-paths outage against a still-withheld repo downgrades the mirror to a full clone and starts failing syncs until the endpoint recovers.
Only downgrade to Plain on a definite Some(empty). When the lookup is unknown (None from an error), preserve the repo's existing promisor/partial-clone mode instead of reclassifying.
Owning PR: #35.
Surfaced by CodeRabbit on #46 (review spans the full stack; this is peer-sync code from #35).
In
sync.rsthe per-repo sync does:fetch_withheldcollapses 404, 5xx, network errors, and parse failures all intoNone, andclassify_mirror(None)yieldsMirrorMode::Plain. For an existing promisor mirror that flows intofetch_repo(.., Plain), which clearsremote.origin.promisorandremote.origin.partialclonefilterbefore refetching. So a transientwithheld-pathsoutage against a still-withheld repo downgrades the mirror to a full clone and starts failing syncs until the endpoint recovers.Only downgrade to
Plainon a definiteSome(empty). When the lookup is unknown (Nonefrom an error), preserve the repo's existing promisor/partial-clone mode instead of reclassifying.Owning PR: #35.