Skip to content

ATS-PFM-LLM-008undefined

Markdown

ATS-PFM-LLM-008

undefined

Markdown
  • DocumentProposed

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

Read atservices-platform ad3f6a65

Coverage

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

Test Scenarios

14 scenarios proving CAP-PFM-LLM-008; 9 bound to an existing test.

01 Threshold records remain unique under racesconcurrencyapitest
Proves
BR-CAP-PFM-LLM-008-01 INV-DOM-PFM-LLM-003-11
Preconditions
Settlements and recording calls approach both notice thresholds.
Steps
Cross and concurrently record each threshold.
Expected
Exactly one record and one successful recording caller exist per threshold.
Data
Fixtures representing settlements and recording calls approach both notice thresholds.
Bound to
Source
services-platform:modules/llm/tests/integration/services/persistence/allowance-periods.integration.spec.js#answers false the second time rather than notifying again
02 Only charged usage crosses notice thresholdsruleapiproposed
Proves
BR-CAP-PFM-LLM-008-02
Preconditions
Held usage reaches 80% but charged usage remains below it, with additional capacity active.
Steps
Reserve then settle work.
Expected
Reservation creates no crossing; settlement evaluates charged usage against the allowance including active capacity.
Data
Fixtures representing held usage reaches 80% but charged usage remains below it, with additional capacity active.
Source
services-platform:modules/llm/services/metering/llm-credit-ledger.ts:evaluateCrossings
03 Only active local administrators receive noticespermissionapitest
Proves
BR-CAP-PFM-LLM-008-03
Preconditions
Active administrators, a suspended holder, other staff and foreign administrators exist.
Steps
Trigger the warning.
Expected
Each eligible local administrator receives one message and everyone else receives none.
Data
Fixtures representing active administrators, a suspended holder, other staff and foreign administrators exist.
Bound to
Source
services-platform:modules/llm/tests/integration/services/notices/threshold-notice.integration.spec.js#resolves the active holders of the Administrator role, ordered by user id
04 Warning and pause messages use customer figuresruleapitest
Proves
BR-CAP-PFM-LLM-008-04
Preconditions
An organization crosses both notice thresholds.
Steps
Inspect the generated messages.
Expected
They state crossing credits and reset information and the pause notice shares the customer explanation.
Data
Fixtures representing an organization crosses both notice thresholds.
Bound to
Source
services-platform:modules/llm/tests/integration/services/notices/threshold-notice.integration.spec.js#writes the 80% copy with the figures of the crossing
05 Competing senders claim one deliveryconcurrencyapitest
Proves
BR-CAP-PFM-LLM-008-05
Preconditions
Two senders attempt the same crossing.
Steps
Run both concurrently.
Expected
One sender claims it and each administrator receives one message.
Data
Fixtures representing two senders attempt the same crossing.
Bound to
Source
services-platform:modules/llm/tests/integration/services/notices/threshold-notice.integration.spec.js#lets exactly one of them claim and send
06 Enclosing transactions defer notice deliverytransitionapitest
Proves
BR-CAP-PFM-LLM-008-06
Preconditions
A settlement crosses a threshold inside a larger transaction.
Steps
Commit that transaction and run notice retry.
Expected
Nothing sends inside the transaction; retry later delivers the owed message.
Data
Fixtures representing a settlement crosses a threshold inside a larger transaction.
Bound to
Source
services-platform:modules/llm/tests/integration/services/notices/threshold-notice.integration.spec.js#sends nothing from inside a transaction, leaving the crossing owed
07 Persistent delivery failure stops after three attemptsfailureapinegativetest
Proves
BR-CAP-PFM-LLM-008-07
Preconditions
The email sender repeatedly fails and claims expire between runs.
Steps
Send and retry across expired claims, including a fourth eligible run.
Expected
The crossing remains unstamped after three failures and no fourth delivery is attempted.
Data
Fixtures representing the email sender repeatedly fails and claims expire between runs.
Bound to
Source
services-platform:modules/llm/tests/integration/services/notices/threshold-notice.integration.spec.js#answers failed when nobody could be reached, and leaves the crossing unstamped
08 No-recipient warnings do not retry foreveredgeapitest
Proves
BR-CAP-PFM-LLM-008-08
Preconditions
A crossing belongs to an organization with no administrator.
Steps
Attempt delivery.
Expected
The crossing records zero recipients, logs the absence and completes without a sent message.
Data
Fixtures representing a crossing belongs to an organization with no administrator.
Bound to
Source
services-platform:modules/llm/tests/integration/services/notices/threshold-notice.integration.spec.js#answers that there was nobody to tell and sends nothing
09 A retry can repeat delivery after an interrupted stampfailureapinegativeproposed
Proves
BR-CAP-PFM-LLM-008-12
Preconditions
A crossing has administrator recipients and an unexpired attempt budget.
Steps
Interrupt after email send but before completion persistence, expire the claim and retry.
Expected
The same crossing can be delivered again; the product should choose its delivery guarantee.
Data
Fault-injection fixtures for the described failure boundary.
Source
services-platform:modules/llm/services/notices/threshold-notice.ts:sendThresholdNotice
10 Recovery retries committed owed noticesinteractionapitest
Proves
BR-CAP-PFM-LLM-008-07 BR-CAP-PFM-LLM-009-01
Preconditions
A threshold crossing was deferred by an enclosing transaction that has now committed.
Steps
Run owed-notice recovery after commit and read crossing history.
Expected
The pending crossing is claimed and delivered under its attempt budget without changing the original charged figures.
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/notices/threshold-notice.integration.spec.js#has the hourly run send the notice the transaction deferred
11 Inspection shows notice delivery historyinteractionapinegativeproposed
Proves
BR-CAP-PFM-LLM-008-07 BR-CAP-PFM-LLM-011-10
Preconditions
One crossing has completed delivery and another remains unstamped after failed attempts.
Steps
Read crossing history from the organization account.
Expected
Each crossing retains its threshold, completion state, recipient count and attempts without turning failure into delivery.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/notices/threshold-notice.ts,services-platform:modules/llm/services/usage-reports/tenant-usage.ts
12 Corrections do not create threshold emailinteractionapiproposed
Proves
BR-CAP-PFM-LLM-008-10 BR-CAP-PFM-LLM-015-06
Preconditions
Charged usage is below warning and a positive correction moves it above a threshold.
Steps
Apply the correction and inspect crossings and sent messages.
Expected
The correction changes usage and audit history but creates no threshold crossing or notice on this path.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:docs/milestones/plans/PLAT-M1-plan.md#4. Assumptions,services-platform:modules/llm/services/adjustments/adjust-allowance.ts
13 Pause notice shares customer guidanceinteractionapiproposed
Proves
BR-CAP-PFM-LLM-008-04 BR-CAP-PFM-LLM-018-07
Preconditions
A settlement reaches the pause threshold and the local reset date is known.
Steps
Generate its notice and the customer pause sentence for the same reset.
Expected
Both give the same renewal and support guidance, allowing the organization-name substitution.
Data
An isolated workspace with the records, clock instants and caller authority stated in the preconditions.
Source
services-platform:modules/llm/services/notices/threshold-notice.ts,services-platform:modules/llm/tests/unit/services/usage/usage-sentences.spec.ts#quote the same at-limit words, the notice naming the organization where the console says "your"
14 Notice copy retains the crossing figuresruleunittest
Proves
BR-CAP-PFM-LLM-008-04
Preconditions
The suite owns isolated fixtures representing the valid control and the contrasting case described by its steps.
Steps
Generate warning copy from a retained crossing and local reset date.
Expected
The message retains used, allowed and remaining credits and renewal guidance.
Data
Suite-owned fixtures, with a fixed clock where dates or grant windows matter.
Bound to
Source
services-platform:modules/llm/tests/unit/services/threshold-notice.spec.ts#gives credits used, the allowance and what remains, with thousands separators

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.