huskies: merge 1199 story Orphaned build-dir GC: reclaim dead worktree targets without touching warm caches
This commit is contained in:
@@ -148,6 +148,13 @@ pub struct ProjectConfig {
|
||||
/// merge or `FixupRequested`). Default: 3. Set to 0 to disable.
|
||||
#[serde(default = "default_merge_failure_block_threshold")]
|
||||
pub merge_failure_block_threshold: u32,
|
||||
/// Free space (in GB) below which an automatic build-directory GC pass
|
||||
/// (story 1199) is triggered to reclaim orphaned worktree `target/` dirs
|
||||
/// and a stale `.huskies/merge_workspace`. Checked on the same tick as the
|
||||
/// low-disk watchdog (story 1200), not a separate timer. Default: 0
|
||||
/// (disabled) — the on-demand `gc` MCP tool remains available regardless.
|
||||
#[serde(default)]
|
||||
pub gc_min_free_gb: u64,
|
||||
}
|
||||
|
||||
/// Configuration for the filesystem watcher's sweep behaviour.
|
||||
@@ -464,6 +471,7 @@ impl Default for ProjectConfig {
|
||||
gateway_project: None,
|
||||
status_push_enabled: default_status_push_enabled(),
|
||||
merge_failure_block_threshold: default_merge_failure_block_threshold(),
|
||||
gc_min_free_gb: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -555,6 +563,7 @@ impl ProjectConfig {
|
||||
gateway_project: None,
|
||||
status_push_enabled: default_status_push_enabled(),
|
||||
merge_failure_block_threshold: default_merge_failure_block_threshold(),
|
||||
gc_min_free_gb: 0,
|
||||
};
|
||||
validate_agents(&config.agent)?;
|
||||
return Ok(config);
|
||||
@@ -597,6 +606,7 @@ impl ProjectConfig {
|
||||
gateway_project: None,
|
||||
status_push_enabled: default_status_push_enabled(),
|
||||
merge_failure_block_threshold: default_merge_failure_block_threshold(),
|
||||
gc_min_free_gb: 0,
|
||||
};
|
||||
validate_agents(&config.agent)?;
|
||||
Ok(config)
|
||||
@@ -627,6 +637,7 @@ impl ProjectConfig {
|
||||
gateway_project: None,
|
||||
status_push_enabled: default_status_push_enabled(),
|
||||
merge_failure_block_threshold: default_merge_failure_block_threshold(),
|
||||
gc_min_free_gb: 0,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user