---
id: ATS-PFM-LLM-014
scope: CAP-PFM-LLM-014
product_area: platform
module: llm
revision: 2
status: proposed
source_sha:
  services-platform: ad3f6a6582843008ed0f5a17b131878d15829af1
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
scenarios:
  - id: ATS-PFM-LLM-014-01
    title: Temporary grants require management authority
    level: api
    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.
    negative: true
    data_needs: Fixtures representing read-only staff and customer administrators are authenticated.
    bound_to:
      - TST-PFM-LLM-008
    provenance: test
    source: 'services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the grant'
    category: permission
    test_sources:
      - 'services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the grant'
      - 'services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the revocation'
      - >-
        services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the grant before a
        handler runs, whatever the customer’s scope grants
      - 'services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the listing too'
  - id: ATS-PFM-LLM-014-02
    title: Invalid grant shape is rejected
    level: api
    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.
    negative: true
    data_needs: Fixtures representing an organization has a normal allowance.
    bound_to:
      - TST-PFM-LLM-008
      - TST-PFM-LLM-029
    provenance: test
    source: >-
      services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused above the credit limit,
      naming the field
    category: validation
    test_sources:
      - >-
        services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused above the credit limit,
        naming the field
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        no credits at all
      - >-
        services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused for a kind nobody
        declared
      - >-
        services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused for a field nobody
        declared
      - >-
        services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused for an operation nobody
        declared, naming the field
  - id: ATS-PFM-LLM-014-03
    title: Default and invalid windows have distinct results
    level: api
    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.
    negative: true
    data_needs: Fixtures representing an organization has its local time zone configured.
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    source: >-
      services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#starts
      now
    category: boundary
    test_sources:
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#starts
        now
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#ends
        at the first instant of next month in the organization’s own zone
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        a window longer than 92 days
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        a window that ends before it starts
  - id: ATS-PFM-LLM-014-04
    title: Reasons and tickets have bounded text
    level: api
    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.
    negative: true
    data_needs: Fixtures representing a manager can grant capacity.
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    source: >-
      services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
      a blank reason
    category: validation
    test_sources:
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        a blank reason
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        a ticket reference over 200 characters
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#left
        the override rows as they were and wrote no audit row
  - id: ATS-PFM-LLM-014-05
    title: Peak overlap governs the ceiling
    level: api
    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.
    negative: true
    data_needs: Fixtures representing existing capacity is close to the global maximum.
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    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
    category: boundary
    test_sources:
      - >-
        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
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#accepts
        a second grant that starts when the first ends, though together they exceed what one instant may hold
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        a third across both windows that would sit on top of either at its peak
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        a grant that would take the allowance past the ceiling together with the override in force
  - id: ATS-PFM-LLM-014-06
    title: Grant creation retains its widening audit
    level: api
    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.
    negative: false
    data_needs: Fixtures representing an organization is stopped and the manager supplies a ticket.
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    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
    category: invariant
    test_sources:
      - >-
        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
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#writes
        exactly one audit row, a widening grant by the staff member for the tenant
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#records
        the override, ticket and window in the audit row’s after
  - id: ATS-PFM-LLM-014-07
    title: Revocation preserves original authorization
    level: api
    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.
    negative: true
    data_needs: 'Fixtures representing an active grant, ended grant and foreign grant exist.'
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    source: >-
      services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#sets
      who, when and why together, the reason trimmed
    category: transition
    test_sources:
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#sets
        who, when and why together, the reason trimmed
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#leaves
        the grant’s own fields as they were: an override is revoked, never edited
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#stops
        the override applying to the next call
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        to revoke it again as an illegal operation, writing nothing
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        to revoke one that has already ended
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        an override that does not exist, and one that belongs to another organization
  - id: ATS-PFM-LLM-014-08
    title: Capacity notices depend on restoration and explicit request
    level: api
    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.
    negative: false
    data_needs: Fixtures representing stopped and still-capable organizations have administrators.
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    source: >-
      services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#tells
      the organization’s administrators, saying until when
    category: rule
    test_sources:
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#tells
        the organization’s administrators, saying until when
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#sends
        nothing when the organization still had room, even if asked
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#sends
        nothing when not asked, even though it restores the organization
  - id: ATS-PFM-LLM-014-09
    title: Preview agrees with grant validation and projection
    level: api
    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.
    negative: false
    data_needs: Fixtures representing a normal grant and an invalid grant are prepared.
    bound_to:
      - TST-PFM-LLM-029
    provenance: test
    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
    category: rule
    test_sources:
      - >-
        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
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#writes
        nothing
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#is
        the position the grant then reports
      - >-
        services-platform:modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js#refuses
        what a grant would refuse, so a preview is no way around the rules
  - id: ATS-PFM-LLM-014-10
    title: Restored capacity can later be revoked
    level: api
    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.
    negative: false
    data_needs: Fixtures representing a stopped organization has an administrator.
    bound_to: []
    provenance: proposed
    source: FND-PFM-LLM-027
    category: interaction
    test_sources: []
  - id: ATS-PFM-LLM-014-11
    title: Grant duration accepts its last permitted day
    category: validation
    level: api
    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.
    negative: true
    data_needs: 'Suite-owned fixtures, with a fixed clock where dates or grant windows matter.'
    bound_to:
      - TST-PFM-LLM-010
    provenance: test
    source: >-
      services-platform:modules/llm/tests/integration/db/llm-allowance-overrides.table.integration.spec.js#accepts
      a window of exactly 92 days
    test_sources:
      - >-
        services-platform:modules/llm/tests/integration/db/llm-allowance-overrides.table.integration.spec.js#accepts
        a window of exactly 92 days
  - id: ATS-PFM-LLM-014-12
    title: Grant conversion preserves local month capacity
    category: transition
    level: api
    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.
    negative: false
    data_needs: 'Suite-owned fixtures, with a fixed clock where dates or grant windows matter.'
    bound_to:
      - TST-PFM-LLM-015
    provenance: test
    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
    test_sources:
      - >-
        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
  - id: ATS-PFM-LLM-014-13
    title: Competing revocations record one ending
    category: concurrency
    level: api
    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.'
    negative: false
    data_needs: 'Suite-owned fixtures, with a fixed clock where dates or grant windows matter.'
    bound_to:
      - TST-PFM-LLM-038
    provenance: test
    source: >-
      services-platform:modules/llm/tests/integration/services/persistence/overrides.integration.spec.js#lets
      exactly one of three racing revocations write
    test_sources:
      - >-
        services-platform:modules/llm/tests/integration/services/persistence/overrides.integration.spec.js#lets
        exactly one of three racing revocations write
  - id: ATS-PFM-LLM-014-14
    title: Capacity excludes its ending instant
    category: boundary
    level: api
    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.
    negative: false
    data_needs: 'Suite-owned fixtures, with a fixed clock where dates or grant windows matter.'
    bound_to:
      - TST-PFM-LLM-039
    provenance: test
    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
    test_sources:
      - >-
        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
  - id: ATS-PFM-LLM-014-15
    title: Grant kinds have distinct required values
    category: validation
    level: unit
    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.
    negative: true
    data_needs: 'Suite-owned fixtures, with a fixed clock where dates or grant windows matter.'
    bound_to:
      - TST-PFM-LLM-071
    provenance: test
    source: >-
      services-platform:modules/llm/tests/unit/services/allowance-overrides.spec.ts#refuses an
      additional_credits override with no credits
    test_sources:
      - >-
        services-platform:modules/llm/tests/unit/services/allowance-overrides.spec.ts#refuses an
        additional_credits override with no credits
evidence:
  - >-
    services-platform at ad3f6a6582843008ed0f5a17b131878d15829af1: bound or cited
    modules/llm/tests/e2e/llm-overrides.e2e.spec.js;
    modules/llm/tests/integration/services/overrides/allowance-overrides.integration.spec.js.
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
coverage_notes:
  transition: >-
    Existing transition scenarios are retained; the model transition register below records the remaining
    exhaustive mapping obligation.
  interaction: >-
    The related interaction register cites a concrete experiment for every dependency and related capability,
    including cross-capability workflow seams.
  invariant: >-
    The domain-invariant register maps each relevant invariant to a scenario or to the capability coverage
    finding; an example does not establish every invariant.
  rule: >-
    All must-prove rules have scenario references, but the coverage finding retains untested clauses and
    combined outcomes; scenario presence alone is not exhaustive rule proof.
related_interactions:
  - with: CAP-PFM-LLM-007
    scenarios:
      - ATS-PFM-LLM-007-17
    source: 'services-platform:modules/llm/services/persistence/allowance-periods.ts'
  - with: CAP-PFM-LLM-011
    scenarios:
      - ATS-PFM-LLM-011-11
    source: >-
      services-platform:modules/llm/tests/e2e/llm-usage.e2e.spec.js#refuses a customer’s administrator a
      tenant’s usage even in their own tenant
  - with: CAP-PFM-LLM-012
    scenarios:
      - ATS-PFM-LLM-012-08
    source: >-
      services-platform:modules/llm/tests/e2e/llm-adjustments-and-organization.e2e.spec.js#is refused 403 for
      a customer’s administrator, because the route is system
  - with: CAP-PFM-LLM-013
    scenarios:
      - ATS-PFM-LLM-013-10
    source: >-
      services-platform:modules/llm/tests/e2e/llm-limits.e2e.spec.js#is refused the write before a handler
      runs, whatever the customer’s scope grants
