Skip to content

Clean up orphaned wiki and reports previews #60

@coisa

Description

@coisa

Objective

Add cleanup and validation for orphaned wiki and reports previews left behind after pull requests are closed, merged, or workflow cleanup fails.

Current Limitation

The wiki and reports workflows create PR-scoped preview state. Wiki previews use pr-* branches in the wiki repository, and reports previews use PR-scoped Pages/preview output. If a cleanup step fails or a workflow is interrupted, orphaned previews can remain indefinitely.

Proposed Work

Add an automated validation and cleanup path that detects preview artifacts for closed pull requests and removes or reports orphaned state.

Scope

  • Detect wiki preview branches named pr-<number> whose pull request is closed.
  • Detect reports preview directories/environments/artifacts that correspond to closed pull requests where technically possible.
  • Provide a cleanup workflow or command that can run manually and on a schedule.
  • Report what was deleted and what could not be safely deleted.
  • Keep cleanup conservative for active/open pull requests.

Non-goals

  • Deleting canonical wiki master content.
  • Deleting canonical GitHub Pages production content.
  • Changing how previews are generated.
  • Deleting unsupported resources without clear ownership proof.

Acceptance Criteria

Delivery Criteria

  • Closed pull request wiki preview branches can be identified and removed safely.
  • Open pull request preview branches are preserved.
  • Reports preview cleanup is implemented for the preview storage model used by the repository.
  • The cleanup path can be run manually.
  • Cleanup output lists deleted, skipped, and failed resources.
  • Tests or workflow validation cover open versus closed PR decisions.

Architectural / Isolation Criteria

  • Cleanup logic is conservative and deterministic.
  • Preview ownership is derived from PR numbers and repository state, not hard-coded lists.
  • Cleanup failures do not remove production documentation or coverage output.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Released

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions