revert(maintenance): keep one-time TTL cleanup, narrow PR to validator-only

Per review feedback: auto-deleting completed one-time maintenance windows is
intentional cleanup, not a bug. The actual bug is past-dated end values being
accepted at creation time, which the validator refines now reject up front.

Reverts:
- Restore expiry field + TTL index on MaintenanceWindow schema
- Restore repository's auto-set of expiry = end for repeat=0
- Drop migration 0007 (no longer needed)
- Restore expiry properties in openapi.json
- Restore expiry in create/edit validators (still optional)

Kept from this PR:
- .strict() on create/edit body schemas
- end > start refine on create/edit
- end > now refine on create when repeat=0 (the real fix)
- DurationUnits const tuple + reuse (rules 5/8/10)
- Client no longer sends redundant expiry (server still derives it)
This commit is contained in:
gorkem-bwl committed 2026-05-07 13:38:10 -04:00
1 parent b462ba7562
commit c45bcfaa2f
6 files changed
+22 -60

No files matched your search

+10
View File
@@ -4657,6 +4657,11 @@
"repeat": {
"type": "number",
"minimum": 0
},
"expiry": {
"type": "string",
"nullable": true,
"format": "date-time"
}
},
"required": ["monitors", "name", "duration", "durationUnit", "start", "end", "repeat"]
@@ -5185,6 +5190,11 @@
"nullable": true,
"format": "date-time"
},
"expiry": {
"type": "string",
"nullable": true,
"format": "date-time"
},
"monitors": {
"type": "array",
"items": {