ATS-PFM-QRY-003 Draft a query from a written request: 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 covered Transition gap: FND-PFM-QRY-053 Validation gap: FND-PFM-QRY-053 Permission covered Edge gap: FND-PFM-QRY-053 Failure covered Boundary covered Concurrency covered Invariant covered Interaction covered Test Scenarios 12 scenarios proving CAP-PFM-QRY-003 ; 11 bound to an existing test.
01 Generation has separate authority permission api negative test
Proves BR-CAP-PFM-QRY-003-01 Preconditions A caller has query access but lacks generation permission. Steps Request a generation and poll an existing one. Expected Both operations return 403. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #refuses a caller without platform.queries.generate as 403, however much else they hold 02 Generation checks its subject permission api negative test
Proves BR-CAP-PFM-QRY-003-02 Preconditions A caller cannot query the requested dataset. Steps Generate for that subject and for an unregistered subject. Expected Access is refused with 403 and absence returns 404. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #refuses a caller who may not query the dataset as 403 04 Generation follows its initiating person permission api negative test
Proves BR-CAP-PFM-QRY-003-04 INV-DOM-PFM-QRY-002-12 Preconditions A generation remains in progress in one workspace. Steps Read it as its requester, another person and from another workspace. Expected Only the initiating person in the originating workspace can read it. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #answers 200 with the generation still working 05 Generated definitions use ordinary execution invariant api test
Proves BR-CAP-PFM-QRY-003-05 Preconditions Generation has produced a valid query. Steps Submit that query through normal execution. Expected Execution succeeds under the requester’s data access. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #answers the query the worker stored, which is the query the execute route would accept 06 Exhausted allowance prevents admission failure api negative test
Proves BR-CAP-PFM-QRY-003-06 Preconditions The organization has no remaining AI credit. Steps Submit a generation request. Expected The request fails immediately with allowance details and no model or price disclosure. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #refuses the request itself, rather than accepting it and failing two minutes later 07 Metering remains separate from visible output rule api test
Proves BR-CAP-PFM-QRY-003-07 Preconditions A generation has completed successfully. Steps Inspect its invocation accounting and requester-facing record. Expected Accounting records one invocation while visible output omits cost and model. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #recorded one metered invocation for the request, against this operation and its prompt version 08 Refinement retains its predecessor transition api negative test
Proves BR-CAP-PFM-QRY-003-09 Preconditions One generation is complete and another is still working. Steps Request refinements of both. Expected The completed predecessor yields a linked new generation; the working predecessor is refused. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #is a generation of its own, not the one it refines 09 Simultaneous-call limits explain retry concurrency api negative test
Proves BR-CAP-PFM-QRY-003-10 Preconditions The organization has reached its concurrent AI-call cap. Steps Request generation and inspect its settled state. Expected Failure identifies the concurrency limit and the invocation records a refusal reason. Data Use the existing binding’s controlled fixture data. Bound to Source services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js #leaves a refused invocation that names the reason, the generation having been refused rather than failed 12 A proposed question cannot bypass execution access interaction api negative proposed
Proves BR-CAP-PFM-QRY-002-01 BR-CAP-PFM-QRY-003-05 Preconditions A completed proposal refers to Contacts and its requester subsequently loses contact query access. Steps Open the proposal and submit its query to ordinary execution. Expected The proposal remains requester-readable but its execution is refused before contact rows are returned. Data Use an isolated workspace with the described source records, access grants and a surviving control workspace. Source services-platform:modules/queries/tests/integration/services/execute/run-query.integration.spec.js #refuses a column no owner registered exactly as it refuses one that does not exist at all,services-platform:modules/queries/tests/e2e/generate-query.e2e.spec.js#runs the query it answered: the console can send it straight to the execute route ← Previous Capability Test Specification ATS-PFM-QRY-002 · Answer a question within the reader’s access: Capability Test Specification Next Capability Test Specification → ATS-PFM-QRY-004 · Answer operational questions across customers: Capability Test Specification