Skip to content

CAP-PFM-DJE-020Maintain and retire monthly history partitions

Markdown

CAP-PFM-DJE-020

Maintain and retire monthly history partitions

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleData Job EngineRevision1

Read atservices-platform ad3f6a65macroservice-libraries 54536a44

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Registered tables have current and future monthly partitions.Expired partitions follow archive-before-drop retirement.Per-table failures are visible without stopping other table passes.
Surfaces
job

Controls

22 controls apply, from the corpus control catalogue.

TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-CHG-007 TC-DAT-004 TC-IAM-001 TC-IAM-006 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-MON-001 TC-MON-002 TC-PI-001 TC-PI-005 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Business Rules

6 rules, 4 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
The daily 03:17 UTC schedule ensures the current month and next two months for registered tables, leaving existing partitions intact.
lifecycleservice, databaseobserved
02must prove
Proposed
Expired partitions follow detach, archive and drop ordering; the helper contract retains detached secured data after archive failure for a later attempt.
lifecycleservice, databasedocumented
03must prove
Proposed
The partition helper contract creates a child with its parent’s row security, policies and privileges in the same transaction.
invariantdatabasedocumented
services-platform:docs/partitions.md#A partition is secured like its parent
04must prove
Proposed
A table failure is reported in an overall failed run while other table passes continue; failure metrics and full-run heartbeat metrics support separate alarms.
policyservicetest
05
Proposed
Partition month boundaries follow UTC rather than workspace-local dates.
policydatabasedocumented
06
Proposed
Partition maintenance serves registered history from other modules; job receipts and refusals remain unpartitioned.
policydatabasedocumented

Scenarios

IdGivenWhenThenProvenance
01One of two registered table passes fails.Scheduled maintenance runs.The overall run names its failed table while the other table prepares future months and retires its two expired months.test
services-platform:modules/partitions/tests/integration/services/maintenance/maintain-partitions.integration.spec.js#still keeps the other table: the months ahead created, the two expired months archived and dropped

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.