Skip to content

ATS-PFM-DJE-015Reconcile loaded records using the producer’s keys: Capability Test Specification

Markdown

ATS-PFM-DJE-015

Reconcile loaded records using the producer’s keys: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision3

Read atservices-crm a8d1364fservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

8 scenarios proving CAP-PFM-DJE-015; 5 bound to an existing test.

01 Known keys return ordinary record representationsruleapitest
Proves
BR-CAP-PFM-DJE-015-01
Preconditions
Import contacts, an organization, configuration items and custom-field definitions.
Steps
[ { "do": "Request the loaded keys in a different order from the import.", "expect": "Returned records match ordinary reads and follow the requested key order.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each key found with its record id, in the order the keys were asked" } ]
Expected
Returned records match ordinary reads and follow the requested key order.
Data
Loaded record fixtures with owned details.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each key found with its record id, in the order the keys were asked
02 Unknown and unavailable records appear as missingedgeapinegativetest
Proves
BR-CAP-PFM-DJE-015-02
Preconditions
Prepare keys that were never loaded and mappings whose records are absent.
Steps
[ { "do": "Look up the prepared keys, including a repeated key.", "expect": "Unknown and absent records are listed as missing, with repeated keys represented once.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#reports the key nothing loaded as missing" } ]
Expected
Unknown and absent records are listed as missing, with repeated keys represented once.
Data
Loaded and deliberately unresolved keys.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#reports the key nothing loaded as missing
03 The lookup checks its request limitboundaryapinegativetest
Proves
BR-CAP-PFM-DJE-015-03
Preconditions
Prepare a workspace with a known imported key.
Steps
[ { "do": "Request one hundred distinct keys, then one hundred and one.", "expect": "The first request succeeds and the second identifies the limit in its refusal.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers exactly 100 keys, the most a lookup may name" } ]
Expected
The first request succeeds and the second identifies the limit in its refusal.
Data
A known key and generated unknown keys.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers exactly 100 keys, the most a lookup may name
04 Loading access still requires job-reading authoritypermissionapinegativetest
Proves
BR-CAP-PFM-DJE-015-04
Preconditions
Use a loading workspace, an authorized job reader and an ordinary record reader.
Steps
[ { "do": "Request the same lookup with each account.", "expect": "The job reader receives the record; the ordinary reader receives a permission refusal.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/e2e/records-by-source-key.e2e.spec.js#is served the lookup, answering the contact by its key and its id" } ]
Expected
The job reader receives the record; the ordinary reader receives a permission refusal.
Data
The loading fixture and both account profiles.
Bound to
Source
services-crm:modules/data-jobs/tests/e2e/records-by-source-key.e2e.spec.js#is served the lookup, answering the contact by its key and its id
05 Workspace and record-kind boundaries remain intactinvariantapinegativetest
Proves
BR-CAP-PFM-DJE-015-05
Preconditions
Prepare a shared key spelling in two workspaces and different record kinds.
Steps
[ { "do": "Look up the key through each workspace and record-kind context.", "expect": "Each workspace receives only its own match, and a contact key cannot resolve as an organization.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#looks a key up under its own object type only: a contact key is not an organization" } ]
Expected
Each workspace receives only its own match, and a contact key cannot resolve as an organization.
Data
Two workspace fixtures with distinct mappings.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#looks a key up under its own object type only: a contact key is not an organization
06 Keyed reconciliation reads current saved recordsinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-012-03 BR-CAP-PFM-DJE-015-01 BR-CAP-PFM-DJE-015-06
Preconditions
Import contacts with producer keys and edit one afterward.
Steps
[ { "do": "Request those keys in a different order from the file, including a repeated and an unknown key.", "expect": "Lookup returns current records in requested key order once per key and names the unknown key as missing.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each record exactly as the ordinary read of one contact does; services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts" } ]
Expected
Lookup returns current records in requested key order once per key and names the unknown key as missing.
Data
Import contacts with producer keys and edit one afterward.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each record exactly as the ordinary read of one contact does; services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts
07 Completion with refusals remains visible in reconciliationinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-015-01 BR-CAP-PFM-DJE-015-02 BR-CAP-PFM-DJE-016-10
Preconditions
Drive a package whose child completes with one refusal and otherwise saved records.
Steps
[ { "do": "Poll the run to settlement, inspect readiness, and look up the accepted and refused producer keys.", "expect": "The run can finish succeeded while readiness names the refusal; accepted keys resolve and the refused creation is missing.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each record exactly as the ordinary read of one contact does; services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts:readRecordsBySourceKey; services-platform:modules/data-jobs/services/jobs/records-by-source-key.ts:readCustomFieldsBySourceKey; services-platform:modules/data-jobs/tests/unit/run-summary.spec.ts#is not ready when a dataset’s counts do not add up to what the producer claimed" } ]
Expected
The run can finish succeeded while readiness names the refusal; accepted keys resolve and the refused creation is missing.
Data
Drive a package whose child completes with one refusal and otherwise saved records.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each record exactly as the ordinary read of one contact does; services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts:readRecordsBySourceKey; services-platform:modules/data-jobs/services/jobs/records-by-source-key.ts:readCustomFieldsBySourceKey; services-platform:modules/data-jobs/tests/unit/run-summary.spec.ts#is not ready when a dataset’s counts do not add up to what the producer claimed
08 Reset removes loaded mappings before reconciliation and reloadinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-015-02 BR-CAP-PFM-DJE-015-05 BR-CAP-PFM-DJE-017-02 BR-CAP-PFM-DJE-017-04
Preconditions
Load the same package in two isolated loading workspaces.
Steps
[ { "do": "Reset one, reconcile its keys, reload it, and compare both workspaces with their prior projections.", "expect": "Reset keys become missing until reload; the other workspace remains unchanged and the reset fixture reproduces its records and numbers.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts:readRecordsBySourceKey; services-platform:modules/data-jobs/services/jobs/records-by-source-key.ts:readCustomFieldsBySourceKey; services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#looks a key up under its own object type only: a contact key is not an organization; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#removes everything the load wrote: no contact, organization, imported type or crosswalk row is left; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#reloads the same records as the load before the reset, numbers included" } ]
Expected
Reset keys become missing until reload; the other workspace remains unchanged and the reset fixture reproduces its records and numbers.
Data
Load the same package in two isolated loading workspaces.
Source
services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts:readRecordsBySourceKey; services-platform:modules/data-jobs/services/jobs/records-by-source-key.ts:readCustomFieldsBySourceKey; services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#looks a key up under its own object type only: a contact key is not an organization; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#removes everything the load wrote: no contact, organization, imported type or crosswalk row is left; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#reloads the same records as the load before the reset, numbers included

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.