Skip to content

fix(repo): harden repository state persistence#183

Merged
GaTTGeng merged 1 commit into
masterfrom
fix/m2-repository-state-hardening
Jul 16, 2026
Merged

fix(repo): harden repository state persistence#183
GaTTGeng merged 1 commit into
masterfrom
fix/m2-repository-state-hardening

Conversation

@GaTTGeng

Copy link
Copy Markdown
Owner

What changed

  • create atomic replacement files with their final Unix mode so credential-bearing repository config is owner-only from first visibility
  • preserve existing Unix modes and re-check cancellation before atomic replacement
  • align default repository cache paths with Helm on Linux, macOS, and Windows while preserving HELM/XDG/explicit precedence
  • persist raw-URL index updates for every configured duplicate-URL identity
  • derive portable, deterministic cache filenames that keep sanitized and case-distinct repository identities isolated
  • document the path, identity, permission, and duplicate behavior in English and Chinese

Audit note

The issue's candidate branch was not actually missing from master: PR #167's squash tree (a20f5a2) is identical to the candidate tip (d2e1c71). This PR therefore adds only the remaining gaps found against current master, without replaying the stale commits.

Verification

  • dotnet test HelmSharp.sln --configuration Release --no-build --no-restore with localhost excluded from the configured proxy (net8/9/10: 534/534 each)
  • repository configuration tests (net8/9/10: 49/49 each)
  • repository/update/request/dependency focused tests (net8/9/10: 60/60 each)
  • dotnet pack HelmSharp.sln --configuration Release --no-build --output artifacts/packages-local (all packages and symbols)
  • git diff origin/master...HEAD --check

Fixes #181

Create atomic replacement files with their final Unix permissions, preserve cancellation boundaries, and align cache fallbacks with Helm across platforms. Keep duplicate and case-distinct repository identities isolated with deterministic cache names and expand regression coverage.
Copilot AI review requested due to automatic review settings July 16, 2026 01:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@GaTTGeng
GaTTGeng merged commit d8344df into master Jul 16, 2026
3 checks passed
@GaTTGeng
GaTTGeng deleted the fix/m2-repository-state-hardening branch July 16, 2026 01:24
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.

[M2] Harden durable repository configuration and index-cache state

2 participants