Define and automate Forgejo package and attachment retention after the disk-pressure purge #600
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/infrastructure#600
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The 2026-07-23 Forgejo DiskPressure incident required an operator-approved emergency purge. The inventory found 1,149 package versions totaling 170,495,076,359 logical bytes and 4,462 issue, comment, and release attachments totaling 51,871,068,871 bytes older than seven days. The purge removed or verified absent every targeted object with zero failures, Forgejo cleanup completed, and the root filesystem recovered to 56% utilization.
The seven-day cutoff was an emergency recovery choice, not a durable asset policy.
Related incident and prior storage work: #596, #488, and #490.
Policy decisions
Kai defines separate retention rules for:
Implementation
Done when
2026-07-24 retention evidence
Infrastructure#642 records the next-day recurrence and the completed 24-hour emergency purge.
Kai explicitly directed the operator to drop every package version older than 24 hours for this incident and accepted the recovery cost. The operator removed 1,072 user-visible versions through the Forgejo API, ran the supported
cleanup_packagestask, and verified that zero user-visible versions and zero unreferenced blobs older than the cutoff remain.Implementation evidence for this issue:
_uploadsentinel returns 404 through the ordinary package-version route. Forgejo's supported cleanup task must own its expired files.Today's 24-hour instruction is authoritative for the emergency recovery. This issue still owns whether Kai adopts it as the unattended permanent package policy and how exceptions, cadence, and audit output work.
2026-08-01 retention evidence: the package store is 120 GB referenced and only 149 MB expired-unreferenced, so garbage collection alone cannot recover the node. coilyco-flight-deck/container owns 117 GB. The agentic-os package alone owns 116 GB across 749 external tags. The owner has 823 container versions, 820 older than 24 hours, and no package cleanup rules.\n\nThe proposed supported Forgejo rule for coilyco-flight-deck/container is enabled=true, keep_count=50, keep_pattern=(?:latest|release|buildcache|lang-(?:node|go|dotnet|rust|python)-(?:release|buildcache)), remove_days=0, remove_pattern=.+, match_full_name=false. Forgejo 15 restricts remove_days to 0, 7, 14, 30, 60, 90, or 180. Seven days is unsafe at the observed growth rate. Keep-count 50 leaves smaller packages unchanged and bounds agentic-os while preserving moving release and build-cache aliases.\n\nNo rule has been enabled and no package version has been deleted. The current wall is a fresh Forgejo backup plus Kai's explicit destructive approval after preview.
Guarded immediate-relief tooling landed on main in
0d1b5a0(infrastructure#719). The script previews coilyco-flight-deck/container/agentic-os retention, preserves the newest 50 external versions plus latest/release/buildcache and every specialist release/buildcache alias, and requires an exact confirmation plus a successful restic backup no more than four hours old before using Forgejo package DELETE endpoints. It then launches the supported cleanup_packages task. No package version has been deleted yet. The next checkpoint is an attended live preview, followed by explicit approval and a fresh backup before apply. Permanent built-in cleanup-rule configuration and attachment retention remain open here.