artifact_storage_bloat_analysis
Analyze artifact storage bloat: rank projects by bytes, count expired artifacts, and estimate reclaimable space.
Instructions
[READ] Rank projects by storage; estimate reclaimable artifact bytes.
The flagship storage RCA: pulls project storage statistics, ranks projects by repo + artifact bytes, counts expired-but-kept artifacts and artifacts older than old_artifact_days, and estimates the reclaimable bytes per project. Every ranking carries its byte numbers. Pass 'projects' (and optionally 'artifacts_by_project') for pure analysis, or a target to pull live.
Args: old_artifact_days: Age in days past which a kept artifact counts as reclaimable (default 30). limit: How many projects to pull when live (default 100). projects: Injected rows {path, repoBytes, artifactsBytes}; skips the live pull. artifacts_by_project: Injected map {project: [{file, sizeBytes, createdAt, expireAt}]}. target: Server target name from config; omit for the default.
Returns dict: {projectsEvaluated, totalReclaimableBytes, thresholds, projects:[{project, repoBytes, artifactsBytes, totalBytes, expiredButKept, reclaimableBytes, action}], note}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| target | No | ||
| projects | No | ||
| old_artifact_days | No | ||
| artifacts_by_project | No |