Skip to content

ATS-PFM-LLM-003undefined

Markdown

ATS-PFM-LLM-003

undefined

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleAI Requests, Usage and the Jazz AI TeammateRevision2

Read atservices-platform ad3f6a65

Coverage

  • Rule gap: FND-PFM-LLM-062
  • Transition gap: FND-PFM-LLM-062
  • Validation covered
  • Permission not-applicable
  • Edge gap: FND-PFM-LLM-062
  • Failure covered
  • Boundary covered
  • Concurrency covered
  • Invariant gap: FND-PFM-LLM-062
  • Interaction covered

Test Scenarios

11 scenarios proving CAP-PFM-LLM-003; 9 bound to an existing test.

01 Task completion and failure retain timingtransitionapitest
Proves
BR-CAP-PFM-LLM-003-01
Preconditions
One task returns and another throws after two requests.
Steps
Execute both through the task wrapper.
Expected
The records close completed or failed with end times and durations, retaining settled requests on the failed task.
Data
Fixtures representing one task returns and another throws after two requests.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#completes, and says it was not a replay
02 Only scoped context associates requestsinvariantapitest
Proves
BR-CAP-PFM-LLM-003-02 INV-DOM-PFM-LLM-001-07
Preconditions
Requests are made inside and outside an execution.
Steps
Execute and inspect both requests.
Expected
The wrapped request names its task and the outside request has no task association.
Data
Fixtures representing requests are made inside and outside an execution.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#gives a call outside a wrapper no execution
03 Nested task execution is rejectedvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-003-03
Preconditions
A task attempts to open another execution.
Steps
Run the outer task.
Expected
The inner open fails and the outer execution closes failed.
Data
Fixtures representing a task attempts to open another execution.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#refuses an execution inside an execution
04 Unknown task definitions create no recordvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-003-04
Preconditions
The supplied execution key is undeclared.
Steps
Attempt to open an execution.
Expected
Validation rejects it before insertion.
Data
Fixtures representing the supplied execution key is undeclared.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#refuses a key nobody declared, before any row is written
05 Task totals follow settlementsruleapitest
Proves
BR-CAP-PFM-LLM-003-05 INV-DOM-PFM-LLM-001-10
Preconditions
A task includes three settlements and one refused request.
Steps
Execute and inspect the task and allowance period.
Expected
The three settlements contribute their costs, the refused request stays linked without increasing settlement count, and the charged totals agree.
Data
Fixtures representing a task includes three settlements and one refused request.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#totals the credits the three settlements charged
06 Replayed task keys do not rerun workconcurrencyapitest
Proves
BR-CAP-PFM-LLM-003-06
Preconditions
Two opens share one idempotency key and another uses a different key.
Steps
Open all three tasks.
Expected
The repeated key returns the first task as a replay, and only two executions run.
Data
Fixtures representing two opens share one idempotency key and another uses a different key.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#says the second was a replay
07 Execution closing keeps task errors intelligiblefailureapinegativeproposed
Proves
BR-CAP-PFM-LLM-003-09
Preconditions
Task completion storage can fail.
Steps
Run a failing task and a successful task with injected close errors.
Expected
A task error remains the returned failure; a close error after successful work reaches the caller.
Data
Fault-injection fixtures for the described failure boundary.
Source
services-platform:modules/llm/services/execution/with-llm-execution.ts:withLlmExecution
08 Recovery closes stale tasks without rewriting totalsinteractionapitest
Proves
BR-CAP-PFM-LLM-003-01 BR-CAP-PFM-LLM-009-05
Preconditions
A stale running task contains settled requests and a recent task remains running.
Steps
Run task recovery twice and compare statuses and totals.
Expected
Only the stale task becomes abandoned, retaining its totals and no measured duration; repetition does not alter it.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Bound to
Source
services-platform:modules/llm/tests/integration/services/reconciliation/llm-execution-sweep.integration.spec.js#abandons the stale running execution,services-platform:modules/llm/tests/integration/services/reconciliation/llm-execution-sweep.integration.spec.js#abandons nothing the second time,services-platform:modules/llm/tests/integration/services/reconciliation/llm-execution-sweep.integration.spec.js#leaves the totals as the settlements put them
09 Inspection links tasks to their requestsinteractionapiproposed
Proves
BR-CAP-PFM-LLM-003-05 BR-CAP-PFM-LLM-011-08
Preconditions
A task contains three associated settled requests and another organization has a task.
Steps
List the first organization’s tasks and open its task detail.
Expected
Detail pairs the stored task totals with its requests and never includes the other organization’s task.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/persistence/invocations.ts,services-platform:modules/llm/aws/api/llm-usage-api-mapper.ts
10 Task replay identity stays workspace-scopedboundaryapitest
Proves
BR-CAP-PFM-LLM-003-06
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Open tasks with an identical replay key in two workspaces.
Expected
Each workspace retains its own execution while a repeated key within one workspace is refused by persistence.
Data
Suite-owned fixtures, with a fixed clock where dates or grant windows matter.
Bound to
Source
services-platform:modules/llm/tests/integration/db/llm-executions.table.integration.spec.js#accepts the same idempotency key in another tenant
11 Failed settlement transaction retains task totalsinvariantapitest
Proves
BR-CAP-PFM-LLM-003-05
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Apply request settlement inside a transaction that subsequently fails.
Expected
The request remains unsettled and task counters stay at their prior zero values.
Data
Suite-owned fixtures, with a fixed clock where dates or grant windows matter.
Bound to
Source
services-platform:modules/llm/tests/integration/services/persistence/executions.integration.spec.js#leaves the counters at zero

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.