Skip to content

ATS-PFM-LLM-015Correct an organization’s AI charges: Capability Test Specification

Markdown

ATS-PFM-LLM-015

Correct an organization’s AI charges: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-PFM-LLM-015

Design

Executed by
TST-PFM-LLM-006, TST-PFM-LLM-022, TST-PFM-LLM-070

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

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

8 scenarios proving CAP-PFM-LLM-015; 7 bound to an existing test.

01 Charge correction excludes unqualified callerspermissionapinegativetest
Proves
BR-CAP-PFM-LLM-015-01
Preconditions
Support and customer-administrator authority are represented.
Steps
Submit a correction under each.
Expected
Neither changes charged usage or correction history.
Data
Fixtures representing support and customer-administrator authority are represented.
Bound to
Source
services-platform:modules/llm/tests/e2e/llm-adjustments-and-organization.e2e.spec.js#is refused 403 for a Support Representative, who holds the read key and not the manage key
02 Correction values require a valid signed amountvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-015-02
Preconditions
A month contains charges.
Steps
Submit zero credits, no meaningful reason and cents of opposite sign.
Expected
All examples fail without changing the month.
Data
Fixtures representing a month contains charges.
Bound to
Source
services-platform:modules/llm/tests/e2e/llm-adjustments-and-organization.e2e.spec.js#refuses zero credits as 400, naming the field
03 Only existing or current months can be correctedvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-015-03
Preconditions
The current and an earlier month have no period records.
Steps
Correct both months.
Expected
The current month is created and charged, while the absent earlier month is rejected.
Data
Fixtures representing the current and an earlier month have no period records.
Bound to
Source
services-platform:modules/llm/tests/integration/services/adjustments/adjust-allowance.integration.spec.js#creates the current period and charges it
04 Refund cannot exceed an existing chargeboundaryapinegativetest
Proves
BR-CAP-PFM-LLM-015-04
Preconditions
An existing period has four hundred charged credits.
Steps
Request a five-hundred-credit refund.
Expected
Validation refuses it and preserves the period.
Data
Fixtures representing an existing period has four hundred charged credits.
Bound to
Source
services-platform:modules/llm/tests/integration/services/adjustments/adjust-allowance.integration.spec.js#refuses to give back more credits than the period has settled, leaving the period as it was
05 Request references must match organization and monthboundaryapinegativetest
Proves
BR-CAP-PFM-LLM-015-05
Preconditions
Current, prior-month and foreign requests are available.
Steps
Submit a correction naming each.
Expected
Only the current local request qualifies; other references fail without change.
Data
Fixtures representing current, prior-month and foreign requests are available.
Bound to
Source
services-platform:modules/llm/tests/integration/services/adjustments/adjust-allowance.integration.spec.js#refuses a request of another period, naming the invocation
06 Correction and audit move togetherinvariantapitest
Proves
BR-CAP-PFM-LLM-015-06
Preconditions
An allowance month has sufficient charges.
Steps
Return credits then add a charge.
Expected
Each correction moves totals and has one audit event, widening only for returned credits.
Data
Fixtures representing an allowance month has sufficient charges.
Bound to
Source
services-platform:modules/llm/tests/integration/services/adjustments/adjust-allowance.integration.spec.js#moves the period’s settled credits down by the credits returned
07 Signed correction survives cent flooringruleapiproposed
Proves
BR-CAP-PFM-LLM-015-10 INV-DOM-PFM-LLM-003-12
Preconditions
An existing month has enough credits but fewer charged cents than the cent refund.
Steps
Apply a valid credit refund with a larger signed cent refund.
Expected
The correction retains its signed values while period cents stop at zero.
Data
Fixtures representing an existing month has enough credits but fewer charged cents than the cent refund.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts:applyAllowanceAdjustment
08 Correction input rejects fractional creditsvalidationunitnegativetest
Proves
BR-CAP-PFM-LLM-015-02
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Validate a correction with a fractional credit change.
Expected
The invalid credit amount is refused before any monthly movement.
Data
Suite-owned fixtures, with a fixed clock where dates or grant windows matter.
Bound to
Source
services-platform:modules/llm/tests/unit/services/adjustments/adjustment-request.spec.ts#refuses a fractional credit count, naming the field

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.