[Feature] Configure safe terminal Calendar outbox retention #18

Closed
opened 2026-07-20 14:42:13 +02:00 by zemion · 3 comments
Owner

Goal

Make terminal outbox retention an operator setting while preserving unresolved desired state and audit/reconciliation safety.

Acceptance Criteria

  • CALENDAR_OUTBOX_TERMINAL_RETENTION_DAYS has a documented default, accepts 0 to disable cleanup, and rejects negative values.
  • Cleanup is bounded and tenant-scoped when dispatch is tenant-scoped.
  • Only old resolved succeeded, superseded, and cancelled rows are purged.
  • pending, retry, leased, conflict, and dead rows are never purged by terminal cleanup.
  • Cleanup cannot prevent reconciliation or erase unresolved desired state.
  • Deployment templates, install/runtime settings, and focused tests cover default, disabled, invalid, eligible, ineligible, and tenant-isolation behavior.

Current State

Integrated across Calendar, Core, and deployment configuration on remote main; the complete Calendar suite passes.

## Goal Make terminal outbox retention an operator setting while preserving unresolved desired state and audit/reconciliation safety. ## Acceptance Criteria - [ ] `CALENDAR_OUTBOX_TERMINAL_RETENTION_DAYS` has a documented default, accepts `0` to disable cleanup, and rejects negative values. - [ ] Cleanup is bounded and tenant-scoped when dispatch is tenant-scoped. - [ ] Only old resolved `succeeded`, `superseded`, and `cancelled` rows are purged. - [ ] `pending`, `retry`, `leased`, `conflict`, and `dead` rows are never purged by terminal cleanup. - [ ] Cleanup cannot prevent reconciliation or erase unresolved desired state. - [ ] Deployment templates, install/runtime settings, and focused tests cover default, disabled, invalid, eligible, ineligible, and tenant-isolation behavior. ## Current State Integrated across Calendar, Core, and deployment configuration on remote `main`; the complete Calendar suite passes.
Author
Owner

Codex State: in progress

Implemented locally: CALENDAR_OUTBOX_TERMINAL_RETENTION_DAYS defaults to 90, accepts 0 to disable cleanup, rejects negative values, and drives bounded tenant-scoped cleanup after dispatch. Only old succeeded, superseded, and cancelled rows purge; unresolved conflict and dead rows never do. Deployment templates/docs and focused tests are included.

Verification on 2026-07-20: Calendar 75/75, Core worker/config 7/7, Ruff, and diff checks passed. Keep open until integrated on remote main.

## Codex State: in progress Implemented locally: `CALENDAR_OUTBOX_TERMINAL_RETENTION_DAYS` defaults to 90, accepts 0 to disable cleanup, rejects negative values, and drives bounded tenant-scoped cleanup after dispatch. Only old `succeeded`, `superseded`, and `cancelled` rows purge; unresolved `conflict` and `dead` rows never do. Deployment templates/docs and focused tests are included. Verification on 2026-07-20: Calendar 75/75, Core worker/config 7/7, Ruff, and diff checks passed. Keep open until integrated on remote `main`.
Author
Owner

Codex State: progress

Summary

  • Terminal retention defaults to 90 days, accepts 0 to disable, rejects negative values, and purges only old resolved succeeded/superseded/cancelled rows; conflict/dead and active desired state are preserved.

Changed Files

  • govoplan-core 15596f0
  • govoplan-core d1c033e
  • govoplan-calendar a6cd64e
  • govoplan 8b80afb

Verification

  • Calendar retention/provider coverage included in 84 passing backend tests
  • Core install configuration: 5 passed

Next / Blocked

  • Review and push the local commits; keep the issue open until they are present on remote main.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Terminal retention defaults to 90 days, accepts 0 to disable, rejects negative values, and purges only old resolved succeeded/superseded/cancelled rows; conflict/dead and active desired state are preserved. ### Changed Files - `govoplan-core 15596f0` - `govoplan-core d1c033e` - `govoplan-calendar a6cd64e` - `govoplan 8b80afb` ### Verification - `Calendar retention/provider coverage included in 84 passing backend tests` - `Core install configuration: 5 passed` ### Next / Blocked - Review and push the local commits; keep the issue open until they are present on remote main. Suggested status label: `status/in-progress`
Author
Owner

Codex State: done

Summary

  • Configurable terminal retention is integrated across Calendar, Core configuration, and deployment templates; unresolved desired state is preserved.

Verification

  • Calendar suite: 102 passed.
## Codex State: done ### Summary - Configurable terminal retention is integrated across Calendar, Core configuration, and deployment templates; unresolved desired state is preserved. ### Verification - `Calendar suite: 102 passed.`
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-calendar#18
No description provided.