---
id: JNY-PFM-DJE-004
title: 'Prepare, reconcile and reopen a workspace after its initial migration'
feature: FEAT-PFM-DJE-05
product_area: platform
module: data-job-engine
revision: 2
status: draft
product_intent: confirmed
implementation_evidence: partially-observed
supersedes:
  - CRM-ACC-0673
  - CRM-ACC-0674
  - DJE-ACC-0022
  - DJE-ACC-0023
  - DJE-ACC-0024
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  services-crm: a8d1364f1dd44b723bb5f9acba12f983e9ec8d69
actor: ACT-PFM-037
goal: >-
  Give an association a reconciled migration before its staff begin using the
  workspace.
capabilities:
  - CAP-PFM-DJE-017
  - CAP-PFM-DJE-011
  - CAP-PFM-DJE-016
  - CAP-PFM-DJE-015
screens: []
steps:
  - 'n': 1
    surface: enterHqTenantLoading
    action: Place the implementation workspace into loading state.
    capability: CAP-PFM-DJE-017
    expected: >-
      Ordinary customer activity is unavailable while the data-job routes remain
      accessible.
    provenance: documented
    source: >-
      services-platform:docs/data-jobs/tenant-reset.md#1. When a tenant may be
      reset
  - 'n': 2
    surface: openDataJobUpload … completeDataJobUpload
    action: 'Upload the package manifest and its datasets, supplying file digests.'
    capability: CAP-PFM-DJE-011
    expected: >-
      Uploads retain their measured sizes and measured or declared digests, with
      hashing limited to declared files within the verification size limit.
    provenance: observed
    source: 'services-platform:modules/data-jobs/services/uploads/upload-sessions.ts'
  - 'n': 3
    surface: registerDataRun
    action: Submit the package for registration.
    capability: CAP-PFM-DJE-016
    expected: >-
      A run and its ordered dataset steps are recorded before any dataset job
      starts.
    provenance: test
    source: >-
      services-platform:modules/data-jobs/tests/e2e/data-runs.e2e.spec.js#orders
      the three datasets by the dependsOn edges the manifest declared
  - 'n': 4
    surface: 'startDataRun, getDataRun'
    action: Start the load and poll its progress through completion.
    capability: CAP-PFM-DJE-016
    expected: >-
      Dependent datasets proceed in order and the summary reports each
      application’s counts.
    provenance: test
    source: >-
      services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#finishes
      the run succeeded once the reads resume
  - 'n': 5
    surface: readContactsBySourceKey and the other lookups
    action: Compare the loaded records with the extract using producer-key lookups.
    capability: CAP-PFM-DJE-015
    expected: >-
      Known keys return their current records in the demonstrated reconciliation
      fixture.
    provenance: test
    source: >-
      react-console:acceptance/crm/playwright/journeys/data-operations/CRM-ACC-0676.spec.ts#CRM-ACC-0676
  - 'n': 6
    surface: resetHqTenant
    action: Reset the loading workspace after identifying a mapping problem.
    capability: CAP-PFM-DJE-017
    expected: The tested CRM load is removed.
    provenance: test
    source: >-
      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
  - 'n': 7
    surface: 'registerDataRun, startDataRun'
    action: Register the corrected package and repeat the load.
    capability: CAP-PFM-DJE-016
    expected: The reset-and-reload fixture reproduces the expected records.
    provenance: test
    source: >-
      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
  - 'n': 8
    surface: activateHqTenant
    action: Have an operator with activation authority open the workspace.
    capability: CAP-PFM-DJE-017
    expected: Customer staff regain access to the workspace.
    provenance: documented
    source: >-
      services-platform:docs/data-jobs/data-runs.md#7. The summary and the
      readiness verdict
alternates:
  - from_step: 4
    condition: A finished dataset still has blocked records.
    path: >-
      The driver gives the dataset one further submission after its dependencies
      finish.
    outcome: Persistent blocked records remain in the readiness assessment.
    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
failures:
  - from_step: 3
    condition: A dataset declaration and its upload have different digests.
    path: Registration rejects the package.
    outcome: The refused package creates no run.
    provenance: test
    source: >-
      services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#writes
      nothing at all when a digest does not match: a refused package leaves no
      run behind
  - from_step: 8
    condition: Rejections remain unresolved when activation is requested.
    path: The product should refuse activation until the blockers are resolved.
    outcome: The intended result retains loading state; the gate is currently absent.
    provenance: unknown
    source: FND-PFM-DJE-001
rules_in_play:
  - BR-CAP-PFM-DJE-016-02
  - BR-CAP-PFM-DJE-016-03
  - BR-CAP-PFM-DJE-016-04
  - BR-CAP-PFM-DJE-016-06
  - BR-CAP-PFM-DJE-016-10
  - BR-CAP-PFM-DJE-015-01
  - BR-CAP-PFM-DJE-017-01
  - BR-CAP-PFM-DJE-017-02
  - BR-CAP-PFM-DJE-017-04
  - BR-CAP-PFM-DJE-017-06
  - BR-CAP-PFM-DJE-017-07
assertions:
  - id: AS-JNY-PFM-DJE-004-01
    statement: >-
      The reset-and-reload fixture reproduces the original record projections
      and table counts.
    provenance: test
    source: >-
      services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#reloads
      as many rows, table for table, as the load before the reset
  - id: AS-JNY-PFM-DJE-004-02
    statement: >-
      Reset preserves every row of the other loading workspace in the tested
      fixture.
    provenance: test
    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
  - id: AS-JNY-PFM-DJE-004-03
    statement: >-
      The product should prevent activation while the migration has unresolved
      readiness blockers.
    provenance: unknown
    source: FND-PFM-DJE-001
e2e_policy: optional
e2e_reason: >-
  Andrew accepts the staff-only API actions through guided verification; browser
  coverage applies to the customer-facing inspection of the loaded records.
evidence:
  - >-
    services-platform: inspected Data Run routes, registration, driver,
    lifecycle integration tests and the recorded guided-verification decision.
  - 'services-crm: inspected the reset-and-reload guarantees suite.'
  - 'react-console: inspected the cited producer-key reconciliation journey.'
proved_by: []
---

# Prepare, reconcile and reopen a workspace after its initial migration

## Story

Implementation staff put a new association’s workspace into loading state and upload its migration package. They register the package, start its run and keep polling while the owning applications process their datasets. Producer-key lookups let them compare the loaded records with the extract. When that comparison reveals a mapping problem, they reset the workspace and load the corrected package. An authorized operator reviews the resulting reconciliation before opening the workspace to customer staff. The product should enforce that review through a readiness gate; the current activation action does not provide one.
