Skip to content

ATS-PFM-MTD-019Preserve Relationships Through Deletion and Merge: Capability Test Specification

Markdown

ATS-PFM-MTD-019

Preserve Relationships Through Deletion and Merge: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleMetadata and Organization-defined RecordsRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-PFM-MTD-081
  • Validation gap: FND-PFM-MTD-081
  • Permission covered
  • Edge covered
  • Failure gap: FND-PFM-MTD-081
  • Boundary covered
  • Concurrency gap: FND-PFM-MTD-081
  • Invariant covered
  • Interaction covered

Test Scenarios

10 scenarios proving CAP-PFM-MTD-019; 9 bound to an existing test.

01 Deletion policies agree on both sidesruleapinegativetest
Proves
BR-CAP-PFM-MTD-019-01 INV-DOM-PFM-MTD-006-08
Preconditions
Each rule has current and ended link fixtures.
Steps
[ { "do": "Delete each endpoint.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses with SQLSTATE AE409 and the message the TypeScript refusal has, removing nothing" } ]
Expected
Detach preserves the other record, cascade removes dependent custom records, restrict protects current links and ended links never block deletion.
Data
Each rule has current and ended link fixtures.
Bound to
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#removes the association and keeps the record on the other side, answering what it removed
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#deletes the custom record on the other side with its values and its association, and answers it
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses with SQLSTATE AE409 and the message the TypeScript refusal has, removing nothing
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#removes an ended association whatever its rule, and the deletion goes ahead
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#answers what endpointDeletionOutcome says for an open association on the to side under restrict
Source
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses with SQLSTATE AE409 and the message the TypeScript refusal has, removing nothing
02 Depth and locks stop unsafe cascadesboundaryapinegativetest
Proves
BR-CAP-PFM-MTD-019-02
Preconditions
Chains span the supported depth and exceed it, with another chain containing a lock.
Steps
[ { "do": "Delete each head.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses a chain of eleven with SQLSTATE AE409 and removes nothing of it" } ]
Expected
Supported chains are removed while excessive or locked chains fail without partial deletion.
Data
Chains span the supported depth and exceed it, with another chain containing a lock.
Bound to
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses a chain of eleven with SQLSTATE AE409 and removes nothing of it
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses to delete a locked record in the cascade, naming it, and removes nothing
Source
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses a chain of eleven with SQLSTATE AE409 and removes nothing of it
03 CRM deletion invokes Platform relationshipsinteractionapitest
Proves
BR-CAP-PFM-MTD-019-03
Preconditions
A deployed CRM contact owns a custom boat under a cascading owner type.
Steps
[ { "do": "Delete the owner through CRM and request the boat and its associations through Platform.", "provenance": "test", "source": "services-platform:tests/acceptance/custom-objects/deployed/associations/CO-ACC-0256.spec.js#step 3: Fulmar answers 404 and its associations are gone" } ]
Expected
The owner deletion succeeds, the boat is not found and its associations are gone.
Data
Deployed CRM endpoints have cascading and restricting links.
Bound to
services-platform:tests/acceptance/custom-objects/deployed/associations/CO-ACC-0256.spec.js#step 2: Ola is deleted through CRM’s contact delete route: success, and the contact is gone
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#names every restricting type, counted and sorted, when several hold the record
Source
services-platform:tests/acceptance/custom-objects/deployed/associations/CO-ACC-0256.spec.js#step 3: Fulmar answers 404 and its associations are gone
04 Cross-service cascades perform full cleanupinvariantapitest
Proves
BR-CAP-PFM-MTD-019-04
Preconditions
A custom record has values, assets and observable history and event storage.
Steps
[ { "do": "Delete its owner through endpoint policy.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does" } ]
Expected
Dependent cleanup, audit, revisions and events match direct record deletion.
Data
A custom record has values, assets and observable history and event storage.
Bound to
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does
Source
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does
05 Service execution cannot cross workspacespermissionapinegativetest
Proves
BR-CAP-PFM-MTD-019-05 INV-DOM-PFM-MTD-006-09
Preconditions
Deletion functions have authorized and unauthorized role contexts.
Steps
[ { "do": "Call under another workspace or an ungranted database role.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses another tenant than the transaction’s with 42501, removing nothing" } ]
Expected
Both calls fail without removing relationships.
Data
Deletion functions have authorized and unauthorized role contexts.
Bound to
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses another tenant than the transaction’s with 42501, removing nothing
Source
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses another tenant than the transaction’s with 42501, removing nothing
06 Owner policy survives object archivalinteractionapinegativetest
Proves
BR-CAP-PFM-MTD-019-06
Preconditions
An owner has records of draft or archived custom objects.
Steps
[ { "do": "Delete the owner under cascading and restricting types.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#cascades to a record of an archived custom object, deleting it" } ]
Expected
Cascade removes the archived-object record and restriction preserves the protected record.
Data
An owner has records of draft or archived custom objects.
Bound to
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#refuses the owner’s deletion for an open restricting association to a record of a draft custom object
Source
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#cascades to a record of an archived custom object, deleting it
07 Merge redirects links and resolves collisionsinteractionbrowsertest
Proves
BR-CAP-PFM-MTD-019-07 INV-DOM-PFM-MTD-006-10
Preconditions
The survivor and duplicate have overlapping pair and primary links.
Steps
[ { "do": "Merge duplicate endpoints.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#ends m’s association that repeats s’s, giving it s’s id, and leaves s’s as it was" } ]
Expected
Links name the survivor, colliding or self-links end and an extra primary loses its designation.
Data
The survivor and duplicate have overlapping pair and primary links.
Bound to
services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#ends m’s association that repeats s’s, giving it s’s id, and leaves s’s as it was
services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#moves m’s primary association to s as an ordinary one, s keeping its own primary
react-console:acceptance/custom-objects/playwright/journeys/PLAT-M6-S11.spec.ts#PLAT-M6-S11: after CRM merges Jane's duplicate her crew places, her boats and Osprey's Previous Owner name the surviving Jane
Source
services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#ends m’s association that repeats s’s, giving it s’s id, and leaves s’s as it was
08 Merge redirects references with historyinteractionapitest
Proves
BR-CAP-PFM-MTD-019-08
Preconditions
Custom records reference duplicate contacts or organizations.
Steps
[ { "do": "Merge them and inspect values and history.", "provenance": "test", "source": "services-platform:modules/custom-objects/tests/integration/db/custom-object-records-merge.integration.spec.js#names the surviving contact in every property that named a merged one" } ]
Expected
References name survivors and revisions retain the earlier values.
Data
Custom records reference duplicate contacts or organizations.
Bound to
services-platform:modules/custom-objects/tests/integration/db/custom-object-records-merge.integration.spec.js#leaves a property that already named the survivor, and one naming another contact, as they were
services-platform:modules/custom-objects/tests/integration/db/custom-object-records-merge.integration.spec.js#leaves another workspace’s record of the same ids as it was, through both merges
Source
services-platform:modules/custom-objects/tests/integration/db/custom-object-records-merge.integration.spec.js#names the surviving contact in every property that named a merged one
09 Merge impact predicts idempotent applicationedgeapitest
Proves
BR-CAP-PFM-MTD-019-09
Preconditions
The duplicate has links and references, including collisions and near-limit counts.
Steps
[ { "do": "Read its plan, apply it and apply it again.", "provenance": "test", "source": "services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#counts the associations held by m, and says how many end instead of moving" } ]
Expected
Counts match movements and endings, repetition moves nothing and the per-record cap does not reject the merge.
Data
The duplicate has links and references, including collisions and near-limit counts.
Bound to
services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#counts the associations held by m, and says how many end instead of moving
services-platform:modules/custom-objects/tests/integration/db/custom-object-records-merge.integration.spec.js#counts the values naming the merged contacts, in the sentence staff read
Source
services-platform:modules/associations/tests/integration/db/associations-merge.integration.spec.js#counts the associations held by m, and says how many end instead of moving
10 Owner deletion preserves the direct-delete evidence contractinteractionapiproposed
Proves
BR-CAP-PFM-MTD-019-04 BR-CAP-PFM-MTD-013-06 BR-CAP-PFM-MTD-014-01 BR-CAP-PFM-MTD-015-07
Preconditions
A native owner has a cascading custom record with attachments and values.
Steps
[ { "do": "Delete the owner within its service transaction and inspect the dependent record, assets, revisions and event order.", "provenance": "proposed", "source": [ "services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does", "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#writes every dependant’s event before the record it depended on: the associations, then the cascade deepest first (B1)", "services-platform:modules/custom-objects/tests/integration/services/history/custom-object-record-history.integration.spec.js#answers the association, the update and the creation, newest first", "services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s" ] } ]
Expected
Compare cleanup and attribution with an equivalent direct custom-record deletion.
Data
A native owner has a cascading custom record with attachments and values.
Source
services-platform:modules/associations/tests/integration/db/apply-endpoint-deletion.integration.spec.js#leaves the same audit rows, events, revisions and no record, as the record store does,services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.integration.spec.js#writes every dependant’s event before the record it depended on: the associations, then the cascade deepest first (B1),services-platform:modules/custom-objects/tests/integration/services/history/custom-object-record-history.integration.spec.js#answers the association, the update and the creation, newest first,services-platform:modules/custom-objects/tests/integration/services/persistence/custom-object-records.events.integration.spec.js#publishes the deletion of the record a cascade takes, with its own object’s number, and the association’s

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.