---
id: FAS-PFM-DJE-05
feature: FEAT-PFM-DJE-05
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-016
  - CAP-PFM-DJE-017
  - CAP-PFM-DJE-018
scenarios:
  - id: FAS-PFM-DJE-05-01
    title: Package completion and readiness receive separate review
    kind: behaviour
    exercises:
      - CAP-PFM-DJE-016
      - CAP-PFM-DJE-017
      - CAP-PFM-DJE-018
    relies_on:
      - ATS-PFM-DJE-016-10
      - ATS-PFM-DJE-018-08
      - ATS-PFM-DJE-017-06
    preconditions: Register a loading-workspace package containing valid Platform records and one refused record.
    steps:
      - do: >-
          Drive its local dataset jobs to completion, inspect readiness and review release under
          separate activation authority.
        expect: >-
          Completion keeps the refusal visible in readiness and does not establish that activation
          enforces the proposed readiness gate.
        provenance: proposed
        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;
          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;
          services-platform:docs/milestones/plans/PLAT-M22-plan.md#A3
    expected: >-
      Completion keeps the refusal visible in readiness and does not establish that activation
      enforces the proposed readiness gate.
    negative: true
    data_needs: Register a loading-workspace package containing valid Platform records and one refused record.
    bound_to: []
    provenance: proposed
    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;
      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;
      services-platform:docs/milestones/plans/PLAT-M22-plan.md#A3
  - id: FAS-PFM-DJE-05-02
    title: Reset changes what the next package run can load
    kind: interaction
    exercises:
      - CAP-PFM-DJE-016
      - CAP-PFM-DJE-017
      - CAP-PFM-DJE-018
    relies_on:
      - ATS-PFM-DJE-016-05
      - ATS-PFM-DJE-017-02
      - ATS-PFM-DJE-017-04
      - ATS-PFM-DJE-018-03
    preconditions: Complete a Platform definition load in a loading workspace.
    steps:
      - do: >-
          Reset its participating records, retain its input uploads and run account, register a
          corrected package and reload.
        expect: >-
          The corrected package creates a new run and its definitions pass their domain rules
          without using the prior mappings.
        provenance: proposed
        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;
          services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#answers
          done from every participant of the reset;
          services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#leaves
          every row of the other loading tenant as it was, by a checksum of each table;
          services-platform:modules/data-jobs/tests/integration/services/jobs/custom-field-data-jobs.integration.spec.js#writes
          the currency definition the metadata module’s own way, configuration and all
    expected: >-
      The corrected package creates a new run and its definitions pass their domain rules without
      using the prior mappings.
    negative: false
    data_needs: Complete a Platform definition load in a loading workspace.
    bound_to: []
    provenance: proposed
    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;
      services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#answers
      done from every participant of the reset;
      services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#leaves
      every row of the other loading tenant as it was, by a checksum of each table;
      services-platform:modules/data-jobs/tests/integration/services/jobs/custom-field-data-jobs.integration.spec.js#writes
      the currency definition the metadata module’s own way, configuration and all
  - id: FAS-PFM-DJE-05-03
    title: A failed dataset leaves earlier loads for reset
    kind: lifecycle
    exercises:
      - CAP-PFM-DJE-016
      - CAP-PFM-DJE-017
      - CAP-PFM-DJE-018
    relies_on:
      - ATS-PFM-DJE-016-09
      - ATS-PFM-DJE-017-02
      - ATS-PFM-DJE-018-08
    preconditions: Prepare a package whose second dataset fails after the first committed.
    steps:
      - do: >-
          Drive the failure, inspect retained records, then reset and start a newly registered
          corrected package.
        expect: >-
          The failed run does not reopen; earlier data remains until reset and the new run loads the
          corrected records.
        provenance: proposed
        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;
          services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#answers
          done from every participant of the reset;
          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 failed run does not reopen; earlier data remains until reset and the new run loads the
      corrected records.
    negative: true
    data_needs: Prepare a package whose second dataset fails after the first committed.
    bound_to: []
    provenance: proposed
    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;
      services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#answers
      done from every participant of the reset;
      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
  - id: FAS-PFM-DJE-05-04
    title: Staff run authority cannot replace the dataset's domain keys
    kind: permission
    exercises:
      - CAP-PFM-DJE-016
      - CAP-PFM-DJE-018
    relies_on:
      - ATS-PFM-DJE-016-07
      - ATS-PFM-DJE-018-07
    preconditions: Register a package and prepare a staff caller without its Platform dataset's required keys.
    steps:
      - do: >-
          Start it with that caller, inspect run state and repeat with a caller holding the dataset
          keys.
        expect: >-
          The refusal leaves state intact; only authorized local dataset processing creates its
          records.
        provenance: proposed
        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;
          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
    expected: The refusal leaves state intact; only authorized local dataset processing creates its records.
    negative: true
    data_needs: Register a package and prepare a staff caller without its Platform dataset's required keys.
    bound_to: []
    provenance: proposed
    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;
      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
  - id: FAS-PFM-DJE-05-05
    title: Reset and reload preserve the other workspace
    kind: regression
    exercises:
      - CAP-PFM-DJE-016
      - CAP-PFM-DJE-017
      - CAP-PFM-DJE-018
    relies_on:
      - ATS-PFM-DJE-017-04
      - ATS-PFM-DJE-018-02
    preconditions: Load the same supported records into two isolated loading workspaces.
    steps:
      - do: >-
          Reset and reload one using the original package and compare projections and counts for
          both.
        expect: >-
          The reloaded fixture reproduces records and numbers while every tested row of the other
          workspace remains unchanged.
        provenance: proposed
        source: >-
          services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#leaves
          every row of the other loading tenant as it was, by a checksum of each table;
          macroservice-libraries:packages/data-jobs/src/tests/integration/tenant-isolation.integration.spec.ts#refuses
          a row written into another tenant, whatever the statement says
    expected: >-
      The reloaded fixture reproduces records and numbers while every tested row of the other
      workspace remains unchanged.
    negative: false
    data_needs: Load the same supported records into two isolated loading workspaces.
    bound_to: []
    provenance: proposed
    source: >-
      services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#leaves
      every row of the other loading tenant as it was, by a checksum of each table;
      macroservice-libraries:packages/data-jobs/src/tests/integration/tenant-isolation.integration.spec.ts#refuses
      a row written into another tenant, whatever the statement says
evidence:
  - CAP-PFM-DJE-016
  - CAP-PFM-DJE-017
  - CAP-PFM-DJE-018
  - specs/CONVENTIONS.md#5.3 Feature Acceptance Suite
  - specs/CONVENTIONS.md#9.10 Capability Test Specification
---

# Preparing a workspace with migrated data: Feature Acceptance Suite

## What the Feature Must Do as a Whole

Package completion and readiness receive separate review 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

Reset changes what the next package run can load. 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. |
