---
id: ATS-PFM-MTD-016
scope: CAP-PFM-MTD-016
product_area: platform
module: metadata
revision: 2
status: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-PFM-MTD-016-01
    title: Repeated source files do not duplicate records
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-01
    preconditions: Files contain known and new source keys.
    steps:
      - do: 'Validate and apply, then resubmit unchanged lines and corrections.'
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0401.spec.js#CO-ACC-0401:
          A registrar corrects a loaded boat by hand, and the nightly feed neither tramples the correction nor
          revives a boat that was archived or deleted @area:data-operations @P0 @isolation:parallel-safe
    expected: >-
      The first load creates expected records, repetition makes no changes and corrections affect only
      supplied changed properties.
    negative: false
    data_needs: Files contain known and new source keys.
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0401.spec.js#CO-ACC-0401:
        A registrar corrects a loaded boat by hand, and the nightly feed neither tramples the correction nor
        revives a boat that was archived or deleted @area:data-operations @P0 @isolation:parallel-safe
      - TST-PFM-MTD-135
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0401.spec.js#CO-ACC-0401:
      A registrar corrects a loaded boat by hand, and the nightly feed neither tramples the correction nor
      revives a boat that was archived or deleted @area:data-operations @P0 @isolation:parallel-safe
    category: invariant
    assertions:
      - expect: >-
          The first load creates expected records, repetition makes no changes and corrections affect only
          supplied changed properties.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0401.spec.js#CO-ACC-0401:
          A registrar corrects a loaded boat by hand, and the nightly feed neither tramples the correction nor
          revives a boat that was archived or deleted @area:data-operations @P0 @isolation:parallel-safe
  - id: ATS-PFM-MTD-016-02
    title: Preflight reports line and property failures
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-02
    preconditions: A file contains valid and invalid record lines.
    steps:
      - do: Validate the input.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
          3: the rejections name each bad line and its property, never a value or an error class
    expected: 'Rejected lines identify properties without values, and validation does not write records.'
    negative: true
    data_needs: A file contains valid and invalid record lines.
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 3:
        the rejections name each bad line and its property, never a value or an error class
      - TST-PFM-MTD-134
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 3:
      the rejections name each bad line and its property, never a value or an error class
    category: validation
    assertions:
      - expect: 'Rejected lines identify properties without values, and validation does not write records.'
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
          3: the rejections name each bad line and its property, never a value or an error class
  - id: ATS-PFM-MTD-016-03
    title: Apply uses the validated impact digest
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-03
    preconditions: A job has a validated impact.
    steps:
      - do: Apply with a stale digest and then the correct digest.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
          4: an apply with a stale digest is refused 409 impact_digest_mismatch and the job stays validated
    expected: The stale request fails while leaving validation intact; the accepted impact can be applied.
    negative: true
    data_needs: A job has a validated impact.
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 4:
        an apply with a stale digest is refused 409 impact_digest_mismatch and the job stays validated
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 5:
        applies with the digest; the job completes with rejections, writing three lines and rejecting five
      - TST-PFM-MTD-134
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 4:
      an apply with a stale digest is refused 409 impact_digest_mismatch and the job stays validated
    category: failure
    assertions:
      - expect: The stale request fails while leaving validation intact; the accepted impact can be applied.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
          4: an apply with a stale digest is refused 409 impact_digest_mismatch and the job stays validated
  - id: ATS-PFM-MTD-016-04
    title: Loaded records use the ordinary write contract
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-04
    preconditions: 'The object includes numbering, references and unique properties.'
    steps:
      - do: Apply valid lines and a line targeting an archived record.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
          6: every created boat reads back as the file said, and the id refused at step 2 named no record
    expected: >-
      Successful records have normal derived information and audit effects, while the archived target is
      refused.
    negative: false
    data_needs: 'The object includes numbering, references and unique properties.'
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 6:
        every created boat reads back as the file said, and the id refused at step 2 named no record
      - TST-PFM-MTD-134
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step 6:
      every created boat reads back as the file said, and the id refused at step 2 named no record
    category: rule
    assertions:
      - expect: >-
          Successful records have normal derived information and audit effects, while the archived target is
          refused.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
          6: every created boat reads back as the file said, and the id refused at step 2 named no record
  - id: ATS-PFM-MTD-016-05
    title: Link loads preserve endpoint identity
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-05
    preconditions: Types and loaded endpoint keys are available.
    steps:
      - do: 'Load invalid endpoint and cardinality cases, then correct a known link with different endpoints.'
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step
          9: OWN-2 naming another boat is refused because endpoints never change, and with its own endpoints
          its notes update
    expected: Validation refuses incompatible inputs and immutable endpoint changes before writing.
    negative: true
    data_needs: Types and loaded endpoint keys are available.
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step 2:
        validates twelve lines: four would be created and eight are blocked, and nothing is written
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step 9:
        OWN-2 naming another boat is refused because endpoints never change, and with its own endpoints its
        notes update
      - TST-PFM-MTD-136
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step 9:
      OWN-2 naming another boat is refused because endpoints never change, and with its own endpoints its
      notes update
    category: validation
    assertions:
      - expect: Validation refuses incompatible inputs and immutable endpoint changes before writing.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step
          9: OWN-2 naming another boat is refused because endpoints never change, and with its own endpoints
          its notes update
  - id: ATS-PFM-MTD-016-06
    title: Link corrections expose destructive omission behaviour
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-06
    preconditions: A known dated link has position and notes and another link is ended.
    steps:
      - do: Submit corrections containing only a primary flag or omitting an end date.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step
          6: a CRW-1 line with only isPrimary replaces the association and clears its dates, position and
          notes, silently
    expected: Omitted attributes clear and the ended link reopens without warning.
    negative: false
    data_needs: A known dated link has position and notes and another link is ended.
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step 6:
        a CRW-1 line with only isPrimary replaces the association and clears its dates, position and notes,
        silently
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step 7:
        a CRW-2 line without endDate reopens the ended season, and says nothing
      - TST-PFM-MTD-136
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step 6: a
      CRW-1 line with only isPrimary replaces the association and clears its dates, position and notes,
      silently
    category: edge
    assertions:
      - expect: Omitted attributes clear and the ended link reopens without warning.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step
          6: a CRW-1 line with only isPrimary replaces the association and clears its dates, position and
          notes, silently
  - id: ATS-PFM-MTD-016-07
    title: Job and line permissions remain distinct
    level: api
    proves:
      - BR-CAP-PFM-MTD-016-07
    preconditions: 'Create-only, reader and foreign-workspace callers exist.'
    steps:
      - do: Load new and known links and inspect results under each caller.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0404.spec.js#step
          5: a clerk with the create key only has the known key refused as not found and the new key created
    expected: >-
      New links require create, known links require update, disallowed callers fail and other submitters
      cannot read results.
    negative: true
    data_needs: 'Create-only, reader and foreign-workspace callers exist.'
    bound_to:
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0404.spec.js#step 1:
        a read-only volunteer is refused 403 permission_missing, naming no key, and no job is made
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0404.spec.js#step 5:
        a clerk with the create key only has the known key refused as not found and the new key created
      - >-
        services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0404.spec.js#step 8:
        the create-only clerk reading the registrar’s job results is answered 404
      - TST-PFM-MTD-137
    provenance: test
    source: >-
      services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0404.spec.js#step 5: a
      clerk with the create key only has the known key refused as not found and the new key created
    category: permission
    assertions:
      - expect: >-
          New links require create, known links require update, disallowed callers fail and other submitters
          cannot read results.
        provenance: test
        source: >-
          services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0404.spec.js#step
          5: a clerk with the create key only has the known key refused as not found and the new key created
  - id: ATS-PFM-MTD-016-08
    title: Object lifecycle changes the outcome of record and link loads
    category: interaction
    level: api
    exercises:
      - CAP-PFM-MTD-016
      - CAP-PFM-MTD-009
      - CAP-PFM-MTD-012
      - CAP-PFM-MTD-018
    proves:
      - BR-CAP-PFM-MTD-016-04
      - BR-CAP-PFM-MTD-016-05
      - BR-CAP-PFM-MTD-009-08
    preconditions: Record and link files resolve keys into an active object.
    steps:
      - do: >-
          Validate the files, archive the object, apply the validated impact and inspect line results and
          storage.
        provenance: proposed
        source: &ref_0
          - >-
            services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0400.spec.js#step
            6: every created boat reads back as the file said, and the id refused at step 2 named no record
          - >-
            services-platform:tests/acceptance/custom-objects/journeys/data-operations/CO-ACC-0402.spec.js#step
            9: OWN-2 naming another boat is refused because endpoints never change, and with its own endpoints
            its notes update
          - >-
            services-platform:modules/custom-objects/tests/integration/services/persistence/custom-objects.integration.spec.js#restores
            an archived object as a draft, keeping its object id
    expected: Check the ordinary write refusals and verify that no invalid records or links are inserted.
    negative: false
    data_needs: Record and link files resolve keys into an active object.
    bound_to: []
    provenance: proposed
    source: *ref_0
    assertions:
      - expect: Check the ordinary write refusals and verify that no invalid records or links are inserted.
        provenance: proposed
        source: *ref_0
