ATS-PFM-QRY-005 Provide a customer with a tailored dataset: Capability Test Specification
Markdown Design / Platform / Questions, record exploration and data delivery / Dataset access and querying / Capability Test Specification Show evidence (sources, provenance, origins, pinned commits)Coverage Rule gap: FND-PFM-QRY-055 Transition gap: FND-PFM-QRY-055 Validation covered Permission covered Edge gap: FND-PFM-QRY-055 Failure covered Boundary covered Concurrency covered Invariant gap: FND-PFM-QRY-055 Interaction covered Test Scenarios 18 scenarios proving CAP-PFM-QRY-005 ; 14 bound to an existing test.
01 Custom-table powers remain divided permission api negative test
Proves BR-CAP-PFM-QRY-005-01 Preconditions Staff callers have separate read, author and publish grants, and a customer caller has console access. Steps Exercise reading, drafting and publication with each caller. Expected Only the appropriate powers succeed; customers cannot reach the staff routes and authors cannot publish alone. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses a tenant’s own console user every one of them, for not being staff 02 Definition identities cannot be reused invariant api negative test
Proves BR-CAP-PFM-QRY-005-02 INV-DOM-PFM-QRY-001-07 Preconditions A custom definition is already registered. Steps Create its identity again and try an invalid identity form. Expected Duplicate identity returns 409; invalid form returns 400 without a write. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses a second definition under the same id, an id being permanent and never reused 03 Analysis returns structured problems validation api test
Proves BR-CAP-PFM-QRY-005-03 Preconditions Valid and unsafe statements are available for drafts. Steps Analyze both statements. Expected The valid analysis supplies access and field information; unsafe analysis succeeds as a response containing problems. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #says what the statement reads and the permission a caller would need for it 04 Only supported placeholders enter drafts validation api negative test
Proves BR-CAP-PFM-QRY-005-04 Preconditions A custom-table draft exists. Steps Save declared customer parameters and an unsupported placeholder. Expected Both saves are refused with 400. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses a draft that declares parameters as 400, a definition taking only the platform's own placeholders 05 Validation configuration limits statement work failure api negative test
Proves BR-CAP-PFM-QRY-005-05 Preconditions One environment has a validation workspace and another does not. Steps Preview another workspace and invoke analysis, draft validation, publication and preview without configuration. Expected The foreign preview is refused, missing configuration returns unavailable, and registry reads remain usable. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses a preview of any other tenant, a customer’s rows needing a staff access grant there is no way to hold 06 Breaking publication requires acknowledgment interaction api negative test
Proves BR-CAP-PFM-QRY-005-06 Preconditions A saved question uses a column removed by the next custom-table draft. Steps Publish without acknowledgment, then acknowledge and retry. Expected The first attempt reports dependencies with 409; the second records a breaking publication. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses the publish as 409 rather than breaking the query quietly 07 Assignments limit dataset existence boundary api negative test
Proves BR-CAP-PFM-QRY-005-07 INV-DOM-PFM-QRY-001-10 Preconditions One published definition covers only a designated workspace. Steps List and describe it in covered and uncovered workspaces. Expected It is usable where assigned and missing elsewhere. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #lists the definition as a dataset of its own, authorized by the dataset the statement reads 08 Statement permissions constrain readers permission api negative proposed
Proves BR-CAP-PFM-QRY-005-08 Preconditions An assigned definition reads organizations and a reader lacks that grant. Steps Inspect its catalog entry and execute it. Expected It is unauthorized and execution returns 403 naming the missing permission. Data Prepare isolated fixtures for the states described here. Source services-platform:docs/queries/semantic-query-layer.md #14.2 What resolves a custom dataset 09 Pin validation and precedence transition api negative test
Proves BR-CAP-PFM-QRY-005-09 Preconditions Published versions have platform-wide, customer and workspace assignments with overlapping pins. Steps Exercise set and clear refusals, then resolve competing pins and an unpinned workspace assignment. Expected Unpublished and stale changes are refused. The most specific covering pin wins; an unpinned assignment leaves a broader pin effective. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #clears the pin at the version the caller read, which puts the scope back on the published version 10 Deprecation and disabling have distinct effects transition api negative test
Proves BR-CAP-PFM-QRY-005-10 Preconditions An assigned definition is active. Steps Deprecate, disable and restore it while checking continued execution. Expected Deprecation keeps execution available without picker presence; disabling refuses; restoration restores use. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #deprecates it, which takes it out of every picker and leaves it answering 11 Fingerprint mismatch prevents execution invariant api negative proposed
Proves BR-CAP-PFM-QRY-005-11 INV-DOM-PFM-QRY-001-09 Preconditions Stored publication text no longer matches its publication fingerprint. Steps Run the assigned custom dataset. Expected An integrity refusal identifies the definition while hiding statement text and records the mismatch. Data Prepare isolated fixtures for the states described here. Source services-platform:docs/queries/semantic-query-layer.md #14.2 What resolves a custom dataset 12 History explains actions without sensitive content invariant api test
Proves BR-CAP-PFM-QRY-005-12 INV-DOM-PFM-QRY-001-11 Preconditions A definition has undergone several lifecycle actions. Steps Read its history. Expected Entries identify actor and action newest first, without statement text or record values. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #answers the history, newest first, naming the actor and what each step did 13 Reverse relationships follow assignment interaction api negative test
Proves BR-CAP-PFM-QRY-005-13 Preconditions A definition exposes an organization reference. Steps Describe and join it from Organizations in covered and uncovered workspaces. Expected The covered workspace gets the relationship and result; the uncovered one is refused. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #describes it as a one-to-many relationship of the dataset, which is what the Data tab offers 14 Concurrent custom-table changes conflict concurrency api negative test
Proves BR-CAP-PFM-QRY-005-14 Preconditions Another writer has advanced the definition or draft version. Steps Save the draft and presentation against their earlier versions. Expected Both stale writes return 409. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses a save at a version somebody else has moved on from as 409 15 Revalidation records meaningful health changes transition api negative test
Proves BR-CAP-PFM-QRY-005-15 Preconditions Published and pinned versions, including a definition that later loses a database grant. Steps Run revalidation twice, remove and restore a required grant, then run with no validation workspace. Expected All runnable versions are checked; history records failure and recovery without sensitive content, repeated unchanged checks add no entry, and absent configuration causes a clean skip. Data Use the existing suite’s controlled fixtures. Bound to Source services-platform:modules/queries/tests/integration/services/custom-tables/custom-table-revalidation.integration.spec.js #checks every published version and every version an assignment pins, each once 16 Unsafe statement forms fail analysis validation unit negative test
Proves BR-CAP-PFM-QRY-005-16 Preconditions A permitted read statement and variants containing writes, locks, recursion or forbidden access. Steps Analyze the positive case and each unsafe variant. Expected The permitted read passes; each unsafe variant returns a problem identifying the refusal. Data Use the existing suite’s controlled fixtures. Bound to Source services-platform:modules/queries/tests/unit/services/custom-tables/analyze-sql-refusals.spec.ts #accepts a minimal one-relation SELECT, so the refusals below are not vacuous (the known positive) 17 A tailored dataset disappears from new choices before execution stops interaction api negative proposed
Proves BR-CAP-PFM-QRY-001-02 BR-CAP-PFM-QRY-005-10 Preconditions One assigned tailored dataset supplies a retained question. Steps Read its description, deprecate it, reopen the retained question, then disable it and run again. Expected Deprecation removes the new choice while the retained question still resolves; disabling produces the explicit refusal. Data Use an isolated workspace with the described source records, access grants and a surviving control workspace. Source services-platform:modules/queries/tests/e2e/datasets.e2e.spec.js #refuses a dataset the caller holds no query permission for as 403,services-platform:modules/queries/services/custom-tables/assignment-visibility.ts:visibleCustomTables 18 A breaking publication waits for retained questions interaction api proposed
Proves BR-CAP-PFM-QRY-005-06 BR-CAP-PFM-QRY-006-10 Preconditions A saved question selects a field from an assigned tailored dataset. Steps Publish a draft removing that field without acknowledgment, then acknowledge the named dependency and retry. Expected The first attempt identifies the saved question without publishing; the acknowledged attempt publishes the revised version. Data Use an isolated workspace with the described source records, access grants and a surviving control workspace. Source services-platform:modules/queries/tests/e2e/custom-tables.e2e.spec.js #refuses the publish as 409 rather than breaking the query quietly,services-platform:modules/queries/tests/e2e/saved-queries.e2e.spec.js#refuses a body whose definition cannot be run as written as 400 ← Previous Capability Test Specification ATS-PFM-QRY-004 · Answer operational questions across customers: Capability Test Specification Next Capability Test Specification → ATS-PFM-QRY-006 · Save and share reusable questions: Capability Test Specification