Skip to content

ATS-MKT-MKT-010Preserve the evaluating person's record visibility: Capability Test Specification

Markdown

ATS-MKT-MKT-010

Preserve the evaluating person's record visibility: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaMarketingModuleMarketing campaigns, communications and resolutionRevision3

Read atservices-marketing d071a159react-console baf6dae3

Coverage

  • Rule covered
  • Transition not-applicable
  • Validation covered
  • Permission covered
  • Edge gap: FND-MKT-MKT-060
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-MKT-MKT-060
  • Invariant covered
  • Interaction covered

Test Scenarios

17 scenarios proving CAP-MKT-MKT-010; 11 bound to an existing test.

01 Every query call uses that person's identityruleunittest
Proves
BR-CAP-MKT-MKT-010-01
Preconditions
An in-memory evaluation names a specific person.
Steps
[ { "do": "Inspect all query-service calls made during evaluation.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#is the person given: every call to Platform is made as them" } ]
Expected
Every query call uses that person's identity.
Data
Use the isolated fixtures defined by the bound suite.
Bound to
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#is the person given: every call to Platform is made as them
Source
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#is the person given: every call to Platform is made as them
02 The signed-in user supplies read authoritypermissionapitest
Proves
BR-CAP-MKT-MKT-010-02
Preconditions
The signed-in requester differs from the audience owner.
Steps
[ { "do": "Preview and inspect query calls.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner" } ]
Expected
The signed-in user supplies read authority.
Data
Prepare audience and membership rows with in-process doubles for external record reads.
Bound to
services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner
Source
services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner
03 Owner authority is not substituted for the requesterpermissionapinegativetest
Proves
BR-CAP-MKT-MKT-010-03
Preconditions
The owner can query a dataset that the count requester cannot.
Steps
[ { "do": "Run the count task.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place" } ]
Expected
Owner authority is not substituted for the requester.
Data
Prepare audience and membership rows with in-process doubles for external record reads.
Bound to
services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place
Source
services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place
04 The API returns a permission refusal without empty resultspermissionapinegativetest
Proves
BR-CAP-MKT-MKT-010-04
Preconditions
The caller can view audiences but cannot query contacts.
Steps
[ { "do": "Request a contacts preview.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience" } ]
Expected
The API returns a permission refusal without empty results.
Data
Use suite-created audience, list and contact fixtures with a Platform query double.
Bound to
services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience
Source
services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience
05 Contact query access fails independently of invoice accesspermissionunitnegativetest
Proves
BR-CAP-MKT-MKT-010-05
Preconditions
The caller can query invoices but cannot query their referenced contacts.
Steps
[ { "do": "Evaluate the invoice audience.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at" } ]
Expected
Contact query access fails independently of invoice access.
Data
Use the isolated fixtures defined by the bound suite.
Bound to
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at
Source
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at
06 The start is accepted and the evaluation later reports the permission failurepermissionapitest
Proves
BR-CAP-MKT-MKT-010-06
Preconditions
The requester lacks source-dataset access.
Steps
[ { "do": "Start a count and read its later settlement.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#answers a count by a person who may not query the dataset 202, then reads it back failed with Platform’s code, never counted" } ]
Expected
The start is accepted and the evaluation later reports the permission failure.
Data
Use suite-created audience, list and contact fixtures with a Platform query double.
Bound to
services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#answers a count by a person who may not query the dataset 202, then reads it back failed with Platform’s code, never counted
Source
services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#answers a count by a person who may not query the dataset 202, then reads it back failed with Platform’s code, never counted
07 Submission is refused rather than using another personvalidationunitnegativetest
Proves
BR-CAP-MKT-MKT-010-07
Preconditions
The submitted count has no requester identity.
Steps
[ { "do": "Invoke the count starter.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#refuses a submission that names no requester" } ]
Expected
Submission is refused rather than using another person.
Data
Use the isolated fixtures defined by the bound suite.
Bound to
Source
services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#refuses a submission that names no requester
08 Contact facts are queried through the person-based entry pointpermissionunittest
Proves
BR-CAP-MKT-MKT-010-08
Preconditions
A list audience references CRM contacts.
Steps
[ { "do": "Evaluate the list and inspect query calls.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#reads the contacts as the person, even though the list is Marketing’s" } ]
Expected
Contact facts are queried through the person-based entry point.
Data
Use the isolated fixtures defined by the bound suite.
Bound to
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#reads the contacts as the person, even though the list is Marketing’s
Source
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#reads the contacts as the person, even though the list is Marketing’s
09 The screen presents the refusal rather than an empty audiencefailurebrowsertest
Proves
BR-CAP-MKT-MKT-010-10
Preconditions
The mock-backed console receives an evaluation permission refusal.
Steps
[ { "do": "Request preview as the insufficiently authorized viewer.", "provenance": "test", "source": "react-console:e2e/mock/marketing-audiences.mock.spec.ts#is shown as a message, never as an empty audience, when the person may not query the records" } ]
Expected
The screen presents the refusal rather than an empty audience.
Data
Use the console Marketing fixtures and mocked request handlers.
Bound to
react-console:e2e/mock/marketing-audiences.mock.spec.ts#is shown as a message, never as an empty audience, when the person may not query the records
Source
react-console:e2e/mock/marketing-audiences.mock.spec.ts#is shown as a message, never as an empty audience, when the person may not query the records
10 Limits are applied and invalid field batches or responses become faultsboundaryunittest
Proves
BR-CAP-MKT-MKT-010-11
Preconditions
A controlled Lambda client captures query requests and supplies invalid answers.
Steps
[ { "do": "Exercise oversized page, count and field requests and malformed responses.", "provenance": "test", "source": "services-marketing:modules/marketing/tests/unit/marketing-record-ids.spec.ts#holds a page to Platform’s 1,000 records, so an out-of-range request is never made" } ]
Expected
Limits are applied and invalid field batches or responses become faults.
Data
Use the isolated fixtures defined by the named source suites.
Bound to
services-marketing:modules/marketing/tests/unit/marketing-record-ids.spec.ts#holds a page to Platform’s 1,000 records, so an out-of-range request is never made
services-marketing:modules/marketing/tests/unit/marketing-record-ids.spec.ts#refuses to ask for the fields of more than 1,000 records, which Platform would refuse
services-marketing:modules/marketing/tests/unit/marketing-record-ids.spec.ts#takes an answer of another operation as a fault, not as the page asked for
Source
services-marketing:modules/marketing/tests/unit/marketing-record-ids.spec.ts#holds a page to Platform’s 1,000 records, so an out-of-range request is never made
11 Address selection cannot bypass contact visibilityinteractionapinegativeproposed
Proves
BR-CAP-MKT-MKT-003-02 BR-CAP-MKT-MKT-010-05
Preconditions
A requester can query invoices but cannot query contact facts; the audience selects the second address.
Steps
[ { "do": "Preview the invoice audience as that requester.", "provenance": "proposed", "source": [ "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#does not fall back to the primary address when the second slot is empty", "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at" ] } ]
Expected
The preview reports the contact-query refusal without returning an address or a zero total.
Data
Create the named records in a run-owned workspace; use a controllable query dependency and retain versions between steps.
Source
services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#does not fall back to the primary address when the second slot is empty,services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at
12 An exclusion read retains the requesting personinteractionapinegativeproposed
Proves
BR-CAP-MKT-MKT-004-05 BR-CAP-MKT-MKT-004-08 BR-CAP-MKT-MKT-010-01 BR-CAP-MKT-MKT-010-05
Preconditions
An audience subtracts another audience; the requester lacks access to the subtracted source.
Steps
[ { "do": "Evaluate the enclosing audience as that requester.", "provenance": "proposed", "source": [ "services-marketing:modules/resolution/tests/unit/resolve-recipients.spec.ts#excludes with `contact_missing` an alias whose survivor does not exist", "services-marketing:modules/marketing/services/evaluation/evaluate-audience.ts:excludedContactIds", "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#is the person given: every call to Platform is made as them", "services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at" ] } ]
Expected
Evaluation fails with the source-query refusal rather than treating the exclusion as empty.
Data
Create the named records in a run-owned workspace; use a controllable query dependency and retain versions between steps.
Source
services-marketing:modules/resolution/tests/unit/resolve-recipients.spec.ts#excludes with `contact_missing` an alias whose survivor does not exist,services-marketing:modules/marketing/services/evaluation/evaluate-audience.ts:excludedContactIds,services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#is the person given: every call to Platform is made as them,services-marketing:modules/marketing/tests/unit/evaluate-audience.spec.ts#refuses a person who may query the invoices but not the contacts they point at
13 A refused requester leaves the earlier preview intactinteractionapinegativeproposed
Proves
BR-CAP-MKT-MKT-008-06 BR-CAP-MKT-MKT-008-07 BR-CAP-MKT-MKT-010-02 BR-CAP-MKT-MKT-010-04
Preconditions
Maya has successfully previewed an audience; Ben lacks its source-query authority.
Steps
[ { "do": "Ben previews the same audience and read its stored history and summary afterward.", "provenance": "proposed", "source": [ "services-marketing:modules/marketing/services/evaluation/audience-evaluations.ts:recordFailure", "services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#leaves the audience’s version alone, so an editor’s next save is not stale", "services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner", "services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience" ] } ]
Expected
Ben receives a refusal; a failed evaluation has no counts and Maya’s earlier summary remains intact.
Data
Create the named records in a run-owned workspace; use a controllable query dependency and retain versions between steps.
Source
services-marketing:modules/marketing/services/evaluation/audience-evaluations.ts:recordFailure,services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#leaves the audience’s version alone, so an editor’s next save is not stale,services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner,services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience
14 Resource authority starts a count but cannot lend query authorityinteractionapinegativeproposed
Proves
BR-CAP-MKT-MKT-009-04 BR-CAP-MKT-MKT-009-11 BR-CAP-MKT-MKT-010-03 BR-CAP-MKT-MKT-010-06
Preconditions
The owner can query contacts and Ben has audience-view authority without contact-query authority.
Steps
[ { "do": "Ben starts a count; run its job and inspect the evaluation.", "provenance": "proposed", "source": [ "services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#settles the evaluation failed with Platform’s code, never counted and never empty", "services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#is submitted under the key that lets a person count: audiences.view", "services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place", "services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#answers a count by a person who may not query the dataset 202, then reads it back failed with Platform’s code, never counted" ] } ]
Expected
The request is accepted and its evaluation later fails with the dataset-access reason without substituting the owner.
Data
Create the named records in a run-owned workspace; use a controllable query dependency and retain versions between steps.
Source
services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#settles the evaluation failed with Platform’s code, never counted and never empty,services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#is submitted under the key that lets a person count: audiences.view,services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place,services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#answers a count by a person who may not query the dataset 202, then reads it back failed with Platform’s code, never counted
15 Taking ownership does not change another requester’s visibilityinteractionapiproposed
Proves
BR-CAP-MKT-MKT-010-02 BR-CAP-MKT-MKT-010-03 BR-CAP-MKT-MKT-011-01
Preconditions
Maya can query all contacts; Ben can query only east contacts.
Steps
[ { "do": "Transfer the audience to Maya, then preview and count as Ben.", "provenance": "proposed", "source": [ "services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner", "services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place", "services-marketing:modules/marketing/tests/integration/services/audiences.integration.spec.ts#makes the administrator the owner" ] } ]
Expected
Both calculations retain Ben’s identity and contain only the contacts he can read.
Data
Create the named records in a run-owned workspace; use a controllable query dependency and retain versions between steps.
Source
services-marketing:modules/marketing/tests/integration/services/audience-evaluation.integration.spec.ts#runs every read as the signed-in user, not as the audience’s owner,services-marketing:modules/marketing/tests/integration/services/count-everyone-job.integration.spec.ts#does not run as the audience’s owner, who may query the dataset, in its place,services-marketing:modules/marketing/tests/integration/services/audiences.integration.spec.ts#makes the administrator the owner
16 Audience permission and query permission are independent gatesinteractionapinegativeproposed
Proves
BR-CAP-MKT-MKT-010-04 BR-CAP-MKT-MKT-017-03
Preconditions
Maya can query contacts but has no Marketing resource key; Ben has audience-view authority but cannot query contacts.
Steps
[ { "do": "Request a preview as each person.", "provenance": "proposed", "source": [ "services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience", "services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a user holding no Marketing key the preview, the count and the read of an evaluation" ] } ]
Expected
Maya is refused at the Marketing boundary; Ben reaches evaluation but receives the source-query refusal.
Data
Create the named records in a run-owned workspace; use a controllable query dependency and retain versions between steps.
Source
services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a person who may not query contacts with a 403, never an empty audience,services-marketing:modules/marketing/tests/e2e/audience-evaluation.e2e.spec.ts#refuses a user holding no Marketing key the preview, the count and the read of an evaluation
17 A submitted job keeps a requester and no fallback ownerinvariantunittest
Proves
BR-CAP-MKT-MKT-010-03 BR-CAP-MKT-MKT-010-07
Preconditions
A viewer starts a count over an audience owned by someone else.
Steps
[ { "do": "Inspect the submitted root and the input given to its task.", "provenance": "test", "source": [ "services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#hands the engine the person who asked, as the person the count runs as", "services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#hands the engine no owner of the audience to fall back to", "TST-MKT-MKT-020" ] } ]
Expected
The task receives the viewer; its input has no owner to substitute.
Data
Use the suite’s isolated fixtures and dependency doubles within its recorded verification boundary.
Bound to
services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#hands the engine the person who asked, as the person the count runs as
services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#hands the engine no owner of the audience to fall back to
Source
services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#hands the engine the person who asked, as the person the count runs as,services-marketing:modules/marketing/tests/unit/count-everyone-job.spec.ts#hands the engine no owner of the audience to fall back to,TST-MKT-MKT-020

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.