Remove test-only fields from the Config struct
Intent: Eliminate three fields (`repos`, `merged_lookback_hours`, `allowed_npubs`) that were gated behind `#[cfg(test)]` and only existed to satisfy inline struct literals in tests. These fields had no production use and forced every test to supply values for them.
Affected files: crates/pika-git/src/config.rs
@@ -21,9 +21,6 @@
#[derive(Debug, Clone, Deserialize)]
#[allow(dead_code)]
pub struct Config {
- #[cfg(test)]
- #[serde(default)]
- pub repos: Vec<String>,
@@ -34,9 +31,6 @@
pub github_token_env: String,
- #[cfg(test)]
- #[serde(default)]
- pub merged_lookback_hours: u64,
@@ -47,9 +41,6 @@
pub bind_port: u16,
- #[cfg(test)]
- #[serde(default)]
- pub allowed_npubs: Vec<String>,
Three fields on Config were annotated with #[cfg(test)] and #[serde(default)]:
repos: Vec<String>— a leftover from an earlier multi-repo designmerged_lookback_hours: u64— unused outside of struct literals in testsallowed_npubs: Vec<String>— superseded by the persistent allowlist in the store
All three are removed outright. This shrinks the production-compiled struct and eliminates the need for tests to populate these fields.