Skip to content

chore(config): remove keys walgit parses but never reads - #56

Merged
yordis merged 6 commits into
mainfrom
yordis/chore-config-remove-dead-keys
Oct 31, 2026
Merged

yordis merged 6 commits into
mainfrom
yordis/chore-config-remove-dead-keys

Conversation

@yordis

@yordis yordis commented Oct 31, 2026

Copy link
Copy Markdown
Member

@cursor

cursor Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Deploys with legacy walgit.toml or env vars using the removed keys will fail at startup until configs are cleaned up; runtime behavior for partial-clone object wants is documented as always-on rather than configurable.

Overview
Stops accepting configuration keys that walgit parsed but never applied, so operators are not misled about server behavior. Removed from ServerConfig: http2, max_concurrent_requests, and request_timeout; from GcsConfig: direct_connectivity; from GitConfig: binary and allow_any_sha1_in_want.

deny_unknown_fields now fails startup (and per-repo settings merge) if any of those keys appear in TOML or env overrides. walgit.example.toml, env-override tests, and new unit tests mirror the same rejections (alongside existing patterns for removed bundle/compaction keys).

Tests no longer opt into allow_any_sha1_in_want or tune request_timeout in the harness; partial-clone / repair e2e assume arbitrary object wants work by default. docs/INTEGRITY.md explains that lazy partial-clone fetches always allow SHA wants and that dropping the switch does not change the access model. Middleware docs are trimmed to match (per-repo concurrency only). .gitignore adds .DS_Store.

Reviewed by Cursor Bugbot for commit f7633ac. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d94b476b-5b73-4004-9ac2-ff06f1dca91f
Commits

Reviewing files that changed from the base of the PR and between 898443e and f7633ac.

Files selected for processing: 8
  • .gitignore
  • crates/walgit-config/src/lib.rs
  • crates/walgit-server/src/middleware.rs
  • crates/walgit-server/tests/e2e.rs
  • crates/walgit-server/tests/harness.rs
  • crates/walgit-server/tests/maintain.rs
  • docs/INTEGRITY.md
  • walgit.example.toml

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 27fa8624-900c-4851-82fd-3b1cb30fe9e8
Commits

Reviewing files that changed from the base of the PR and between 7293b1e and 959fd37.

Files selected for processing: 8
  • .gitignore
  • crates/walgit-config/src/lib.rs
  • crates/walgit-server/src/middleware.rs
  • crates/walgit-server/tests/e2e.rs
  • crates/walgit-server/tests/harness.rs
  • crates/walgit-server/tests/maintain.rs
  • docs/INTEGRITY.md
  • walgit.example.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The pull request removes several server, GCS, and Git configuration options and updates defaults, examples, tests, and documentation. It also adds .DS_Store to .gitignore.

Changes

Configuration Surface Cleanup

Layer / File(s) Summary
Remove configuration fields and validate parsing
crates/walgit-config/src/lib.rs, walgit.example.toml
The configuration structs, defaults, and example TOML omit the removed options. Tests check rejection of removed settings and update environment-override cases.
Update server tests and integrity documentation
crates/walgit-server/src/middleware.rs, crates/walgit-server/tests/*, docs/INTEGRITY.md
Server tests no longer set the removed options. Middleware and integrity documentation are updated to describe the configuration and object-want behavior.

Git Ignore Update

Layer / File(s) Summary
Ignore .DS_Store files
.gitignore
Adds .DS_Store to the ignored-file patterns.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: tobi

Merge Risk: Minimal · previous review 959fd

No actionable merge-blocking issue was identified in the configuration cleanup and documentation updates. Merge after normal checks pass.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: removing unused configuration keys that walgit parses but never reads.
Description check Passed The description directly explains the removed configuration keys, the arbitrary object-want behavior, and the grouped changes.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks the config keys,
Then hops past settings now removed.
The examples match the fields that stay,
While tests confirm the new defaults.
.DS_Store hides from Git today,
And tidy paths delight the hare.

@yordis yordis closed this Oct 31, 2026
@yordis yordis reopened this Oct 31, 2026
@yordis
yordis force-pushed the yordis/chore-config-remove-dead-keys branch 2 times, most recently from 898443e to 86995f8 Compare October 31, 2026 16:53
## Summary

### Why?

Partial-clone lazy fetches require direct object wants, while the configuration claimed they could be disabled even though both upload-pack engines always accepted them.

### What?

Remove the inert `git.allow_any_sha1_in_want` option and update tests and integrity documentation to describe arbitrary object wants as part of partial-clone support.

## Test Plan

⚠️ Rust tests were not run because `cargo` is unavailable in this environment; `git diff --check` passes.

## Issue

Closes tobi#77

(cherry picked from commit 06a0ef3)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Clarify that repository read access already permits fetching stored objects by ID, including unreachable objects, so removing the ineffective configuration switch does not widen authorization.

(cherry picked from commit b0b18b1)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
## Summary

### Why?

The server exposed global concurrency and total request timeout settings without a safe way to apply them. Enforcing them around the whole router would queue health probes behind clones and terminate long streaming Git, LFS, and pack responses mid-transfer.

### What?

Remove `server.max_concurrent_requests` and `server.request_timeout`, along with the unsafe middleware implementation and misleading documentation. Keep the existing per-repository Git concurrency limit, and reject the removed keys instead of silently accepting unsupported controls.

## Test Plan

✅ `cargo test -p walgit-config removed_global_request_limit_configuration_is_rejected`

✅ `cargo check -p walgit-server`

✅ `cargo clippy -p walgit-server --all-targets -- -D warnings`

✅ `cargo fmt --all -- --check`

✅ `git diff --check`

## Issue

Closes tobi#78

(cherry picked from commit c7ab81a)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
## Summary

### Why?

`git.binary` implied that every Git subprocess could use an operator-selected executable, but the implementation consistently invokes `git` from `PATH` and never read the setting.

### What?

Remove the unsupported configuration field and example entry, and verify that the obsolete key is rejected instead of silently suggesting custom-binary support.

## Test Plan

✅ `cargo test -p walgit-config removed_git_binary_configuration_is_rejected`
✅ `cargo fmt --all -- --check`
✅ `git diff --check`

## Issue

Closes tobi#81

(cherry picked from commit 129fcc2)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
`server.http2` and `store.gcs.direct_connectivity` were accepted configuration values with no runtime consumers, so changing them gave operators a false impression that transport behavior changed.

Remove both unsupported switches from the configuration surface and example file, and add a regression test proving the obsolete keys are rejected.

✅ `cargo test -p walgit-config removed_transport_switches_are_rejected`
✅ `cargo fmt --all -- --check`
✅ `git diff --check`

Closes tobi#83

(cherry picked from commit a200384)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
## Summary

### Why?

Finder-created `.DS_Store` files appeared as untracked changes throughout the repository and could be committed accidentally.

### What?

Ignore `.DS_Store` recursively from the root ignore file.

## Test Plan

✅ `git check-ignore -v .DS_Store crates/.DS_Store crates/walgit-server/.DS_Store`
✅ `git diff --check`

## Issue

Closes tobi#84

(cherry picked from commit ef1120d)
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis
yordis force-pushed the yordis/chore-config-remove-dead-keys branch from 86995f8 to f7633ac Compare October 31, 2026 17:19
@yordis
yordis merged commit 79d4f44 into main Oct 31, 2026
7 checks passed
@yordis
yordis deleted the yordis/chore-config-remove-dead-keys branch October 31, 2026 17:44
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.

2 participants