---
id: ATS-MBR-MEM-006
scope: CAP-MBR-MEM-006
product_area: membership
module: memberships
revision: 2
status: proposed
approved_by: null
approved_at: null
source_sha:
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-MBR-MEM-006-01
    title: Commit package grants with the source term
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-01
    preconditions: A selected package grants a section membership to the same owner.
    steps:
      - do: >-
          Create the source membership and inspect its additional program
          membership after commit.
        expect: >-
          The additional membership and source-linked term exist after the same
          commit.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
            the granted membership and term of a package grant in the same
            transaction
    expected: >-
      The additional membership and source-linked term exist after the same
      commit.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to:
      - TST-MBR-MEM-028
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
      the granted membership and term of a package grant in the same transaction
    category: interaction
    binding_evidence:
      - suite: TST-MBR-MEM-028
        source: >-
          services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
          the granted membership and term of a package grant in the same
          transaction
  - id: ATS-MBR-MEM-006-02
    title: Compute grant periods for enrolment and renewal
    level: unit
    proves:
      - BR-CAP-MBR-MEM-006-02
    preconditions: 'Grant inputs include same-as-primary, own-rule and renewal cases.'
    steps:
      - do: Plan initial and renewed grants using each supported date rule.
        expect: >-
          Mirroring retains source dates; own rules respect the source start;
          renewal plans the next target period.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
            a granted term with the primary term’s dates for a grant same as
            primary
          - >-
            services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
            a granted term by the grant’s own rule, never starting before the
            primary term
          - >-
            services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
            the next granted term on a renewal of the granting package
    expected: >-
      Mirroring retains source dates; own rules respect the source start;
      renewal plans the next target period.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to:
      - TST-MBR-MEM-034
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
      a granted term with the primary term’s dates for a grant same as primary
    category: rule
    binding_evidence:
      - suite: TST-MBR-MEM-034
        source: >-
          services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
          a granted term with the primary term’s dates for a grant same as
          primary
      - suite: TST-MBR-MEM-034
        source: >-
          services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
          a granted term by the grant’s own rule, never starting before the
          primary term
      - suite: TST-MBR-MEM-034
        source: >-
          services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
          the next granted term on a renewal of the granting package
  - id: ATS-MBR-MEM-006-03
    title: Skip an overlapping target-program period
    level: unit
    proves:
      - BR-CAP-MBR-MEM-006-03
    preconditions: An effective target-program term overlaps a planned grant period.
    steps:
      - do: Plan the grant against the already-held effective target period.
        expect: >-
          No duplicate period is planned, and the skipped result identifies the
          overlapping term.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#skips
            a grant the member already holds for those dates, naming the term
    expected: >-
      No duplicate period is planned, and the skipped result identifies the
      overlapping term.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to:
      - TST-MBR-MEM-034
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#skips
      a grant the member already holds for those dates, naming the term
    category: edge
    binding_evidence:
      - suite: TST-MBR-MEM-034
        source: >-
          services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#skips
          a grant the member already holds for those dates, naming the term
  - id: ATS-MBR-MEM-006-04
    title: Select organizational contacts through qualifying roles
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-04
    preconditions: An organization has contacts with qualifying and nonqualifying roles.
    steps:
      - do: >-
          Create the corporate period and inspect which contacts receive
          mirrored memberships.
        expect: >-
          Qualifying contacts receive mirrored coverage; contacts with unrelated
          roles receive none.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows
            down to the contacts holding a flow-down role, mirroring the
            parent’s dates with the flow-down type
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#gives
            nothing to a contact whose role is not a flow-down role
    expected: >-
      Qualifying contacts receive mirrored coverage; contacts with unrelated
      roles receive none.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to:
      - TST-MBR-MEM-027
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows
      down to the contacts holding a flow-down role, mirroring the parent’s
      dates with the flow-down type
    category: rule
    binding_evidence:
      - suite: TST-MBR-MEM-027
        source: >-
          services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows
          down to the contacts holding a flow-down role, mirroring the parent’s
          dates with the flow-down type
      - suite: TST-MBR-MEM-027
        source: >-
          services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#gives
          nothing to a contact whose role is not a flow-down role
  - id: ATS-MBR-MEM-006-05
    title: Limit cascading to ten descendant levels
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-05
    preconditions: >-
      An eleven-level hierarchy contains eligible contacts at the tenth and
      eleventh depths.
    steps:
      - do: Derive corporate coverage and inspect contacts at each depth.
        expect: Depth-ten contacts receive coverage and depth-eleven contacts do not.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#cascades
            to the contacts of child organizations down to depth 10 and no
            further
          - >-
            services-membership:tests/acceptance/affiliations/MBR-ACC-0274.acceptance.ts#MBR-ACC-0274:
            Acme's corporate membership reaches its CEO, its engineers and the
            people of its subsidiaries ten levels down, each with a mirrored
            employee term, and follows the parent through correction,
            termination, suspension and restore
    expected: Depth-ten contacts receive coverage and depth-eleven contacts do not.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to:
      - TST-MBR-MEM-027
      - TST-MBR-MEM-057
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#cascades
      to the contacts of child organizations down to depth 10 and no further
    category: boundary
    binding_evidence:
      - suite: TST-MBR-MEM-027
        source: >-
          services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#cascades
          to the contacts of child organizations down to depth 10 and no further
      - suite: TST-MBR-MEM-057
        source: >-
          services-membership:tests/acceptance/affiliations/MBR-ACC-0274.acceptance.ts#MBR-ACC-0274:
          Acme's corporate membership reaches its CEO, its engineers and the
          people of its subsidiaries ten levels down, each with a mirrored
          employee term, and follows the parent through correction, termination,
          suspension and restore
  - id: ATS-MBR-MEM-006-06
    title: Select assigned seats within the package cap
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-06
    preconditions: >-
      A decided organizational application names more contacts than the
      package’s seat allowance.
    steps:
      - do: >-
          Recalculate the organization’s children from the decided application
          contacts.
        expect: >-
          Only contacts selected before the seat cap can receive assigned
          coverage; contacts already flowed down retain that coverage.
        provenance: proposed
        source: >-
          services-membership:modules/memberships/services/flowdown/organization-children.ts:wantedPeople
    expected: >-
      Only contacts selected before the seat cap can receive assigned coverage;
      contacts already flowed down retain that coverage.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/services/flowdown/organization-children.ts:wantedPeople
    category: boundary
  - id: ATS-MBR-MEM-006-07
    title: Update child periods after a parental correction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-07
    preconditions: An organizational parent has mirrored child periods.
    steps:
      - do: >-
          Correct the parent’s end to an earlier date and inspect dependent
          periods.
        expect: Child mirrors follow the corrected end.
        provenance: test
        source:
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
    expected: Child mirrors follow the corrected end.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to:
      - TST-MBR-MEM-027
    provenance: test
    source: >-
      services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
      the children when the parent’s end is corrected: a child never outlasts
      the parent
    category: interaction
    binding_evidence:
      - suite: TST-MBR-MEM-027
        source: >-
          services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
          the children when the parent’s end is corrected: a child never
          outlasts the parent
  - id: ATS-MBR-MEM-006-08
    title: Withdraw coverage after eligibility ends
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-08
    preconditions: >-
      An engineer’s qualifying CRM role has ended but the change has not yet
      been handled.
    steps:
      - do: >-
          Deliver the role-change event and inspect the engineer’s term;
          separately exercise withdrawal before a child starts.
        expect: >-
          Started coverage closes on the handling day; not-yet-started coverage
          is cancelled.
        provenance: proposed
        source: >-
          services-membership:modules/memberships/services/flowdown/organization-children.ts:syncOrganizationChildren
    expected: >-
      Started coverage closes on the handling day; not-yet-started coverage is
      cancelled.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/services/flowdown/organization-children.ts:syncOrganizationChildren
    category: transition
  - id: ATS-MBR-MEM-006-09
    title: Converge after repeated CRM deliveries
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-09
    preconditions: >-
      Current CRM relationships and existing child memberships differ after a
      role change.
    steps:
      - do: >-
          Deliver a change again and in reordered batches, then inspect child
          periods and event counts.
        expect: >-
          Recomputation follows current CRM state without creating duplicate
          withdrawal events.
        provenance: proposed
        source: >-
          services-membership:modules/memberships/services/flowdown/crm-change-events.ts:handleCrmChangeEvents
    expected: >-
      Recomputation follows current CRM state without creating duplicate
      withdrawal events.
    negative: false
    data_needs: >-
      Package grants or organizational parents, CRM relationships and controlled
      dates appropriate to this derivation.
    bound_to: []
    provenance: proposed
    source: >-
      services-membership:modules/memberships/services/flowdown/crm-change-events.ts:handleCrmChangeEvents
    category: concurrency
  - id: ATS-MBR-MEM-006-10
    title: Keep enrolment and package grants in one commit
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-001-09
      - BR-CAP-MBR-MEM-006-01
    interacts_with:
      - CAP-MBR-MEM-001
    workflows:
      - WF-MBR-MEM-001
    relies_on:
      - ATS-MBR-MEM-001-09
      - ATS-MBR-MEM-006-01
    preconditions: A new person selects a granting package.
    steps:
      - do: >-
          Create the source membership, then inspect the source and granted
          holdings after commit; repeat with a refused creation.
        expect: >-
          The successful save contains source and grant periods; the refused
          save contains neither.
        provenance: proposed
        source: &ref_0
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
            a membership with its committed term, its enrolment and its cache
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
            the granted membership and term of a package grant in the same
            transaction
    expected: >-
      The successful save contains source and grant periods; the refused save
      contains neither.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_0
  - id: ATS-MBR-MEM-006-11
    title: Renew the source and its package grant together
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-002-02
      - BR-CAP-MBR-MEM-006-02
    interacts_with:
      - CAP-MBR-MEM-002
    workflows:
      - WF-MBR-MEM-002
    relies_on:
      - ATS-MBR-MEM-002-02
      - ATS-MBR-MEM-006-02
    preconditions: A person has a source term and its mirrored grant.
    steps:
      - do: Add an undated source renewal and inspect the granted holding.
        expect: >-
          The renewed source has a source-linked granted period calculated for
          that renewal.
        provenance: proposed
        source: &ref_1
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#adds
            a renewal continuing the latest term when no dates are given
          - >-
            services-membership:modules/memberships/tests/unit/grant-plan.spec.ts#plans
            a granted term with the primary term’s dates for a grant same as
            primary
    expected: >-
      The renewed source has a source-linked granted period calculated for that
      renewal.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_1
  - id: ATS-MBR-MEM-006-12
    title: Contract linked periods when staff correct the source
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-003-09
      - BR-CAP-MBR-MEM-006-07
    interacts_with:
      - CAP-MBR-MEM-003
    workflows:
      - WF-MBR-MEM-003
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-003-07
      - ATS-MBR-MEM-006-07
    preconditions: An organizational holding and a granting holding have dependent periods.
    steps:
      - do: 'Shorten each source period, then read its linked periods.'
        expect: >-
          Dependent periods retain their source links and reflect the permitted
          contracted coverage.
        provenance: proposed
        source: &ref_2
          - >-
            services-membership:tests/acceptance/memberships/MBR-ACC-0182.acceptance.ts#MBR-ACC-0182:
            Granted terms follow their source down but never up: shortened with
            a correction, terminated or cancelled with it, while the granted
            membership is not suspended with the primary
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
    expected: >-
      Dependent periods retain their source links and reflect the permitted
      contracted coverage.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_2
  - id: ATS-MBR-MEM-006-13
    title: Propagate suspension to organizational children
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-004-04
      - BR-CAP-MBR-MEM-006-04
    interacts_with:
      - CAP-MBR-MEM-004
    workflows: []
    relies_on:
      - ATS-MBR-MEM-004-03
      - ATS-MBR-MEM-006-04
    preconditions: An organization has qualifying people with derived holdings.
    steps:
      - do: >-
          Suspend the organization, inspect each child, then restore and inspect
          again.
        expect: >-
          Each linked child follows the parent suspension and restoration while
          retaining its term dates.
        provenance: proposed
        source: &ref_3
          - >-
            services-membership:modules/memberships/services/operations/staff-operations.ts:suspendChildren
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#flows
            down to the contacts holding a flow-down role, mirroring the
            parent’s dates with the flow-down type
    expected: >-
      Each linked child follows the parent suspension and restoration while
      retaining its term dates.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_3
  - id: ATS-MBR-MEM-006-14
    title: Keep child chapter coverage inside mirrored periods
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-07
      - BR-CAP-MBR-MEM-007-03
    interacts_with:
      - CAP-MBR-MEM-007
    workflows:
      - WF-MBR-MEM-002
    relies_on:
      - ATS-MBR-MEM-006-07
      - ATS-MBR-MEM-007-03
    preconditions: >-
      A child mirrors an organizational period and has allowed chapter
      connections.
    steps:
      - do: >-
          Shorten the parental period, then inspect the child period and its
          dated chapter answer.
        expect: >-
          Child coverage contracts with its source and no chapter answer extends
          beyond the contracted child period.
        provenance: proposed
        source: &ref_4
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
          - >-
            services-membership:modules/memberships/tests/unit/unit-rules.spec.ts#refuses
            fewer affiliations of a type than its minimum from the day the
            operation takes effect
    expected: >-
      Child coverage contracts with its source and no chapter answer extends
      beyond the contracted child period.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_4
  - id: ATS-MBR-MEM-006-15
    title: Use decided application contacts for assigned coverage
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-06
      - BR-CAP-MBR-MEM-012-05
      - BR-CAP-MBR-MEM-012-06
    interacts_with:
      - CAP-MBR-MEM-012
    workflows: []
    relies_on:
      - ATS-MBR-MEM-006-06
      - ATS-MBR-MEM-012-05
    preconditions: >-
      A corporate application carries selected people and a package with an
      assigned-seat cap.
    steps:
      - do: >-
          Record the application approval, fulfil its purchase, and derive
          children from the selected people.
        expect: >-
          The decided application supplies the assignment candidates and the
          resulting assigned holdings respect the selected cap.
        provenance: proposed
        source: &ref_5
          - >-
            services-membership:modules/memberships/services/flowdown/organization-children.ts:wantedPeople
          - >-
            services-membership:modules/applications/tests/integration/decision-handler.integration.spec.ts#records
            an approval, places the dues order through the port (package and
            chapter dues), and acknowledges it
    expected: >-
      The decided application supplies the assignment candidates and the
      resulting assigned holdings respect the selected cap.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_5
  - id: ATS-MBR-MEM-006-16
    title: Close dependent coverage through a billing drop
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-07
      - BR-CAP-MBR-MEM-013-08
      - BR-CAP-MBR-MEM-013-09
    interacts_with:
      - CAP-MBR-MEM-013
    workflows:
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-006-07
      - ATS-MBR-MEM-013-08
    preconditions: >-
      A lapsed organizational period has linked child periods and a planned
      drop.
    steps:
      - do: >-
          Execute the billing drop and inspect the source and linked child
          periods.
        expect: >-
          The drop records its configured reason and closes the applicable
          linked coverage with the source.
        provenance: proposed
        source: &ref_6
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
          - >-
            services-membership:modules/billing/tests/integration/billing-runs.integration.spec.ts#executes
            on the jobs engine: one order per renewing candidate (Jo’s with both
            dues chapters), a notice and reminder each, one drop per lapsed term
    expected: >-
      The drop records its configured reason and closes the applicable linked
      coverage with the source.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_6
  - id: ATS-MBR-MEM-006-17
    title: Keep fan-out and alert resolution in the source save
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-07
      - BR-CAP-MBR-MEM-014-07
    interacts_with:
      - CAP-MBR-MEM-014
    workflows:
      - WF-MBR-MEM-002
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-006-07
      - ATS-MBR-MEM-014-07
    preconditions: >-
      Publication is enabled for an expiring organizational membership with
      children.
    steps:
      - do: >-
          Renew the organization and inspect renewed source coverage, derived
          periods and the original alert.
        expect: >-
          The committed source renewal supplies the linked periods and resolves
          the original alert; a refused save leaves the prior state.
        provenance: proposed
        source: &ref_7
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
          - >-
            services-membership:modules/memberships/tests/integration/services/expiring-memberships.integration.spec.ts#resolves
            the item renewed in the staff renewal’s transaction
    expected: >-
      The committed source renewal supplies the linked periods and resolves the
      original alert; a refused save leaves the prior state.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_7
  - id: ATS-MBR-MEM-006-18
    title: Retain child history before a parental correction
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-07
      - BR-CAP-MBR-MEM-018-08
    interacts_with:
      - CAP-MBR-MEM-018
    workflows:
      - WF-MBR-MEM-003
    relies_on:
      - ATS-MBR-MEM-006-07
      - ATS-MBR-MEM-018-08
    preconditions: A mirrored child period and its source have committed versions.
    steps:
      - do: >-
          Correct the parent end, then reconstruct the child before and after
          the recording instant.
        expect: >-
          Earlier knowledge retains the old child end and later knowledge shows
          the contracted end.
        provenance: proposed
        source: &ref_8
          - >-
            services-membership:modules/memberships/tests/integration/services/organization-children.integration.spec.ts#re-mirrors
            the children when the parent’s end is corrected: a child never
            outlasts the parent
          - >-
            services-membership:modules/history/tests/integration/membership-as-of.integration.spec.ts#answers
            the term as it was known before the correction, with a known_at
            before it
    expected: >-
      Earlier knowledge retains the old child end and later knowledge shows the
      contracted end.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_8
  - id: ATS-MBR-MEM-006-19
    title: State commitment for a package grant with its source
    category: interaction
    level: api
    proves:
      - BR-CAP-MBR-MEM-006-01
      - BR-CAP-MBR-MEM-020-01
    interacts_with:
      - CAP-MBR-MEM-020
    workflows:
      - WF-MBR-MEM-004
    relies_on:
      - ATS-MBR-MEM-006-01
      - ATS-MBR-MEM-020-01
    preconditions: A new person selects a granting package.
    steps:
      - do: >-
          Create the source period and inspect the committed events for both
          source and granted periods.
        expect: >-
          Both committed periods have their corresponding commitment events; a
          rolled-back save retains neither event.
        provenance: proposed
        source: &ref_9
          - >-
            services-membership:modules/memberships/tests/integration/services/staff-operations.integration.spec.ts#creates
            the granted membership and term of a package grant in the same
            transaction
          - >-
            services-membership:modules/events/tests/integration/business-events.integration.spec.ts#states
            membership.term.committed and the term’s affiliation for a staff
            creation, naming the person, the program and the term
    expected: >-
      Both committed periods have their corresponding commitment events; a
      rolled-back save retains neither event.
    negative: false
    data_needs: >-
      An isolated workspace with the specified membership, package, chapter and
      partner-port fixtures.
    bound_to: []
    provenance: proposed
    source: *ref_9
