Skip to content

feat(git): make upstream clone/fetch failures diagnosable from logs - #83

Open
profiling wants to merge 3 commits into
rolandjitsu:mainfrom
profiling:profiling/issue-82-upstream-failure-logs
Open

profiling wants to merge 3 commits into
rolandjitsu:mainfrom
profiling:profiling/issue-82-upstream-failure-logs

Conversation

@profiling

@profiling profiling commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

  • fix
  • feat
  • refactor
  • perf
  • docs
  • test
  • build / ci
  • chore

Summary

Closes #82. Logs each upstream clone/fetch failure once, with the repo, an error_kind, and a redacted summary of the git stderr. Cancelled operations (client gone, or shutdown) are no longer counted as upstream errors.

Open questions:

  • In client credential mode, each upstream auth rejection logs a warn. Keep warn, or use info?
  • The metric change shows in the changelog only as the commit subject. Add a BREAKING CHANGE footer?

Tests

  • Added / updated tests (unit, plus integration where it fits)
  • Not relevant, because: ...

Checklist

  • CI is green locally: cargo fmt --all --check, cargo clippy --all-targets --all-features --locked -- -D warnings, cargo test --all-features
  • Commits follow Conventional Commits; AI-assisted commits carry an Assisted-by: trailer (see CONTRIBUTING.md / AGENTS.md)
  • Preserves the read-only, pull-only invariant (no push or proactive replication to upstream)
  • Docs / README updated if behavior or flags changed

Breaking change?

upstream_ops_total{result="error"} no longer counts cancelled operations.

@profiling profiling closed this Nov 19, 2026
@profiling
profiling force-pushed the profiling/issue-82-upstream-failure-logs branch from 60b0860 to 35d9861 Compare November 19, 2026 09:46
@profiling profiling reopened this Nov 19, 2026
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.72752% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.48%. Comparing base (4e38a2e) to head (8acc742).

Files with missing lines Patch % Lines
src/git.rs 99.72% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #83      +/-   ##
==========================================
+ Coverage   98.40%   98.48%   +0.07%     
==========================================
  Files           9        9              
  Lines        5085     5415     +330     
==========================================
+ Hits         5004     5333     +329     
- Misses         81       82       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@profiling
profiling force-pushed the profiling/issue-82-upstream-failure-logs branch from c7f6b91 to 2cc06d2 Compare November 19, 2026 09:59
@profiling
profiling marked this pull request as draft November 19, 2026 11:36
@profiling
profiling force-pushed the profiling/issue-82-upstream-failure-logs branch 2 times, most recently from 9018da2 to 629db79 Compare November 19, 2026 15:35
@profiling
profiling marked this pull request as ready for review November 19, 2026 15:36
A failed clone or fetch was only counted under repo="-"; callers
logged the outer error without git's diagnostic, and a client
disconnect was not logged at all. Log the final failure where the
operation, repo and credential are known, with a bounded, redacted
stderr summary, and drop the duplicate.

Refs rolandjitsu#82

Assisted-by: Claude:claude-opus-5-5
A client going away or shutdown is not an upstream failure.

Assisted-by: Claude:claude-opus-5-5
Assisted-by: Claude:claude-opus-5-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Make upstream clone/fetch failures diagnosable from logs

1 participant