evidence:
  - >-
    services-platform at ad3f6a6582843008ed0f5a17b131878d15829af1: the data-operations acceptance journeys
    named in each scenario.
  - >-
    Codex testing back-fill: pinned capability, domain object, state model and workflow obligations reviewed;
    existing bound test files and exact case titles checked.
coverage:
  rule: covered
  transition: 'gap: FND-PFM-MTD-078'
  validation: covered
  permission: covered
  edge: covered
  failure: covered
  boundary: 'gap: FND-PFM-MTD-078'
  concurrency: 'gap: FND-PFM-MTD-078'
  invariant: covered
  interaction: covered
coverage_obligations:
  - rule: BR-CAP-PFM-MTD-016-01
    scenarios:
      - ATS-PFM-MTD-016-01
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
  - rule: BR-CAP-PFM-MTD-016-02
    scenarios:
      - ATS-PFM-MTD-016-02
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
  - rule: BR-CAP-PFM-MTD-016-03
    scenarios:
      - ATS-PFM-MTD-016-03
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
  - rule: BR-CAP-PFM-MTD-016-04
    scenarios:
      - ATS-PFM-MTD-016-04
      - ATS-PFM-MTD-016-08
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
  - rule: BR-CAP-PFM-MTD-016-05
    scenarios:
      - ATS-PFM-MTD-016-05
      - ATS-PFM-MTD-016-08
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
  - rule: BR-CAP-PFM-MTD-016-06
    scenarios:
      - ATS-PFM-MTD-016-06
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
  - rule: BR-CAP-PFM-MTD-016-07
    scenarios:
      - ATS-PFM-MTD-016-07
    finding: null
    provenance: documented
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
interactions:
  - with: CAP-PFM-MTD-009
    scenarios:
      - ATS-PFM-MTD-016-08
    finding: null
    provenance: proposed
    source: >-
      specs/platform/metadata/planning/capabilities/CAP-PFM-MTD-016-load-custom-records-and-their-links-from-a-file-again-and-again.md
---

# Load and Reconcile Record Files: Capability Test Specification

## Coverage

- Obligation 01: 1 scenario cite this obligation.
- Obligation 02: 1 scenario cite this obligation.
- Obligation 03: 1 scenario cite this obligation.
- Obligation 04: 2 scenarios cite this obligation.
- Obligation 05: 2 scenarios cite this obligation.
- Obligation 06: 1 scenario cite this obligation.
- Obligation 07: 1 scenario cite this obligation.

Category coverage identifies the kind of proof present. Detailed transition, permission and invariant obligations and unbound proposals remain in the coverage finding until their individual cases are accounted for.

## Interactions With Related Capabilities

Validation does not exempt later writes from current object availability. The structured interaction rows identify the related capabilities exercised and any remaining gap. Cross-capability workflow seams remain subject to the detailed coverage audit.