evidence:
  - >-
    services-membership at 5994c270e8a37a30f848e99ba5b5ee6b87c08893: reviewed
    grant planning and application, organizational child derivation, current-CRM
    delivery handling, ownership constraints and the cited integration and
    acceptance assertions.
  - >-
    rhythm-v2-docs:specs/membership/memberships/design/: domain objects, state
    models and workflows reviewed for coverage.
coverage:
  rule: 'gap: FND-MBR-MEM-088'
  transition: 'gap: FND-MBR-MEM-088'
  validation: 'gap: FND-MBR-MEM-088'
  permission: 'gap: FND-MBR-MEM-088'
  edge: covered
  failure: 'gap: FND-MBR-MEM-088'
  boundary: covered
  concurrency: covered
  invariant: 'gap: FND-MBR-MEM-088'
  interaction: covered
coverage_notes:
  transition: >-
    The scenarios do not enumerate every applicable object transition; the
    finding preserves the remaining transition matrix.
  permission: >-
    The finding records named permissions without a complete positive and
    negative proof.
  invariant: >-
    Existing invariant examples do not cover every applicable domain-object
    constraint.
  interaction: >-
    Every related capability and each cross-capability workflow has an explicit
    composite scenario. Unbound composites remain proposed.
---

# Derive package grants and organizational child memberships: Capability Test Specification

