---
id: WF-MBR-MEM-003
title: Correct a term and re-mirror what follows it
trigger: 'Staff submit a corrected term, its read version and an explanation.'
product_area: membership
module: memberships
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
implements:
  - CAP-MBR-MEM-003
  - CAP-MBR-MEM-006
  - CAP-MBR-MEM-018
moves:
  - STATE-MBR-MEM-003
  - STATE-MBR-MEM-005
crosses:
  - SVC-MBR-MEM-memberships
  - SVC-MBR-MEM-events
  - SVC-MBR-MEM-history
idempotency: >-
  A completed correction advances the term version. Repeating the earlier
  version is refused rather than applying again.
concurrency: >-
  The membership lock orders corrections and the submitted term version rejects
  stale requests. The operation does not recheck coverage in exclusive sibling
  programs.
hops:
  - 'n': 1
    actor_or_service: Membership staff through the API
    action: >-
      Lock the owning membership and check the term version, principal origin
      and committed state.
    anchor: >-
      services-membership:modules/memberships/services/operations/staff-operations.ts:lockTerm
    seam: sync
    on_failure: >-
      Reject stale versions with the current version, or return a validation
      refusal.
    left_inconsistent: No partial local change remains.
    observer: Caller-visible API result
    provenance: observed
    source: >-
      services-membership:modules/memberships/services/operations/staff-operations.ts:lockTerm,
      correctTerm
  - 'n': 2
    actor_or_service: Memberships service
    action: >-
      Reject conflicting dates within the holding and update the term while
      temporal capture preserves previous values.
    anchor: >-
      services-membership:modules/memberships/services/operations/term-writes.ts:ensureNoOverlap
    seam: sync
    on_failure: Report the conflicting coverage and roll back the transaction.
    left_inconsistent: No partial local change remains.
    observer: Caller-visible API result
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#keeps
      the old truth of a correction in the versions
  - 'n': 3
    actor_or_service: Memberships service
    action: >-
      Trim or remove affiliations outside the revised span and recheck changed
      classification rules.
    anchor: >-
      services-membership:modules/memberships/services/affiliations/affiliation-operations.ts:keepAffiliationsInsideTerm
    seam: sync
    on_failure: Return the violated unit rule and commit no changes.
    left_inconsistent: >-
      Rollback is complete; after a successful earlier start, chapter spans can
      still begin on their previous date.
    observer: Caller-visible API result
    provenance: observed
    source: >-
      services-membership:modules/memberships/services/affiliations/affiliation-operations.ts:keepAffiliationsInsideTerm
  - 'n': 4
    actor_or_service: Memberships service
    action: >-
      Record correction and the superseded business event, then update periods
      linked to the source.
    anchor: >-
      services-membership:modules/memberships/services/operations/staff-operations.ts:correctTerm
    seam: sync
    on_failure: An error aborts the transaction and reverses its writes.
    left_inconsistent: No partial local change remains.
    observer: Caller-visible API result
    provenance: test
    source: >-
      services-membership:tests/acceptance/memberships/MBR-ACC-0182.acceptance.ts#MBR-ACC-0182
  - 'n': 5
    actor_or_service: Memberships service
    action: Recalculate organizational children and cached membership facts.
    anchor: >-
      services-membership:modules/memberships/services/operations/term-writes.ts:finishMembershipWrite
    seam: sync
    on_failure: An error aborts the transaction and reverses its writes.
    left_inconsistent: No partial local change remains.
    observer: Caller-visible API result
    provenance: observed
    source: >-
      services-membership:modules/memberships/services/flowdown/organization-children.ts:syncOrganizationChildren
branches:
  - >-
    Grant mirrors can shorten with a contracted source end but do not grow when
    that source end is extended.
waits: []
evidence:
  - >-
    services-membership at 5994c270:
    modules/memberships/services/operations/staff-operations.ts;
    services/affiliations/affiliation-operations.ts;
    services/flowdown/organization-children.ts
controls: [TC-AVL-002, TC-AVL-003, TC-AVL-004, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CRY-001, TC-CRY-002, TC-CRY-003, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-007, TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-IAM-006, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-MON-001, TC-MON-002, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002, TC-SEC-001, TC-SEC-004, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-TEN-004]
---

# Correct a term and re-mirror what follows it

## What It Does

Staff correct a committed period while preserving its earlier recorded values. Affiliation trimming and linked-period updates follow the correction in the same transaction.

## The Flow

```mermaid
flowchart TD
  H1["Lock the owning membership and check the term version, principal origin and committed state"]
  H2["Reject conflicting dates within the holding and update the term while temporal capture preserves previous values"]
  H1 --> H2
  H3["Trim or remove affiliations outside the revised span and recheck changed classification rules"]
  H2 --> H3
  H4["Record correction and the superseded business event, then update periods linked to the source"]
  H3 --> H4
  H5["Recalculate organizational children and cached membership facts"]
  H4 --> H5
```

## When Something Fails

Refusal rolls back the correction and dependent writes. Successful correction can leave chapters starting at the former date when coverage moves earlier, omits minimum-count rechecking, and publishes no separate event for affiliation trimming.

## Open Design Questions

Decide whether earlier starts should extend chapter spans and whether correction should revalidate cross-program exclusivity.