state_models:
  - STATE-PFM-LLM-007
coverage_obligations:
  must_prove:
    - rule: BR-CAP-PFM-LLM-014-01
      scenarios:
        - ATS-PFM-LLM-014-01
      source: >-
        services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the grant before a
        handler runs, whatever the customer’s scope grants
      coverage: specified
    - rule: BR-CAP-PFM-LLM-014-02
      scenarios:
        - ATS-PFM-LLM-014-02
        - ATS-PFM-LLM-014-15
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: specified
    - rule: BR-CAP-PFM-LLM-014-03
      scenarios:
        - ATS-PFM-LLM-014-03
        - ATS-PFM-LLM-014-11
        - ATS-PFM-LLM-014-12
        - ATS-PFM-LLM-014-14
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: partial
      gap: FND-PFM-LLM-073
    - rule: BR-CAP-PFM-LLM-014-04
      scenarios:
        - ATS-PFM-LLM-014-04
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: specified
    - rule: BR-CAP-PFM-LLM-014-05
      scenarios:
        - ATS-PFM-LLM-014-05
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: partial
      gap: FND-PFM-LLM-073
    - rule: BR-CAP-PFM-LLM-014-06
      scenarios:
        - ATS-PFM-LLM-014-06
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: partial
      gap: FND-PFM-LLM-073
    - rule: BR-CAP-PFM-LLM-014-07
      scenarios:
        - ATS-PFM-LLM-014-07
        - ATS-PFM-LLM-014-13
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: partial
      gap: FND-PFM-LLM-073
    - rule: BR-CAP-PFM-LLM-014-08
      scenarios:
        - ATS-PFM-LLM-014-08
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: partial
      gap: FND-PFM-LLM-073
    - rule: BR-CAP-PFM-LLM-014-09
      scenarios:
        - ATS-PFM-LLM-014-09
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
      coverage: partial
      gap: FND-PFM-LLM-073
  state_transitions:
    - model: STATE-PFM-LLM-007
      transition: 1
      from: absent
      to: active
      trigger: A manager creates capacity starting immediately.
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts:grantOverride'
    - model: STATE-PFM-LLM-007
      transition: 2
      from: absent
      to: scheduled
      trigger: A manager creates capacity with a future start.
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts:grantOverride'
    - model: STATE-PFM-LLM-007
      transition: 3
      from: scheduled
      to: active
      trigger: Time reaches the grant’s start.
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/persistence/allowance-periods.ts:authorizeCredits'
    - model: STATE-PFM-LLM-007
      transition: 4
      from: active
      to: expired
      trigger: Time reaches the grant’s end.
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/persistence/allowance-periods.ts:authorizeCredits'
    - model: STATE-PFM-LLM-007
      transition: 5
      from: active
      to: revoked
      trigger: A manager revokes currently active capacity.
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts:revokeOverride'
    - model: STATE-PFM-LLM-007
      transition: 6
      from: scheduled
      to: revoked
      trigger: A manager revokes scheduled capacity.
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/overrides/allowance-overrides.ts:revokeOverride'
  domain_invariants:
    - invariant: INV-DOM-PFM-LLM-003-05
      scenarios: []
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: 'services-platform:modules/llm/services/persistence/allowance-periods.ts:authorizeCredits'
    - invariant: INV-DOM-PFM-LLM-003-06
      scenarios: []
      gap: FND-PFM-LLM-073
      provenance: proposed
      source: >-
        services-platform:modules/llm/db/llm-allowance-overrides.table.ts:llm_allowance_overrides_operation_key_check
    - invariant: INV-DOM-PFM-LLM-003-07
      scenarios:
        - ATS-PFM-LLM-014-05
      provenance: documented
      source: 'services-platform:modules/llm/services/persistence/overrides.ts:lockTenantOverrides'
    - invariant: INV-DOM-PFM-LLM-003-08
      scenarios:
        - ATS-PFM-LLM-014-07
      provenance: documented
      source: 'services-platform:modules/llm/services/persistence/overrides.ts:revokeOverrideRow'
