---
id: FAS-PFM-DJE-04
feature: FEAT-PFM-DJE-04
product_area: platform
module: data-job-engine
revision: 1
status: proposed
product_intent: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  macroservice-libraries: 54536a441935c6e09fdb7f96f0bec71c52ba4e03
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
  services-membership: 5994c270e8a37a30f848e99ba5b5ee6b87c08893
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
capabilities:
  - CAP-PFM-DJE-011
  - CAP-PFM-DJE-012
  - CAP-PFM-DJE-013
  - CAP-PFM-DJE-014
  - CAP-PFM-DJE-015
scenarios:
  - id: FAS-PFM-DJE-04-01
    title: A mapped file can be reconciled by its producer keys
    kind: behaviour
    exercises:
      - CAP-PFM-DJE-011
      - CAP-PFM-DJE-012
      - CAP-PFM-DJE-013
      - CAP-PFM-DJE-014
      - CAP-PFM-DJE-015
    relies_on:
      - ATS-PFM-DJE-011-07
      - ATS-PFM-DJE-012-03
      - ATS-PFM-DJE-013-01
      - ATS-PFM-DJE-014-01
      - ATS-PFM-DJE-015-01
    preconditions: Prepare a small CSV of keyed contacts with typed phone columns and one invalid address.
    steps:
      - do: >-
          Upload and complete it, map its columns, process the import and reconcile the producer
          keys.
        expect: >-
          Valid rows resolve to saved contacts with their mapped details; the invalid creation has
          no destination or mapping.
        provenance: proposed
        source: >-
          services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses
          a second completion of a session that is already completed;
          macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#creates
          the record and writes one crosswalk row, then updates that record and still has one row;
          services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#applies
          both rows; services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an
          upload of another tenant with 400, saying only that it was not found;
          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: >-
      Valid rows resolve to saved contacts with their mapped details; the invalid creation has no
      destination or mapping.
    negative: false
    data_needs: Prepare a small CSV of keyed contacts with typed phone columns and one invalid address.
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses
      a second completion of a session that is already completed;
      macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#creates
      the record and writes one crosswalk row, then updates that record and still has one row;
      services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#applies
      both rows; services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an
      upload of another tenant with 400, saying only that it was not found;
      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
  - id: FAS-PFM-DJE-04-02
    title: A staff correction changes a later feed's reconciliation
    kind: interaction
    exercises:
      - CAP-PFM-DJE-012
      - CAP-PFM-DJE-014
      - CAP-PFM-DJE-015
    relies_on:
      - ATS-PFM-DJE-012-02
      - ATS-PFM-DJE-014-01
      - ATS-PFM-DJE-015-01
    preconditions: Load a revisioned organization and correct it manually.
    steps:
      - do: >-
          Upload a newer revision under reject policy, process it and reconcile the same producer
          key.
        expect: The job reports conflict and lookup returns the staff-corrected current record.
        provenance: proposed
        source: >-
          macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips
          a delivery of a revision already applied, which is what a rerun of yesterday’s file is;
          services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload of
          another tenant with 400, saying only that it was not found;
          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: The job reports conflict and lookup returns the staff-corrected current record.
    negative: true
    data_needs: Load a revisioned organization and correct it manually.
    bound_to: []
    provenance: proposed
    source: >-
      macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips
      a delivery of a revision already applied, which is what a rerun of yesterday’s file is;
      services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload of
      another tenant with 400, saying only that it was not found;
      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
  - id: FAS-PFM-DJE-04-03
    title: Retained dependent input completes after a parent arrives
    kind: lifecycle
    exercises:
      - CAP-PFM-DJE-011
      - CAP-PFM-DJE-012
      - CAP-PFM-DJE-014
      - CAP-PFM-DJE-015
    relies_on:
      - ATS-PFM-DJE-012-04
      - ATS-PFM-DJE-014-01
      - ATS-PFM-DJE-015-01
    preconditions: Complete a file containing a branch whose head office is absent.
    steps:
      - do: 'Process the file, load the head office, retry the blocked job and reconcile both keys.'
        expect: >-
          The branch first remains blocked and then resolves to its saved parent without reuploading
          its input.
        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/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload of
          another tenant with 400, saying only that it was not found;
          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: >-
      The branch first remains blocked and then resolves to its saved parent without reuploading its
      input.
    negative: true
    data_needs: Complete a file containing a branch whose head office is absent.
    bound_to: []
    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/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload of
      another tenant with 400, saying only that it was not found;
      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
  - id: FAS-PFM-DJE-04-04
    title: Completed foreign input grants no access to a file job
    kind: permission
    exercises:
      - CAP-PFM-DJE-011
      - CAP-PFM-DJE-012
      - CAP-PFM-DJE-014
      - CAP-PFM-DJE-015
    relies_on:
      - ATS-PFM-DJE-011-09
      - ATS-PFM-DJE-014-01
      - ATS-PFM-DJE-015-05
    preconditions: Complete an upload in one workspace and prepare an authorized caller in another.
    steps:
      - do: >-
          Attempt an import from the foreign upload and reconcile its keys from the second
          workspace.
        expect: The import exposes no foreign upload and the lookup exposes no foreign records.
        provenance: proposed
        source: >-
          services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#answers
          nothing about where the file is going: no bucket, no key, no S3 upload id;
          services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload of
          another tenant with 400, saying only that it was not found;
          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: The import exposes no foreign upload and the lookup exposes no foreign records.
    negative: false
    data_needs: Complete an upload in one workspace and prepare an authorized caller in another.
    bound_to: []
    provenance: proposed
    source: >-
      services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#answers
      nothing about where the file is going: no bucket, no key, no S3 upload id;
      services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload of
      another tenant with 400, saying only that it was not found;
      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
  - id: FAS-PFM-DJE-04-05
    title: Repeating a feed changes neither mappings nor detail preferences
    kind: regression
    exercises:
      - CAP-PFM-DJE-012
      - CAP-PFM-DJE-013
      - CAP-PFM-DJE-014
      - CAP-PFM-DJE-015
    relies_on:
      - ATS-PFM-DJE-012-02
      - ATS-PFM-DJE-013-02
      - ATS-PFM-DJE-014-03
      - ATS-PFM-DJE-015-01
    preconditions: Complete a revisioned multi-chunk contact file with repeated preferred and typed phone values.
    steps:
      - do: Process it twice and reconcile every producer key after each pass.
        expect: >-
          The replay reports duplicate input, keeps one destination per existing key and preserves
          the saved preferred detail.
        provenance: proposed
        source: >-
          macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips
          a delivery of a revision already applied, which is what a rerun of yesterday’s file is;
          services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#makes
          the preferred e-mail value that repeats the personal one the first address, the personal
          one, ahead of the work one;
          macroservice-libraries:packages/data-jobs/src/chunk-plan.spec.ts#closes the chunk when one
          more item would pass the item limit;
          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: >-
      The replay reports duplicate input, keeps one destination per existing key and preserves the
      saved preferred detail.
    negative: false
    data_needs: Complete a revisioned multi-chunk contact file with repeated preferred and typed phone values.
    bound_to: []
    provenance: proposed
    source: >-
      macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips
      a delivery of a revision already applied, which is what a rerun of yesterday’s file is;
      services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#makes
      the preferred e-mail value that repeats the personal one the first address, the personal one,
      ahead of the work one; macroservice-libraries:packages/data-jobs/src/chunk-plan.spec.ts#closes
      the chunk when one more item would pass the item limit;
      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
evidence:
  - CAP-PFM-DJE-011
  - CAP-PFM-DJE-012
  - CAP-PFM-DJE-013
  - CAP-PFM-DJE-014
  - CAP-PFM-DJE-015
  - specs/CONVENTIONS.md#5.3 Feature Acceptance Suite
  - specs/CONVENTIONS.md#9.10 Capability Test Specification
---

# Imports from files and producer feeds: Feature Acceptance Suite

## What the Feature Must Do as a Whole

A mapped file can be reconciled by its producer keys is the feature-level acceptance outcome. The suite follows the work through its participating capabilities and checks the final records, job accounts and refusals together. Permission and regression cases revisit the same feature boundary with changed authority or input.

## Interactions Between Capabilities

A staff correction changes a later feed's reconciliation. The interaction case changes a shared prerequisite and checks how that change affects the next capability's result. Lifecycle cases retain partial work and distinguish a new attempt from resuming existing work. These feature expectations remain proposed until their complete executable coverage is established.

## Regression Record

| Revision | Change | Scenario | Why |
|---|---|---|---|
| 1 | initial | all | Establish cumulative acceptance across the feature's landed capabilities. |
