Skip to content

ATS-PFM-DJE-003Process valid records and report individual refusals: Capability Test Specification

Markdown

ATS-PFM-DJE-003

Process valid records and report individual refusals: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision2

Read atmacroservice-libraries 54536a44services-crm a8d1364fservices-platform ad3f6a65

Coverage

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

Test Scenarios

14 scenarios proving CAP-PFM-DJE-003; 9 bound to an existing test.

01 Redelivery does not repeat committed changesconcurrencyapitest
Proves
BR-CAP-PFM-DJE-003-01
Preconditions
Prepare a queued batch of two contacts.
Steps
[ { "do": "Process it twice and also deliver two copies concurrently.", "expect": "Each contact receives one change and one receipt.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#applies nothing the second time" } ]
Expected
Each contact receives one change and one receipt.
Data
No additional fixture is needed.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#applies nothing the second time
02 Individual refusals preserve successful workruleapinegativetest
Proves
BR-CAP-PFM-DJE-003-02
Preconditions
Prepare 100 contacts with five inputs that are invalid, missing or locked.
Steps
[ { "do": "Run the contact update.", "expect": "The job reports 95 applied and five coded refusals; refused records are left intact.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it" } ]
Expected
The job reports 95 applied and five coded refusals; refused records are left intact.
Data
A prepared collection of contacts.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it
03 Scoped access conceals an inaccessible recordpermissionapinegativetest
Proves
BR-CAP-PFM-DJE-003-03
Preconditions
Grant the submitter access to one of two contacts.
Steps
[ { "do": "Process an update covering both.", "expect": "The accessible contact changes; the other is reported not found.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#rejects that contact as not found, which tells the person nothing about a record they may not see" } ]
Expected
The accessible contact changes; the other is reported not found.
Data
Record-scoped grants.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#rejects that contact as not found, which tells the person nothing about a record they may not see
04 Refusals omit invalid valuesinvariantapinegativetest
Proves
BR-CAP-PFM-DJE-003-04
Preconditions
Submit a value exceeding its field limit.
Steps
[ { "do": "Inspect the refusal information.", "expect": "The code and affected field are present; the supplied value is absent.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#names the rule a refused value broke, and quotes no value of the record" } ]
Expected
The code and affected field are present; the supplied value is absent.
Data
No additional fixture is needed.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#names the rule a refused value broke, and quotes no value of the record
05 Commit splitting isolates the failing objectfailureunitnegativetest
Proves
BR-CAP-PFM-DJE-003-05
Preconditions
Prepare 25 objects including one rejected by the database.
Steps
[ { "do": "Execute the commit unit.", "expect": "Only the failing object is isolated and refused, within the bounded number of transactions.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/commit-split.spec.ts#halves the unit until the failing object stands alone, and isolates only it" } ]
Expected
Only the failing object is isolated and refused, within the bounded number of transactions.
Data
No additional fixture is needed.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/commit-split.spec.ts#halves the unit until the failing object stands alone, and isolates only it
06 Group refusal leaves every member intactinvariantapinegativetest
Proves
BR-CAP-PFM-DJE-003-06
Preconditions
Prepare three grouped items with one invalid member and separate ungrouped items.
Steps
[ { "do": "Apply the request and separately validate it.", "expect": "The group is unwritten, its other members receive group-member refusals, and the ungrouped items proceed; validation reports equivalent refusals.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/group-refusals.integration.spec.ts#writes none of the group, rejects the other two as group_member_refused, and applies the items of no group" } ]
Expected
The group is unwritten, its other members receive group-member refusals, and the ungrouped items proceed; validation reports equivalent refusals.
Data
Objects supplied by the group fixture.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/group-refusals.integration.spec.ts#writes none of the group, rejects the other two as group_member_refused, and applies the items of no group
07 The rejection guard uses cumulative thresholdsboundaryunitnegativetest
Proves
BR-CAP-PFM-DJE-003-07
Preconditions
Supply representative outcome totals.
Steps
[ { "do": "Evaluate early and late guard boundaries.", "expect": "Rates strictly above 50% pause at 100–999 attempts; rates strictly above 20% pause from 1,000 attempts.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/rejection-guard.spec.ts#pauses a job whose first hundred items are mostly refused" } ]
Expected
Rates strictly above 50% pause at 100–999 attempts; rates strictly above 20% pause from 1,000 attempts.
Data
No additional fixture is needed.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/rejection-guard.spec.ts#pauses a job whose first hundred items are mostly refused
08 Persistent transient errors and systemic errors settle differentlyfailureapinegativeproposed
Proves
BR-CAP-PFM-DJE-003-08
Preconditions
Inject repeated transient errors and a separate systemic error.
Steps
[ { "do": "Process the job, then resume after the transient condition clears.", "expect": "The transient case pauses and can finish after recovery; the systemic case fails with a safe summary.", "provenance": "proposed", "source": "services-crm:docs/data-jobs.md#What each contact's outcome can be" } ]
Expected
The transient case pauses and can finish after recovery; the systemic case fails with a safe summary.
Data
Controllable failure injection.
Source
services-crm:docs/data-jobs.md#What each contact's outcome can be
09 Revoked access prevents later batchespermissionapinegativetest
Proves
BR-CAP-PFM-DJE-003-09
Preconditions
Remove bulk access from the submitter of a running job.
Steps
[ { "do": "Deliver another batch.", "expect": "The job fails with access revoked, retains commits and marks remaining work unattempted.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#fails the whole job with the code, not just the batch" } ]
Expected
The job fails with access revoked, retains commits and marks remaining work unattempted.
Data
Mutable permission grants.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#fails the whole job with the code, not just the batch
10 A repeated contact value produces no extra revisionedgeapitest
Proves
BR-CAP-PFM-DJE-003-11
Preconditions
Prepare a contact already holding the requested value.
Steps
[ { "do": "Process that same change.", "expect": "The receipt reports applied and unchanged at the existing version; no new history entry is written.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#answers the item applied and unchanged, at the version the contact still stands at" } ]
Expected
The receipt reports applied and unchanged at the existing version; no new history entry is written.
Data
No additional fixture is needed.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#answers the item applied and unchanged, at the version the contact still stands at
11 Submission commits before processing can account for itinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-001-10 BR-CAP-PFM-DJE-003-01
Preconditions
Prepare a submission and a transaction failure immediately before commit.
Steps
[ { "do": "Refuse the first transaction, inspect job storage, then submit successfully and process the saved batches twice.", "expect": "The refused submission leaves no job or queued work; the successful job has one committed outcome per position.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/README.md#A worked example: updating contacts in bulk; services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#changes each contact once between them, whichever delivery got there first" } ]
Expected
The refused submission leaves no job or queued work; the successful job has one committed outcome per position.
Data
Prepare a submission and a transaction failure immediately before commit.
Source
macroservice-libraries:packages/data-jobs/README.md#A worked example: updating contacts in bulk; services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#changes each contact once between them, whichever delivery got there first
12 Cancellation accounts for settled and abandoned workinteractionapiproposed
Proves
BR-CAP-PFM-DJE-003-01 BR-CAP-PFM-DJE-004-02
Preconditions
Prepare a multi-batch job and hold one batch in flight.
Steps
[ { "do": "Cancel while that batch is active, let it settle, and inspect receipts and unattempted positions.", "expect": "The active batch may commit once; later batches do not start and the job settles cancelled with unattempted work counted.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#changes each contact once between them, whichever delivery got there first; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#ends the job cancelled, not failed, once the batch it waited for has finished" } ]
Expected
The active batch may commit once; later batches do not start and the job settles cancelled with unattempted work counted.
Data
Prepare a multi-batch job and hold one batch in flight.
Source
services-crm:modules/data-jobs/tests/integration/services/queue/data-job-worker.integration.spec.js#changes each contact once between them, whichever delivery got there first; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#ends the job cancelled, not failed, once the batch it waited for has finished
13 Inspection reconciles partial processinginteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-003-02 BR-CAP-PFM-DJE-003-04 BR-CAP-PFM-DJE-005-03 BR-CAP-PFM-DJE-005-05
Preconditions
Prepare valid, invalid and inaccessible contacts in one job.
Steps
[ { "do": "Process the job and read all result and refusal pages alongside the changed records' history.", "expect": "The pages account for each position; eligible changes have attribution and refusals disclose no record values.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#names the rule a refused value broke, and quotes no value of the record; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#answers the next page from the cursor the last one gave, so no item is read twice; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#stamps the job on the revision, so every record one job changed can be listed" } ]
Expected
The pages account for each position; eligible changes have attribution and refusals disclose no record values.
Data
Prepare valid, invalid and inaccessible contacts in one job.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#names the rule a refused value broke, and quotes no value of the record; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#answers the next page from the cursor the last one gave, so no item is read twice; services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#stamps the job on the revision, so every record one job changed can be listed
14 An invalid owned detail reserves no producer identityinteractionapiproposed
Proves
BR-CAP-PFM-DJE-003-02 BR-CAP-PFM-DJE-012-03 BR-CAP-PFM-DJE-012-05
Preconditions
Prepare a keyed contact with an invalid address and a valid neighboring contact.
Steps
[ { "do": "Import both, inspect records and mappings, then submit corrected input under the refused key.", "expect": "The valid neighbor commits, the invalid record has no partial detail or mapping, and correction can create it.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it; 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/operations/record-imports.integration.spec.js#writes nothing at all of the rejected organization: not the row, not its addresses, not its mapping" } ]
Expected
The valid neighbor commits, the invalid record has no partial detail or mapping, and correction can create it.
Data
Prepare a keyed contact with an invalid address and a valid neighboring contact.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it; 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/operations/record-imports.integration.spec.js#writes nothing at all of the rejected organization: not the row, not its addresses, not its mapping

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.