Skip to content

ATS-PFM-DJE-011Upload a bounded file for reliable job input: Capability Test Specification

Markdown

ATS-PFM-DJE-011

Upload a bounded file for reliable job input: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision2

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

12 scenarios proving CAP-PFM-DJE-011; 9 bound to an existing test.

01 Upload operations require their shared permissionpermissionapinegativetest
Proves
BR-CAP-PFM-DJE-011-01
Preconditions
Prepare a session and a caller lacking upload access.
Steps
[ { "do": "Attempt creation, signing, read, completion and abort.", "expect": "Each request is refused and the existing session remains open.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/e2e/data-jobs.e2e.spec.js#refuses opening a session to a console user without the key" } ]
Expected
Each request is refused and the existing session remains open.
Data
Permission personas.
Bound to
Source
services-platform:modules/data-jobs/tests/e2e/data-jobs.e2e.spec.js#refuses opening a session to a console user without the key
02 Invalid declarations create no uploadvalidationapinegativetest
Proves
BR-CAP-PFM-DJE-011-02
Preconditions
No session setup is required.
Steps
[ { "do": "Submit invalid name, type, size, digest and extra-property declarations.", "expect": "The response identifies the invalid property without creating an upload.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses a declaration before it creates anything in S3, so a refused request leaves no upload behind" } ]
Expected
The response identifies the invalid property without creating an upload.
Data
No additional fixture is needed.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses a declaration before it creates anything in S3, so a refused request leaves no upload behind
03 Part sizing remains within supported limitsboundaryunittest
Proves
BR-CAP-PFM-DJE-011-03
Preconditions
Use sizes between one byte and 5 TiB.
Steps
[ { "do": "Calculate their part sizes.", "expect": "Sizes round to whole MiB, retain the 16 MiB floor and require at most 9,000 parts.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/unit/part-sizing.spec.ts#holds the 16 MiB floor for every file the floor can divide into the allowed number of parts" } ]
Expected
Sizes round to whole MiB, retain the 16 MiB floor and require at most 9,000 parts.
Data
No additional fixture is needed.
Bound to
Source
services-platform:modules/data-jobs/tests/unit/part-sizing.spec.ts#holds the 16 MiB floor for every file the floor can divide into the allowed number of parts
04 Signed-part requests are bounded and repeatableboundaryapinegativetest
Proves
BR-CAP-PFM-DJE-011-04
Preconditions
Prepare an open session.
Steps
[ { "do": "Request valid, out-of-range, repeated and excessive part lists, then use a closed session.", "expect": "Valid addresses expire after one hour and invalid requests are refused.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#signs each URL for one hour, which is how long a client has to use it" } ]
Expected
Valid addresses expire after one hour and invalid requests are refused.
Data
No additional fixture is needed.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#signs each URL for one hour, which is how long a client has to use it
05 Completion checks assembled size and part receiptsvalidationapinegativetest
Proves
BR-CAP-PFM-DJE-011-05
Preconditions
Prepare a session whose assembled object is short.
Steps
[ { "do": "Complete it and separately test missing parts and missing receipts.", "expect": "Wrong size aborts the session; incomplete part declarations are refused.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses a completion whose object is not the size that was declared" } ]
Expected
Wrong size aborts the session; incomplete part declarations are refused.
Data
A storage test double.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses a completion whose object is not the size that was declared
06 Digest evidence distinguishes measured and declared valuesboundaryapinegativetest
Proves
BR-CAP-PFM-DJE-011-06
Preconditions
Prepare matching, mismatching and oversized objects with declared digests.
Steps
[ { "do": "Complete each upload.", "expect": "Matching input has a verified digest; mismatch is refused and aborted; oversized input without measurement remains unverified.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#records the digest it measured over the stored object when it is the one that was declared" } ]
Expected
Matching input has a verified digest; mismatch is refused and aborted; oversized input without measurement remains unverified.
Data
A storage test double.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#records the digest it measured over the stored object when it is the one that was declared
07 Settled sessions have stable outcomestransitionapinegativetest
Proves
BR-CAP-PFM-DJE-011-07
Preconditions
Prepare completed, aborted and storage-abandoned sessions.
Steps
[ { "do": "Repeat completion, abort a completion, repeat abort and inspect abandoned input.", "expect": "Invalid transitions are refused, repeated abort returns its settled result and abandoned input expires.", "provenance": "test", "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" } ]
Expected
Invalid transitions are refused, repeated abort returns its settled result and abandoned input expires.
Data
A storage test double.
Bound to
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
08 Missing storage parts allow repairfailureapinegativetest
Proves
BR-CAP-PFM-DJE-011-08
Preconditions
Prepare completion input naming an unavailable part.
Steps
[ { "do": "Request completion.", "expect": "A descriptive 400 leaves the session open.", "provenance": "test", "source": "services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses in words a completion naming a part S3 does not hold, rather than failing as a server fault" } ]
Expected
A descriptive 400 leaves the session open.
Data
A storage test double.
Bound to
Source
services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses in words a completion naming a part S3 does not hold, rather than failing as a server fault
09 Upload metadata and workspace boundaries conceal internal stateinvariantapinegativetest
Proves
BR-CAP-PFM-DJE-011-09
Preconditions
Prepare sessions in two workspaces.
Steps
[ { "do": "Inspect metadata and attempt cross-workspace reads, completion and abort.", "expect": "Metadata omits internal storage fields; cross-workspace input is not found without a storage call.", "provenance": "test", "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" } ]
Expected
Metadata omits internal storage fields; cross-workspace input is not found without a storage call.
Data
Two independent workspaces.
Bound to
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
10 Only a completed workspace upload supplies file workinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-011-07 BR-CAP-PFM-DJE-011-09 BR-CAP-PFM-DJE-014-01
Preconditions
Create open, completed and foreign-workspace upload sessions.
Steps
[ { "do": "Submit equivalent file jobs against each session and process the accepted job.", "expect": "Only the completed local session supplies input; unavailable sessions create no processing work and foreign input is concealed.", "provenance": "proposed", "source": "services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses to abort a completed session, whose object a job may already be reading; services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses to complete another tenant’s session, and makes no S3 call for it; services-platform:modules/data-jobs/services/uploads/upload-sessions.ts:presignUploadParts; services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload id of no upload at all in the same words, so neither answer tells a caller whose it is" } ]
Expected
Only the completed local session supplies input; unavailable sessions create no processing work and foreign input is concealed.
Data
Create open, completed and foreign-workspace upload sessions.
Source
services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses to abort a completed session, whose object a job may already be reading; services-platform:modules/data-jobs/tests/integration/services/uploads/upload-sessions.integration.spec.js#refuses to complete another tenant’s session, and makes no S3 call for it; services-platform:modules/data-jobs/services/uploads/upload-sessions.ts:presignUploadParts; services-crm:modules/data-jobs/tests/e2e/bulk-data-jobs.e2e.spec.js#refuses an upload id of no upload at all in the same words, so neither answer tells a caller whose it is
11 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
12 Reset keeps input available while deletion removes itinteractionapiproposed
Proves
BR-CAP-PFM-DJE-011-11 BR-CAP-PFM-DJE-017-02 BR-CAP-PFM-DJE-017-04
Preconditions
Prepare completed uploads and loaded records in a loading workspace.
Steps
[ { "do": "Reset the workspace, inspect retained uploads, reload from them, then invoke workspace deletion on a separate disposable fixture.", "expect": "Reset retains input for another load; deletion removes its upload records and stored versions.", "provenance": "proposed", "source": "services-platform:docs/data-jobs/uploads.md#Deletion; 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" } ]
Expected
Reset retains input for another load; deletion removes its upload records and stored versions.
Data
Prepare completed uploads and loaded records in a loading workspace.
Source
services-platform:docs/data-jobs/uploads.md#Deletion; 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

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.