feat(maintenance): add stale-task cleanup scheme
- scripts/cleanup_stale_tasks.py: daily script that cancels open tasks in completed/archived workstreams; handles 307 redirects; emits a cleanup progress event summarising results - Makefile: add cleanup-stale target (also suitable for cron) - ADR-001: append Workstream Closure Protocol section — mandatory closure review before marking workstream completed, with task classification table (done/cancelled/carry-forward) and Closure Review file format - WP-0002 + WP-0005: append Closure Review sections documenting the 2026-03-02 cleanup run (26 stale DB rows cancelled — all were legacy pre-ADR-001 DB-first records; file status was already done) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -304,3 +304,29 @@ Check if `WorkstreamRead` already exposes `domain_slug`; add if missing.
|
||||
The rename endpoint cascades updates to these columns.
|
||||
- `sync_workplans.py` (future, v0.3 Phase 4) will be able to ingest this
|
||||
file and reconcile it with the DB rows created during the planning session.
|
||||
|
||||
---
|
||||
|
||||
## Closure Review — 2026-03-02
|
||||
|
||||
**Outcome:** All 11 tasks completed. No carry-forwards. No dropped tasks.
|
||||
|
||||
**Context:** This workplan was created DB-first on 2026-02-28, before ADR-001 was formalised. The workplan file correctly recorded all tasks as `status: done`, but the DB rows were never synced from the file — they remained in their initial `todo` state in the database. The daily stale-task cleanup script (`scripts/cleanup_stale_tasks.py`) detected these 11 stale DB rows and cancelled them on 2026-03-02. No actual work was lost: all deliverables in Phase 1–4 were shipped as part of State Hub v0.5.
|
||||
|
||||
### Completed (DB updated at delivery time; file status = done)
|
||||
|
||||
- CUST-WP-0005-T01 — Create `domains` table + Alembic migration
|
||||
- CUST-WP-0005-T02 — Domain ORM model + Pydantic schemas
|
||||
- CUST-WP-0005-T03 — Domain API router: list, get, create, rename, archive
|
||||
- CUST-WP-0005-T04 — Update seed.py + TopicCreate schema for new domain model
|
||||
- CUST-WP-0005-T05 — Create `managed_repos` table + migration
|
||||
- CUST-WP-0005-T06 — Repo API router: register, list, update, archive
|
||||
- CUST-WP-0005-T07 — Update registration workflow: multi-repo + dynamic domains
|
||||
- CUST-WP-0005-T08 — MCP tools: domain lifecycle + repo registration
|
||||
- CUST-WP-0005-T09 — Live domain validation for EP/TD + domain stats in state summary
|
||||
- CUST-WP-0005-T10 — Dashboard: domains.md page
|
||||
- CUST-WP-0005-T11 — Dashboard: domain filter on workstreams, EP, TD pages
|
||||
|
||||
### Cancelled (DB records only — legacy stale rows, not real cancellations)
|
||||
|
||||
All 11 DB task rows were cancelled by the cleanup script. The workplan file was authoritative; the DB rows were artefacts of the pre-ADR-001 DB-first creation pattern. This does not reflect a change in work outcome.
|
||||
|
||||
Reference in New Issue
Block a user