Skip to content

CAP-PFM-DJE-003Process valid records and report individual refusals

Markdown

CAP-PFM-DJE-003

Process valid records and report individual refusals

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleData Job EngineRevision1

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

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Changes and their receipts commit together.Individual refusals identify the problem without exposing record values.Poor input quality or revoked authority stops further processing.
Surfaces
job
Intent sources
services-platform:docs/milestones/plans/PLAT-M19-plan.md#S02services-platform:docs/milestones/plans/PLAT-M19-plan.md#S03services-platform:docs/milestones/plans/PLAT-M19-plan.md#S04services-platform:docs/milestones/plans/PLAT-M19-plan.md#S07services-platform:docs/milestones/plans/PLAT-M19-plan.md#A6services-platform:docs/milestones/plans/PLAT-M19-plan.md#A8services-platform:docs/milestones/plans/PLAT-M19-plan.md#A9services-crm:docs/milestones/CRM-M7-data-operations.md#E-11

Controls

29 controls apply, from the corpus control catalogue.

TC-AVL-001 TC-AVL-004 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-DAT-001 TC-DAT-003 TC-IAM-001 TC-IAM-006 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-MON-001 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Permissions

KeyChecked atScope
crm.contacts.updateservicerecord
crm.contacts.bulkservicetenant

Business Rules

11 rules, 10 to be proved before approval. A rule's product intent is derived from its origin: 11 confirmed by a product decision, the rest inheriting this capability's confirmed.

IdRuleKindEnforced atProvenance
01must prove
Confirmed
A record change commits with its receipt, allowing repeated or concurrent delivery of the same batch without applying that change twice.
invariantservice, databasetest
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
02must prove
Confirmed
Invalid, absent, locked, stale or uniqueness-breaking records receive individual refusals while eligible records commit and the job completes with rejections.
policyservice, databasetest
03must prove
Confirmed
A record the submitter cannot access is reported as not found rather than access denied.
policyservicetest
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
04must prove
Confirmed
Refusal information includes a code, relevant field paths, any constraint name and a message safe for operators, without quoting record values.
invariantservice, databasetest
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
05must prove
Confirmed
When a database refusal affects a commit unit, processing splits it until the failing record is isolated; committed units remain intact.
calculationservicetest
macroservice-libraries:packages/data-jobs/src/commit-split.spec.ts#halves the unit until the failing object stands alone, and isolates only it
06must prove
Confirmed
An atomic group’s members are written together or refused together, with required members ordered ahead of their dependants inside that group.
policyservicetest
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
07must prove
Confirmed
The default guard pauses processing when rejected, blocked and conflicted outcomes exceed 50% of 100–999 cumulative attempts or 20% from 1,000 attempts onward.
policyserviceobserved
08must prove
Confirmed
Transient database errors are retried; exhausted transient failures pause the job for recovery, while systemic failures end it with an operator-safe summary.
policyservicedocumented
services-crm:docs/data-jobs.md#What each contact's outcome can be
09must prove
Confirmed
Each batch rechecks the submitter’s authority; lost permissions fail the job as access revoked, mark remaining work unattempted and preserve earlier commits.
permissionservicetest
10
Confirmed
Job processing uses the owning record’s save behavior, including its validation, history, events and derived values.
invariantservicedocumented
11must prove
Confirmed
A contact update that repeats its current values reports applied with unchanged detail and creates no new version, history entry or change event.
policyservicetest
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#writes no revision, so the history names only the job that changed the contact

Scenarios

IdGivenWhenThenProvenance
01Five of 100 proposed contact updates contain first names longer than 200 characters.The worker processes the job.Ninety-five updates apply and five receive field-specific refusals that omit the invalid values.test
02A worker exits after committing a batch.The queue redelivers that work.Receipts prevent duplicate changes and keep the job totals consistent.test
services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#applies nothing of the dead worker’s batch again when its message comes back, and finishes the batch

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.