## Coverage

| Rule | Scenario or Finding |
|---|---|
| `BR-CAP-MBR-MEM-006-01` | `ATS-MBR-MEM-006-01`, `ATS-MBR-MEM-006-10`, `ATS-MBR-MEM-006-19` |
| `BR-CAP-MBR-MEM-006-02` | `ATS-MBR-MEM-006-02`, `ATS-MBR-MEM-006-11` |
| `BR-CAP-MBR-MEM-006-03` | `ATS-MBR-MEM-006-03` |
| `BR-CAP-MBR-MEM-006-04` | `ATS-MBR-MEM-006-04`, `ATS-MBR-MEM-006-13` |
| `BR-CAP-MBR-MEM-006-05` | `ATS-MBR-MEM-006-05` |
| `BR-CAP-MBR-MEM-006-06` | `ATS-MBR-MEM-006-06`, `ATS-MBR-MEM-006-15` |
| `BR-CAP-MBR-MEM-006-07` | `ATS-MBR-MEM-006-07`, `ATS-MBR-MEM-006-12`, `ATS-MBR-MEM-006-14`, `ATS-MBR-MEM-006-16`, `ATS-MBR-MEM-006-17`, `ATS-MBR-MEM-006-18` |
| `BR-CAP-MBR-MEM-006-08` | `ATS-MBR-MEM-006-08` |
| `BR-CAP-MBR-MEM-006-09` | `ATS-MBR-MEM-006-09` |
| `BR-CAP-MBR-MEM-006-10` | no scenario: `FND-MBR-MEM-019` |

## Interactions With Related Capabilities

The interaction cases test how a shared holding, period, chapter connection or recorded change affects related work. Each case names its related capabilities and workflows in frontmatter. A composite case remains proposed until executable assertions establish every part of its expected outcome.
