archive_pending_programmes
Archive terminal programmes left in the live DB before automatic archiving existed. Run with dry_run=true to preview pending records, then pass false to migrate them.
Instructions
Archive terminal programmes that are still in the live DB.
This is a migration tool for programmes that were closed (completed or abandoned) before the automatic archiver was implemented. It scans the live DB for terminal programmes not yet archived and archives them.
dry_run=true reports the scan result ({would_archive, would_mark_archived, skipped}) without writing anything.
Under normal operation, this is a no-op — close_programme already archives automatically. This tool only catches programmes that slipped through (e.g. abandoned before Phase 3 was deployed).
Returns: {archived: [...], errors: [...], skipped: int}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | Yes | When true, report what would be archived without mutating. Required — pass false to apply. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | No | ||
| dry_run | No | ||
| skipped | No | ||
| archived | No | ||
| would_archive | No | ||
| marked_archived | No | ||
| would_mark_archived | No |