Skip to content

ATS-PFM-LLM-007undefined

Markdown

ATS-PFM-LLM-007

undefined

Markdown
  • DocumentProposed

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

Read atservices-platform ad3f6a65

Coverage

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

Test Scenarios

21 scenarios proving CAP-PFM-LLM-007; 14 bound to an existing test.

01 Concurrent first admission creates one periodconcurrencyapitest
Proves
BR-CAP-PFM-LLM-007-01 INV-DOM-PFM-LLM-003-01
Preconditions
The organization has neither custom limits nor a current period.
Steps
Race its first allowance-period initialization.
Expected
One default 100,000-credit period exists with no initial charge or hold.
Data
Authorized and unauthorized fixtures for the scenario, with controlled request and usage records.
Bound to
Source
services-platform:modules/llm/tests/integration/services/persistence/allowance-periods.integration.spec.js#answers a period at the default monthly allowance
02 Concurrent requests share capacity atomicallyconcurrencyapitest
Proves
BR-CAP-PFM-LLM-007-02 INV-DOM-PFM-LLM-003-02
Preconditions
Base and active grant capacity cover fifteen reservations.
Steps
Race twenty admission requests.
Expected
Fifteen obtain holds and five receive allowance refusals; held credits equal admitted reservations.
Data
Fixtures representing base and active grant capacity cover fifteen reservations.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#admits exactly the fifteen the base and the override cover together
03 Exhausted allowance prevents another provider callfailureapinegativetest
Proves
BR-CAP-PFM-LLM-007-03
Preconditions
An earlier request consumes available allowance.
Steps
Submit the next model request.
Expected
The rate-limit refusal reports needed and remaining capacity without calling the model or taking a hold.
Data
Fixtures representing an earlier request consumes available allowance.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/run-operation.integration.spec.js#refuses it as a rate limit, which is the status a caller can act on
04 Concurrency slots return on settlementconcurrencyapinegativetest
Proves
BR-CAP-PFM-LLM-007-04 BR-CAP-PFM-LLM-007-05
Preconditions
The cap is eight and enough allowance covers initial requests.
Steps
Race twenty requests, settle one and repeat admission with both restrictions exceeded.
Expected
Eight run, excess calls receive concurrency refusals, settlement releases a slot, and allowance takes priority when both checks fail.
Data
Fixtures representing the cap is eight and enough allowance covers initial requests.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#admits exactly eight
05 Grant windows and revocation apply at request timeboundaryapitest
Proves
BR-CAP-PFM-LLM-007-06 INV-DOM-PFM-LLM-003-05
Preconditions
Grants are future, ending or concurrently revoked.
Steps
Submit admission requests around each boundary.
Expected
Future capacity is absent, ending capacity stops at its end instant and revoked capacity no longer counts.
Data
Fixtures representing grants are future, ending or concurrently revoked.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#counts from its first instant
06 Admitted work can exceed allowance on settlementedgeapitest
Proves
BR-CAP-PFM-LLM-007-07
Preconditions
A request fits its hold but its charge crosses the remaining allowance.
Steps
Complete that request and submit another.
Expected
The full charge remains, usage exceeds 100% and later admission fails.
Data
Fixtures representing a request fits its hold but its charge crosses the remaining allowance.
Bound to
Source
services-platform:modules/llm/tests/e2e/allowance-warning.e2e.spec.js#tells both again, once, when the third call passes 100 %
07 Lower limits preserve running reservationsinvariantapitest
Proves
BR-CAP-PFM-LLM-007-08 INV-DOM-PFM-LLM-003-03
Preconditions
Requests hold credits when the allowance is reduced below committed usage.
Steps
Settle existing work and attempt new admission.
Expected
The requests finish normally, reservations fall no lower than zero and later work is refused while over allowance.
Data
Fixtures representing requests hold credits when the allowance is reduced below committed usage.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#keeps what was reserved: a lowered allowance never cuts a call off
08 Available balance accounts for charge and holdsruleapiproposed
Proves
BR-CAP-PFM-LLM-007-09
Preconditions
A period contains settled and running work and any corrections.
Steps
Read its accounting position.
Expected
Charged usage includes settlements and corrections, and available capacity subtracts both charges and holds.
Data
Fixtures representing a period contains settled and running work and any corrections.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts
09 Refusal retains the original decision figuresinvariantapitest
Proves
BR-CAP-PFM-LLM-007-10 INV-DOM-PFM-LLM-001-05
Preconditions
An allowance refusal occurs while a grant is active.
Steps
Inspect the refusal snapshot and period.
Expected
The stored figures and grant identity reflect that decision, with limits and ceiling present and no refusal charge.
Data
Fixtures representing an allowance refusal occurs while a grant is active.
Bound to
Source
services-platform:modules/llm/tests/integration/lifecycle/executions.integration.spec.js#keeps a snapshot whose numbers are the period row’s at that instant
10 Customer pause journey reaches its reported resultinteractionapiproposed
Proves
AS-JNY-PFM-LLM-001-01 AS-JNY-PFM-LLM-001-02 AS-JNY-PFM-LLM-001-03
Preconditions
A small-allowance organization has administrators and other staff.
Steps
Exercise repeated AI use, threshold delivery, refusal and HQ inspection.
Expected
Only administrators receive each threshold notice, refused work costs nothing and the customer explanation agrees with the HQ refusal record.
Data
Fixtures representing a small-allowance organization has administrators and other staff.
Source
FND-PFM-LLM-027
11 Charged usage drives notices after admissioninteractionapiproposed
Proves
BR-CAP-PFM-LLM-007-09 BR-CAP-PFM-LLM-008-01
Preconditions
Holds reach warning range but charged usage remains below it and eligible administrators exist.
Steps
Read notice history before settlement, then settle across each threshold and retry delivery.
Expected
Holds alone create no crossing; charged crossings retain their figures and notice completion tracks eligible recipients.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts,services-platform:modules/llm/services/persistence/allowance-periods.ts
12 Recovery releases an eligible recorded holdinteractionapitest
Proves
BR-CAP-PFM-LLM-007-09 BR-CAP-PFM-LLM-009-01
Preconditions
A stale request retains a recorded reservation while a recent request remains in flight.
Steps
Run request recovery twice and inspect monthly accounting.
Expected
The stale request receives estimated credits without cents and releases its recorded hold once; recent work remains unchanged.
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-settlement-sweep.integration.spec.js#releases the hold, which is the whole point of the sweep,services-platform:modules/llm/tests/integration/services/reconciliation/llm-settlement-sweep.integration.spec.js#charges the period once,services-platform:modules/llm/tests/integration/services/reconciliation/llm-settlement-sweep.integration.spec.js#leaves the hold in place, so a live call keeps the credits it reserved
13 Live utilisation counts running commitmentsinteractionapiproposed
Proves
BR-CAP-PFM-LLM-007-09 BR-CAP-PFM-LLM-010-03
Preconditions
The organization has settled charges and enough held credits to reach warning range.
Steps
Read live HQ status, release the held work and read again.
Expected
The live status and percentage fall with commitments even when no charged-usage crossing exists.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts,services-platform:modules/llm/services/usage-reports/usage-status.ts
14 Inspection separates charged and held usageinteractionapiproposed
Proves
BR-CAP-PFM-LLM-007-09 BR-CAP-PFM-LLM-011-03
Preconditions
An organization has both a settled request and a running reservation.
Steps
Read its overview before and after settlement.
Expected
The overview preserves the live charged and held position while request history identifies the corresponding outcome.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts,services-platform:modules/llm/services/usage-reports/tenant-usage.ts
15 Explanation never reserves the retried estimateinteractionapitest
Proves
BR-CAP-PFM-LLM-007-02 BR-CAP-PFM-LLM-012-04
Preconditions
A stored allowance refusal becomes affordable after capacity is added.
Steps
Explain the original refusal twice and compare the period before and after.
Expected
Original decision figures remain stable and the current check changes to affordable without taking a hold.
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/explain/explain-invocation.integration.spec.js#says the same request would be admitted now, after an override granted since is in force,services-platform:modules/llm/tests/integration/services/explain/explain-invocation.integration.spec.js#leaves blocks 1 and 2 as the snapshot had them, whatever has changed since,services-platform:modules/llm/tests/integration/services/explain/explain-invocation.integration.spec.js#holds no credits by explaining
16 Lowering limits preserves admitted workinteractionapinegativetest
Proves
BR-CAP-PFM-LLM-007-08 BR-CAP-PFM-LLM-013-06
Preconditions
Requests hold capacity when a manager lowers recurring allowance below commitments.
Steps
Save the lower limit, settle the admitted requests and request new admission.
Expected
Running holds survive the save and settle normally; new work is refused while commitments exceed capacity.
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/lifecycle/llm-ledger-concurrency.integration.spec.js#keeps what was reserved: a lowered allowance never cuts a call off,services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#refuses the next call while the period is over its lowered allowance,services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#takes held credits down to zero as each reservation settles, never below
17 Grant boundaries change the next admissioninteractionapitest
Proves
BR-CAP-PFM-LLM-007-06 BR-CAP-PFM-LLM-014-07
Preconditions
Base capacity cannot afford an estimate and a scheduled grant supplies the difference.
Steps
Attempt admission just before start, at start and at end; repeat after revocation.
Expected
Only the unrevoked half-open window contributes capacity; the next request after expiry or revocation uses base alone.
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/lifecycle/llm-ledger-concurrency.integration.spec.js#counts from its first instant,services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#refuses the same call from the instant the window ends,services-platform:modules/llm/tests/integration/lifecycle/llm-ledger-concurrency.integration.spec.js#counts the override no longer once it is revoked: whatever the race admitted, the next call fits only inside the base
18 Correction changes capacity without rewriting requestsinteractionapiproposed
Proves
BR-CAP-PFM-LLM-007-09 BR-CAP-PFM-LLM-015-06
Preconditions
A current period has a settled charge sufficient for a refund.
Steps
Apply a valid refund, read admission position and re-read the original request.
Expected
Remaining credits rise with the signed correction while the request’s original settlement stays unchanged.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts,services-platform:modules/llm/services/adjustments/adjust-allowance.ts
19 Customer position includes running holdsinteractionapiproposed
Proves
BR-CAP-PFM-LLM-007-09 BR-CAP-PFM-LLM-017-02
Preconditions
A current month has charged credits and a running reservation.
Steps
Read the customer summary, release the reservation and read again.
Expected
Used and remaining figures follow committed credits and remain local without exposing internal prices.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/persistence/allowance-periods.ts,services-platform:modules/llm/services/usage/organization-usage.ts
20 Read-only affordability includes its exact boundaryboundaryapitest
Proves
BR-CAP-PFM-LLM-007-02
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Check exact remaining credits and one more credit through the read-only admission query.
Expected
Exact capacity is affordable, one more is not, and the query holds no credits.
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/allowance-periods.queries.integration.spec.js#says yes for credits that fill the allowance exactly, as the ledger’s own comparison does
21 Default allowance uses the declared monthly amountruleunittest
Proves
BR-CAP-PFM-LLM-007-01
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Read default monthly allowance and default concurrency configuration.
Expected
The monthly amount is one hundred thousand credits and the default running cap is eight.
Data
Suite-owned fixtures, with a fixed clock where dates or grant windows matter.
Bound to
Source
services-platform:modules/llm/tests/unit/llm-settings.spec.ts#gives a tenant 100,000 credits a month

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.