--- type: extension-point id: EP-RAIL-001 title: "Goss TAP report pruning" target_org: railiance target_repo: railiance-hosts status: open created: "2026-03-09" source_repo: railiance-infra related_workstream_id: "" --- # EP-RAIL-001: Goss TAP Report Pruning ## Context `make verify` commits a new TAP report file to `reports/` on every run: ``` reports/goss-Railiance01-2026-03-09T154855Z.tap ``` As the fleet grows and verify runs more frequently, `reports/` will accumulate indefinitely and bloat the repository history. ## Extension Point Add a `make prune-reports` target (or integrate into `make verify`) that: - Keeps the N most recent reports per host (suggested default: N=30) - Removes older files and commits the deletion - Is configurable via a Makefile variable (`REPORTS_KEEP ?= 30`) Suggested implementation sketch: ```makefile REPORTS_KEEP ?= 30 prune-reports: ## Remove old Goss TAP reports, keep REPORTS_KEEP most recent per host @for host in $$(ls reports/goss-*.tap 2>/dev/null | sed 's|reports/goss-||;s|-[0-9T]*Z\.tap||' | sort -u); do \ ls -t reports/goss-$$host-*.tap | tail -n +$$(($(REPORTS_KEEP)+1)) | xargs -r rm -v; \ done @git add reports/ && git diff --cached --quiet || \ git commit -m "chore: prune Goss reports older than $(REPORTS_KEEP) per host" ``` ## Trigger Implement when any of the following is true: - `reports/` contains more than 200 files, OR - Repository size grows noticeably due to reports, OR - verify is integrated into CI with high frequency runs