retention: explicit run-history and artifact retention

Add `pipelines retention report` (strictly read-only) and
`pipelines retention apply` (explicit, approval-gated removal) with an age
and/or count policy, protected-run rules, atomic single-transaction removal
and honest database space reclaim. Nothing prunes automatically.
This commit is contained in:
2026-10-17 15:45:46 +01:00
parent b2e920a150
commit 14175eba70
15 changed files with 2127 additions and 12 deletions
+3 -1
View File
@@ -44,7 +44,9 @@ func artifactsSummary(step protocol.RunStep) string {
return label
}
func humanBytes(size int64) string {
// HumanBytes renders a byte size with binary units. It is the one byte
// formatter shared by the TUI and the CLI, so sizes never diverge.
func HumanBytes(size int64) string {
const unit = 1024
if size < unit {
return fmt.Sprintf("%d B", size)