coverage_limits:
  finding: FND-PFM-LLM-073
  statement: >-
    Simultaneous overlap grants, scheduled revocation, notice failure and duplicate creates need complete
    lifecycle and failure verification. The console has no working create or revoke flow.
  provenance: proposed
  source:
    - >-
      services-platform:modules/llm/tests/e2e/llm-overrides.e2e.spec.js#is refused the grant before a handler
      runs, whatever the customer’s scope grants
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/overrides/allowance-overrides.ts'
    - 'services-platform:modules/llm/services/persistence/allowance-periods.ts:authorizeCredits'
    - >-
      services-platform:modules/llm/db/llm-allowance-overrides.table.ts:llm_allowance_overrides_operation_key_check
  invariants_without_scenarios:
    - INV-DOM-PFM-LLM-003-05
    - INV-DOM-PFM-LLM-003-06
---

# Provide temporary AI capacity and revoke it: Capability Test Specification

## Coverage

| Rule | Scenario |
|---|---|
| `BR-CAP-PFM-LLM-014-01` | `ATS-PFM-LLM-014-01` |
| `BR-CAP-PFM-LLM-014-02` | `ATS-PFM-LLM-014-02` |
| `BR-CAP-PFM-LLM-014-03` | `ATS-PFM-LLM-014-03` |
| `BR-CAP-PFM-LLM-014-04` | `ATS-PFM-LLM-014-04` |
| `BR-CAP-PFM-LLM-014-05` | `ATS-PFM-LLM-014-05` |
| `BR-CAP-PFM-LLM-014-06` | `ATS-PFM-LLM-014-06` |
| `BR-CAP-PFM-LLM-014-07` | `ATS-PFM-LLM-014-07` |
| `BR-CAP-PFM-LLM-014-08` | `ATS-PFM-LLM-014-08` |
| `BR-CAP-PFM-LLM-014-09` | `ATS-PFM-LLM-014-09` |

## Interactions With Related Capabilities

The interaction register links concrete experiments with admit ai work against the organization’s monthly allowance; inspect an organization’s ai account and request history; explain an ai refusal or unsuccessful conversation; set an organization’s ai access and recurring limits. Each experiment checks the outcome at the shared boundary; an unbound experiment remains proposed.

Simultaneous overlap grants, scheduled revocation, notice failure and duplicate creates need complete lifecycle and failure verification. The console has no working create or revoke flow.
