Skip to content

ATS-PFM-DJE-016Load and reconcile a migration package across its owning applications: Capability Test Specification

Markdown

ATS-PFM-DJE-016

Load and reconcile a migration package across its owning applications: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision3

Read atservices-platform ad3f6a65services-crm a8d1364f

Coverage

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

Test Scenarios

18 scenarios proving CAP-PFM-DJE-016; 10 bound to an existing test.

01 Run management rejects callers without staff authoritypermissionapinegativeproposed
Proves
BR-CAP-PFM-DJE-016-01
Preconditions
Use a customer administrator and a staff account lacking import-management authority.
Steps
[ { "do": "Attempt package registration and run retrieval with each account.", "expect": "Both accounts receive a refusal.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/aws/api/data-runs.routes.ts:manage" } ]
Expected
Both accounts receive a refusal.
Data
Accounts with the two access profiles.
Source
services-platform:modules/data-jobs/aws/api/data-runs.routes.ts:manage
02 Registration rejects a workspace outside loadingvalidationapinegativetest
Proves
BR-CAP-PFM-DJE-016-02
Preconditions
Prepare an initial-migration package for an implementation workspace that is not loading.
Steps
[ { "do": "Submit the package for registration.", "expect": "Registration identifies the workspace-state refusal and creates no run.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses an initial import into a tenant that is not loading" } ]
Expected
Registration identifies the workspace-state refusal and creates no run.
Data
The workspace and a valid package fixture.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses an initial import into a tenant that is not loading
03 Invalid package declarations receive refusalsvalidationapinegativetest
Proves
BR-CAP-PFM-DJE-016-03
Preconditions
Prepare packages with mismatched digests or sizes, incorrect destinations, and missing or unexpected dataset uploads.
Steps
[ { "do": "Attempt to register each package.", "expect": "Each invalid fixture receives the corresponding refusal; the previously registered valid run retains its dataset steps.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a package whose dataset digest is not the digest of the uploaded file" } ]
Expected
Each invalid fixture receives the corresponding refusal; the previously registered valid run retains its dataset steps.
Data
Completed uploads and altered manifest fixtures.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a package whose dataset digest is not the digest of the uploaded file
04 Dependency ordering permits independent work and rejects cyclesruleunitnegativetest
Proves
BR-CAP-PFM-DJE-016-04
Preconditions
Prepare manifests containing a dependency chain, independent datasets and a cycle.
Steps
[ { "do": "Calculate their execution waves and attempt registration of the cyclic package.", "expect": "The chain receives successive waves, independent datasets share a wave and cyclic registration leaves no rows.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/unit/package-manifest.spec.ts#puts a chain in one dataset per wave, in the order the edges say" } ]
Expected
The chain receives successive waves, independent datasets share a wave and cyclic registration leaves no rows.
Data
Manifest fixtures representing each dependency shape.
Bound to
Source
services-platform:modules/data-jobs/tests/unit/package-manifest.spec.ts#puts a chain in one dataset per wave, in the order the edges say
05 A package can be registered again after its run finishestransitionapinegativetest
Proves
BR-CAP-PFM-DJE-016-05
Preconditions
A package already has a running load.
Steps
[ { "do": "Register it again, finish the original load and repeat registration.", "expect": "The first request identifies the unfinished run; the later request creates a distinct run.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a second registration of a package whose run has not finished, naming the run that holds it" } ]
Expected
The first request identifies the unfinished run; the later request creates a distinct run.
Data
A package with controllable job progress.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a second registration of a package whose run has not finished, naming the run that holds it
06 Polling resumes a load that stops receiving requeststransitionapitest
Proves
BR-CAP-PFM-DJE-016-06
Preconditions
A three-dataset run has a job that finishes in its owning application.
Steps
[ { "do": "Stop reading the run, then resume polling until the load finishes.", "expect": "No progress is recorded during the gap; subsequent reads submit dependent datasets and each dataset is submitted once.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#leaves the run where it stood while nobody reads it, though a dataset finished in its service" } ]
Expected
No progress is recorded during the gap; subsequent reads submit dependent datasets and each dataset is submitted once.
Data
Application doubles with controllable completion.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#leaves the run where it stood while nobody reads it, though a dataset finished in its service
07 The owning application receives the staff caller’s tokenpermissionapitest
Proves
BR-CAP-PFM-DJE-016-07
Preconditions
Register a package containing a CRM dataset.
Steps
[ { "do": "Start the run and inspect the outgoing request.", "expect": "CRM receives the dataset through its own job route using the requesting staff member’s token.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#asks the macroservice that owns the object type, over its own route for that object" } ]
Expected
CRM receives the dataset through its own job route using the requesting staff member’s token.
Data
A recording CRM application double.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#asks the macroservice that owns the object type, over its own route for that object
08 Blocked work receives a bounded second attemptedgeapitest
Proves
BR-CAP-PFM-DJE-016-08
Preconditions
A dataset job finishes with unresolved references.
Steps
[ { "do": "Continue driving the load through its remaining datasets.", "expect": "The blocked dataset is submitted exactly twice, dependent work continues and persistent blocked records remain visible.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#tries a blocked dataset a second time, and only a second time" } ]
Expected
The blocked dataset is submitted exactly twice, dependent work continues and persistent blocked records remain visible.
Data
Application doubles that retain blocked outcomes.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#tries a blocked dataset a second time, and only a second time
09 Run controls stop submissions and cancel child jobstransitionapinegativetest
Proves
BR-CAP-PFM-DJE-016-09
Preconditions
Prepare a running load with both submitted and pending datasets.
Steps
[ { "do": "Pause the load, attempt Resume against a run that is not paused and cancel the running fixture.", "expect": "Pause submits no further work, the invalid Resume is refused and successful child cancellations leave pending datasets skipped.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#pauses a running run where it stands, and submits nothing while it is paused" } ]
Expected
Pause submits no further work, the invalid Resume is refused and successful child cancellations leave pending datasets skipped.
Data
Application doubles that acknowledge cancellation.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#pauses a running run where it stands, and submits nothing while it is paused
10 Readiness distinguishes successful accounting from tested blockersruleunitnegativetest
Proves
BR-CAP-PFM-DJE-016-10
Preconditions
Prepare a successful, fully accounted run and fixtures for each covered readiness blocker.
Steps
[ { "do": "Build a summary for each fixture.", "expect": "The complete fixture is ready and each blocking fixture identifies its reason and any missing count.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/unit/run-summary.spec.ts#is ready when the run succeeded and every record of every dataset is accounted for" } ]
Expected
The complete fixture is ready and each blocking fixture identifies its reason and any missing count.
Data
Run and dataset records for the summary cases.
Bound to
Source
services-platform:modules/data-jobs/tests/unit/run-summary.spec.ts#is ready when the run succeeded and every record of every dataset is accounted for
11 An unreadable job produces a failed stepfailureapinegativetest
Proves
BR-CAP-PFM-DJE-016-11
Preconditions
A running dataset’s job becomes permanently unreadable.
Steps
[ { "do": "Perform the next progress pass.", "expect": "The dataset fails with an explanatory message.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#fails the step when its owning service cannot be read at all, rather than running for ever" } ]
Expected
The dataset fails with an explanatory message.
Data
An application double that cannot return the submitted job.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#fails the step when its owning service cannot be read at all, rather than running for ever
12 Downstream cancellation failure can leave a child runningfailureapinegativeproposed
Proves
BR-CAP-PFM-DJE-016-13
Preconditions
Prepare a running run with an active CRM child and a pending dataset.
Steps
[ { "do": "Make child cancellation throw a non-access error, cancel the run, then read its parent and child; repeat with access denied.", "expect": "The non-access failure is logged and the parent becomes cancelled with pending work skipped while the child can continue; access denial interrupts parent cancellation.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/services/runs/run-driver.ts:cancelStep" } ]
Expected
The non-access failure is logged and the parent becomes cancelled with pending work skipped while the child can continue; access denial interrupts parent cancellation.
Data
Prepare a running run with an active CRM child and a pending dataset.
Source
services-platform:modules/data-jobs/services/runs/run-driver.ts:cancelStep
13 A transient read respects the last successful progress writeboundaryapinegativeproposed
Proves
BR-CAP-PFM-DJE-016-14
Preconditions
Prepare a running dataset with a known last successful progress time.
Steps
[ { "do": "Return a transient read failure at exactly thirty minutes and just beyond it, then test access denial.", "expect": "The step is unchanged at the grace boundary, fails beyond it, and access denial reaches the caller without rewriting progress.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/services/runs/run-driver.ts:pollStep; services-platform:modules/data-jobs/services/runs/data-job-port.ts:DATA_JOB_UNREADABLE_GRACE_MS" } ]
Expected
The step is unchanged at the grace boundary, fails beyond it, and access denial reaches the caller without rewriting progress.
Data
Prepare a running dataset with a known last successful progress time.
Source
services-platform:modules/data-jobs/services/runs/run-driver.ts:pollStep; services-platform:modules/data-jobs/services/runs/data-job-port.ts:DATA_JOB_UNREADABLE_GRACE_MS
14 Package registration checks recorded upload integrityinteractionapiproposed
Proves
BR-CAP-PFM-DJE-011-05 BR-CAP-PFM-DJE-011-06 BR-CAP-PFM-DJE-016-03
Preconditions
Complete manifest and dataset uploads with known sizes and a checkable digest.
Steps
[ { "do": "Register a package with a mismatched dataset digest, then one matching the saved upload evidence.", "expect": "The mismatch leaves no run; the matching package registers before any dataset job starts.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/services/uploads/upload-sessions.ts:requireCompletedParts; services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses a completion whose object is not the file the declared SHA-256 describes, naming sha256; services-platform:modules/data-jobs/services/uploads/upload-sessions.ts:verifiedDigestOf; services-platform:modules/data-jobs/services/runs/register-run.ts:registerRun" } ]
Expected
The mismatch leaves no run; the matching package registers before any dataset job starts.
Data
Complete manifest and dataset uploads with known sizes and a checkable digest.
Source
services-platform:modules/data-jobs/services/uploads/upload-sessions.ts:requireCompletedParts; services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses a completion whose object is not the file the declared SHA-256 describes, naming sha256; services-platform:modules/data-jobs/services/uploads/upload-sessions.ts:verifiedDigestOf; services-platform:modules/data-jobs/services/runs/register-run.ts:registerRun
15 Dependency-driven datasets use the owning applicationinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-012-04 BR-CAP-PFM-DJE-012-07 BR-CAP-PFM-DJE-016-04 BR-CAP-PFM-DJE-016-06 BR-CAP-PFM-DJE-016-07 BR-CAP-PFM-DJE-016-08
Preconditions
Register a loading-workspace package with parent and child datasets and one unresolved reference.
Steps
[ { "do": "Start and poll the run, forwarding the staff caller's token, through both permitted attempts of the blocked dataset.", "expect": "Dataset jobs respect dependency waves; the remaining block is visible in readiness and no third attempt is submitted.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#keeps the archived option an initial import carries, as history; services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a package whose datasets cannot be ordered, before any row of it is written; services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#leaves the run where it stood while nobody reads it, though a dataset finished in its service; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#forwards the staff caller’s own token with every call, and invents no identity of its own; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#tries a blocked dataset a second time, and only a second time" } ]
Expected
Dataset jobs respect dependency waves; the remaining block is visible in readiness and no third attempt is submitted.
Data
Register a loading-workspace package with parent and child datasets and one unresolved reference.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#keeps the archived option an initial import carries, as history; services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a package whose datasets cannot be ordered, before any row of it is written; services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#leaves the run where it stood while nobody reads it, though a dataset finished in its service; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#forwards the staff caller’s own token with every call, and invents no identity of its own; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#tries a blocked dataset a second time, and only a second time
16 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
17 Failed loading remains available for reset and a fresh runinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-016-09 BR-CAP-PFM-DJE-016-10 BR-CAP-PFM-DJE-017-02 BR-CAP-PFM-DJE-017-04 BR-CAP-PFM-DJE-017-05
Preconditions
Start a package with a dataset that fails after earlier work committed.
Steps
[ { "do": "Inspect the failed run, reset the loading workspace, register corrected input and reload.", "expect": "Earlier commits remain until reset; a new registration drives the corrected load without reopening the failed run.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#cancels the jobs a cancelled run had already submitted, in their own services; 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; 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; services-platform:docs/data-jobs/tenant-reset.md#1. When a tenant may be reset" } ]
Expected
Earlier commits remain until reset; a new registration drives the corrected load without reopening the failed run.
Data
Start a package with a dataset that fails after earlier work committed.
Source
services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#cancels the jobs a cancelled run had already submitted, in their own services; 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; 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; services-platform:docs/data-jobs/tenant-reset.md#1. When a tenant may be reset
18 Platform datasets use the same domain authority as direct jobsinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-016-07 BR-CAP-PFM-DJE-016-12 BR-CAP-PFM-DJE-018-07 BR-CAP-PFM-DJE-018-08
Preconditions
Register a package with custom definitions, records and associations and prepare limited and authorized staff contexts.
Steps
[ { "do": "Start under insufficient domain authority, then under authorized authority and inspect each local job.", "expect": "The refusal leaves the run unchanged; permitted local datasets use domain validation and preserve line-specific refusals.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#forwards the staff caller’s own token with every call, and invents no identity of its own; services-platform:modules/data-jobs/services/runs/data-run-services.ts:DATA_RUN_SERVICES; services-platform:modules/data-jobs/tests/integration/services/jobs/custom-field-data-jobs.integration.spec.js#refuses a caller who may create a definition but holds no bulk right; services-platform:modules/data-jobs/tests/integration/services/jobs/custom-object-data-jobs.integration.spec.js#refuses a hull number an earlier line of the same file holds, naming that line" } ]
Expected
The refusal leaves the run unchanged; permitted local datasets use domain validation and preserve line-specific refusals.
Data
Register a package with custom definitions, records and associations and prepare limited and authorized staff contexts.
Source
services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#forwards the staff caller’s own token with every call, and invents no identity of its own; services-platform:modules/data-jobs/services/runs/data-run-services.ts:DATA_RUN_SERVICES; services-platform:modules/data-jobs/tests/integration/services/jobs/custom-field-data-jobs.integration.spec.js#refuses a caller who may create a definition but holds no bulk right; services-platform:modules/data-jobs/tests/integration/services/jobs/custom-object-data-jobs.integration.spec.js#refuses a hull number an earlier line of the same file holds, naming that line

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.