Repository navigation
feat(git): bound upstream lifetime and cancel work before shutdown drain - #77
Merged
Merged
Conversation
profiling
force-pushed
the
upstream-lifecycle
branch
from
November 14, 2026 06:24
720c820 to
78ce674
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
==========================================
+ Coverage 97.57% 97.77% +0.19%
==========================================
Files 9 9
Lines 3707 4083 +376
==========================================
+ Hits 3617 3992 +375
- Misses 90 91 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
profiling
pushed a commit
to profiling/git-cache-proxy
that referenced
this pull request
Nov 14, 2026
Keep rolandjitsu#72, rolandjitsu#76 and rolandjitsu#77 with internal maintenance while deferring rolandjitsu#67. Preserve the previous tree on its archive branch and in normal history. Assisted-by: OpenAI:Codex
This was referenced Nov 14, 2026
profiling
marked this pull request as ready for review
November 14, 2026 07:36
rolandjitsu
reviewed
Nov 14, 2026
rolandjitsu
left a comment
Owner
There was a problem hiding this comment.
It mostly LGTM, just a minor comment.
profiling
marked this pull request as draft
November 15, 2026 13:38
profiling
force-pushed
the
upstream-lifecycle
branch
from
November 15, 2026 14:12
32b4adc to
05eb933
Compare
profiling
marked this pull request as ready for review
November 15, 2026 14:23
Keep upstream owners alive until their children are killed and reaped, even when the HTTP request is dropped. Assisted-by: OpenAI:Codex Assisted-by: Claude:claude-opus-4-8
rolandjitsu
force-pushed
the
upstream-lifecycle
branch
from
November 16, 2026 06:11
05eb933 to
530e73d
Compare
rolandjitsu
enabled auto-merge (rebase)
November 16, 2026 06:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A stalled upstream clone or fetch can currently hold the repository lock indefinitely and keep HTTP graceful shutdown waiting. Give each clone, full-ref fetch and SHA backfill a positive total budget (3600 seconds by default), shared across attempts and retry backoff.
Cancel upstream owners on SIGTERM or Ctrl-C before HTTP drain, reject new admission, and interrupt repository lock waits, commands and retry backoff. Independent owners keep repository locks until process-group termination and direct-child reaping complete, including when an HTTP request is dropped. Preserve per-request credentials and typed upstream auth failures; ordinary SHA backfill failures remain best effort. Active local upload-pack responses continue to drain.
Expose the same validated timeout through CLI/env, a library builder and Helm values. No new direct dependency; enable the existing tokio-util runtime feature for cancellation and task tracking.
Validation:
cargo fmt --all --checkcargo clippy --all-targets --all-features --locked -- -D warningscargo test --all-features: 173 tests passedTests cover stalled/noisy commands, a shared retry budget, successful operations within budget, auth propagation, request-drop cleanup, cancellation during backoff and lock waits, active upload/permit preservation, and real binary SIGTERM/Ctrl-C shutdown.
The budget starts after the repository lock is acquired. This does not claim a hard shutdown bound for active uploads or blocking filesystem work. Unix cancellation kills the process group and reaps the direct child; orphaned descendants are reaped by their OS parent. On non-Unix targets only the direct child is terminated. No persistence/admission redesign, protocol changes, production changes, or fixed mutation-lock wait policy are included.
Related PRs
Independent of #72 and #76; no required merge order. If either lands first, update this branch against main and adapt any affected tests before merging.