Skip to content

ATS-PFM-LLM-014Provide temporary AI capacity and revoke it: Capability Test Specification

Markdown

ATS-PFM-LLM-014

Provide temporary AI capacity and revoke it: Capability Test Specification

Markdown
  • DocumentProposed

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

Read atservices-platform ad3f6a65react-console baf6dae3

Coverage

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

Test Scenarios

15 scenarios proving CAP-PFM-LLM-014; 14 bound to an existing test.

01 Temporary grants require management authoritypermissionapinegativetest
Proves
BR-CAP-PFM-LLM-014-01
Preconditions
Read-only staff and customer administrators are authenticated.
Steps
Attempt grant, preview and revocation through HQ.
Expected
All attempts are denied without writes.
Data
Fixtures representing read-only staff and customer administrators are authenticated.
Bound to
Source
services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the grant
02 Invalid grant shape is rejectedvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-014-02
Preconditions
An organization has a normal allowance.
Steps
Submit zero or excessive credits, unknown kind, undeclared field and unknown operation examples.
Expected
Every invalid input is refused with its offending field identified.
Data
Fixtures representing an organization has a normal allowance.
Bound to
Source
services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused above the credit limit, naming the field
03 Default and invalid windows have distinct resultsboundaryapinegativetest
Proves
BR-CAP-PFM-LLM-014-03
Preconditions
An organization has its local time zone configured.
Steps
Grant with defaults, then with a window over ninety-two days and an end before start.
Expected
Defaults use now and the next local month boundary; invalid windows are rejected.
Data
Fixtures representing an organization has its local time zone configured.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#starts now
04 Reasons and tickets have bounded textvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-014-04
Preconditions
A manager can grant capacity.
Steps
Submit a blank reason and an oversized ticket reference.
Expected
Both requests fail without grant or audit insertion.
Data
Fixtures representing a manager can grant capacity.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses a blank reason
05 Peak overlap governs the ceilingboundaryapinegativetest
Proves
BR-CAP-PFM-LLM-014-05 INV-DOM-PFM-LLM-003-07
Preconditions
Existing capacity is close to the global maximum.
Steps
Add an exact-ceiling grant, a following grant and an overlapping grant.
Expected
The first two fit their instants while the overlapping excess is refused.
Data
Fixtures representing existing capacity is close to the global maximum.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#accepts a grant that lands exactly on the ceiling, which is the premise the refusal above is measured against
06 Grant creation retains its widening auditinvariantapitest
Proves
BR-CAP-PFM-LLM-014-06
Preconditions
An organization is stopped and the manager supplies a ticket.
Steps
Grant temporary capacity.
Expected
The stored grant matches the input and has one widening event with ticket and window.
Data
Fixtures representing an organization is stopped and the manager supplies a ticket.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#stores the override as the staff member stated it, trimmed, and granted by them
07 Revocation preserves original authorizationtransitionapinegativetest
Proves
BR-CAP-PFM-LLM-014-07 INV-DOM-PFM-LLM-003-08
Preconditions
An active grant, ended grant and foreign grant exist.
Steps
Revoke the active grant and repeat, then attempt ended and foreign revocations.
Expected
The active grant records revoker and reason without editing original fields; repeated and ended actions fail and foreign grants are not found.
Data
Fixtures representing an active grant, ended grant and foreign grant exist.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#sets who, when and why together, the reason trimmed
08 Capacity notices depend on restoration and explicit requestruleapitest
Proves
BR-CAP-PFM-LLM-014-08
Preconditions
Stopped and still-capable organizations have administrators.
Steps
Grant with notice requested to both, then restore a stopped one without requesting notice.
Expected
Only requested restoration sends administrator mail with its end date.
Data
Fixtures representing stopped and still-capable organizations have administrators.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#tells the organization’s administrators, saying until when
09 Preview agrees with grant validation and projectionruleapitest
Proves
BR-CAP-PFM-LLM-014-09
Preconditions
A normal grant and an invalid grant are prepared.
Steps
Preview then apply the normal grant and preview the invalid one.
Expected
The normal projection matches the resulting position without preview writes, and invalid preview is refused.
Data
Fixtures representing a normal grant and an invalid grant are prepared.
Bound to
Source
services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#projects the allowance and what would remain with the override in force
10 Restored capacity can later be revokedinteractionapiproposed
Proves
AS-JNY-PFM-LLM-003-01 AS-JNY-PFM-LLM-003-02 AS-JNY-PFM-LLM-003-03
Preconditions
A stopped organization has an administrator.
Steps
Follow preview, grant, admission, audit and revocation through the restoration journey.
Expected
The earlier estimate admits with the grant and returns to base-only judgment after revocation, with reasons retained for both actions.
Data
Fixtures representing a stopped organization has an administrator.
Source
FND-PFM-LLM-027
11 Grant duration accepts its last permitted dayvalidationapinegativetest
Proves
BR-CAP-PFM-LLM-014-03
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Insert ordered grant windows at ninety-two days and beyond it.
Expected
The exact bound is accepted and the longer window is refused.
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-allowance-overrides.table.integration.spec.js#accepts a window of exactly 92 days
12 Grant conversion preserves local month capacitytransitionapitest
Proves
BR-CAP-PFM-LLM-014-03
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Apply the existing grant conversion against monthly grants in different local calendars.
Expected
Each window preserves the earlier monthly allowance at its local boundaries.
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-overrides-migration.integration.spec.js#leaves this month’s allowance identical: the overrides in force sum to the period’s cached total, from its first instant to its last
13 Competing revocations record one endingconcurrencyapitest
Proves
BR-CAP-PFM-LLM-014-07
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Race three revocations of one eligible grant.
Expected
One revocation writes; the others do not replace its actor, time or reason.
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/overrides.integration.spec.js#lets exactly one of three racing revocations write
14 Capacity excludes its ending instantboundaryapitest
Proves
BR-CAP-PFM-LLM-014-03
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Read active capacity just inside the grant window and exactly at its end.
Expected
The grant is excluded at the end instant.
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/overrides.queries.integration.spec.js#does not count an override as in force at the very instant it ends
15 Grant kinds have distinct required valuesvalidationunitnegativetest
Proves
BR-CAP-PFM-LLM-014-02
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Validate extra-credit and operation-exemption shapes, including mismatched fields.
Expected
Only the shape belonging to each declared kind is accepted.
Data
Suite-owned fixtures, with a fixed clock where dates or grant windows matter.
Bound to
Source
services-platform:modules/llm/tests/unit/services/allowance-overrides.spec.ts#refuses an additional_credits override with no credits

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.