Skip to content

ATS-PFM-OPS-012Derive application licences from commercial contracts: Capability Test Specification

Markdown

ATS-PFM-OPS-012

Derive application licences from commercial contracts: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleOperational RecordsRevision2

Read atservices-platform ad3f6a65macroservice-libraries 54536a44react-console baf6dae3

Coverage

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

Test Scenarios

19 scenarios proving CAP-PFM-OPS-012; 13 bound to an existing test.

01 Resolve only recognized active statusesvalidationunitnegativetest
Proves
BR-CAP-PFM-OPS-012-01 INV-DOM-PFM-OPS-003-07
Preconditions
Active, cancelled and unknown-status contracts exist.
Steps
Derive their application windows.
Expected
Only eligible terms grant access and the unfamiliar status is flagged.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/unit/licences/resolve-licence-windows.spec.ts#resolves nothing for a status it has never heard of, and flags it so the vocabulary can be confirmed
02 Reject unreadable termsvalidationunitnegativetest
Proves
BR-CAP-PFM-OPS-012-02
Preconditions
Contracts have missing start, invalid end or unqualified open-ended terms.
Steps
Resolve their windows.
Expected
Invalid terms grant nothing and qualifying automatic renewal remains open-ended.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/unit/licences/resolve-licence-windows.spec.ts#licenses nothing and is flagged when it has no end date and does not renew automatically
03 Inherit dates independentlyruleunittest
Proves
BR-CAP-PFM-OPS-012-03
Preconditions
A contract line supplies only an end date.
Steps
Resolve its application window.
Expected
The line’s end and inherited contract start are used.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/unit/licences/resolve-licence-windows.spec.ts#takes each date independently, so a line may override one and inherit the other
04 Expand recognized commercial productsruleunittest
Proves
BR-CAP-PFM-OPS-012-04
Preconditions
Lines identify a bundle, feature, service and unmapped product.
Steps
Resolve their grants.
Expected
Mapped outputs are retained, service-only products grant no application and unfamiliar products are flagged.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/unit/licences/resolve-licence-windows.spec.ts#licenses nothing and flags the SKU when the map does not cover it
05 Distinguish continuity from real gapsedgeunittest
Proves
BR-CAP-PFM-OPS-012-05
Preconditions
Terms overlap, touch and leave actual gaps.
Steps
Resolve each set.
Expected
Continuous terms merge and separated terms remain separate.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/unit/licences/resolve-licence-windows.spec.ts#leaves a real gap between two terms as two windows, because the licence did lapse
06 Apply calendar grace to finite termsboundaryunittest
Proves
BR-CAP-PFM-OPS-012-06 INV-DOM-PFM-OPS-003-06
Preconditions
Windows end near calendar boundaries and another remains open-ended.
Steps
Resolve their grace dates.
Expected
Finite terms gain seven days and the open-ended term has no grace end.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/unit/licences/resolve-licence-windows.spec.ts#is the seven days after the end date that decision D3 settled on
07 Send the accepted renewal warningfailureapiproposed
Proves
BR-CAP-PFM-OPS-012-07
Preconditions
A contract is sixty days from its end.
Steps
Run the intended renewal-notice flow.
Expected
Workspace administrators receive the coming-end explanation.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Source
FND-PFM-OPS-012
08 Preserve the last complete commercial copyfailureapinegativetest
Proves
BR-CAP-PFM-OPS-012-08
Preconditions
A company has a successful snapshot before a provider outage.
Steps
Attempt synchronization during the outage.
Expected
Commercial data and last success remain, health records a redacted error and no flush is requested.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/integration/services/sync/sync-company-licences.integration.spec.js#changes no snapshot, no window and no last success
09 Record missing configuration without replacing licencesedgeapitest
Proves
BR-CAP-PFM-OPS-012-09
Preconditions
A previously synchronized company loses provider configuration.
Steps
Attempt synchronization.
Expected
Health becomes unconfigured and its existing windows remain unchanged.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/integration/services/sync/sync-company-licences.integration.spec.js#leaves the licences of a company synced before the key was removed exactly as they were
10 Invalidate only when windows differruleapitest
Proves
BR-CAP-PFM-OPS-012-10
Preconditions
A first company read, identical repeat and cancellation are available.
Steps
Synchronize each state.
Expected
The initial change and cancellation request flushes and the unchanged repeat does not.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/integration/services/sync/sync-company-licences.integration.spec.js#changes nothing and asks for no second flush when the read is the same as the last
11 Reject unverifiable webhook requestsvalidationapinegativetest
Proves
BR-CAP-PFM-OPS-012-12
Preconditions
Requests have missing or invalid signatures, altered bytes or address, stale timestamp or absent secret configuration.
Steps
Deliver them to the webhook.
Expected
No licence work is queued and verification or configuration refusal is returned.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/e2e/hubspot-licensing.e2e.spec.js#refuses a delivery signed for a different URI, so a signature cannot be replayed at another route
12 Separate staff company reading from synchronizationpermissionapinegativetest
Proves
BR-CAP-PFM-OPS-012-14
Preconditions
Reader, manager, customer and anonymous contexts are available.
Steps
Inspect company data and health and request synchronization.
Expected
Staff readers can inspect and only managers can synchronize; other contexts are refused.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/e2e/hubspot-licensing.e2e.spec.js#refuses a staff member holding only hq.licensing.read on the sync, with 403
13 Preserve during outage and remove on cancellationinteractionapitest
Proves
AS-JNY-PFM-OPS-005-01 AS-JNY-PFM-OPS-005-02
Preconditions
A company snapshot grants active application windows.
Steps
Fail a provider read, then synchronize a cancellation.
Expected
The failed read preserves data and cancellation removes coverage with invalidation requested.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/licensing/tests/integration/services/sync/sync-company-licences.integration.spec.js#changes no snapshot, no window and no last success
14 Keep staff exception history through commercial replacementinteractionapiproposed
Proves
BR-CAP-PFM-OPS-011-03 BR-CAP-PFM-OPS-012-08
Preconditions
A workspace has a staff grant and its company has copied contracts.
Steps
Replace the company snapshot and inspect the workspace exception history.
Expected
Commercial replacement leaves the separate staff decision available for explanation.
Data
Isolated workspace records and caller contexts for both sides of the interaction.
Source
services-platform:modules/licensing/tests/integration/services/enablement/provision-tenant-application.integration.spec.js#leaves the operational row exactly as it was, because the licence does not decide the state; services-platform:modules/licensing/tests/integration/services/sync/sync-company-licences.integration.spec.js#changes no snapshot, no window and no last success; CAP-PFM-OPS-011; WF-PFM-OPS-009; WF-PFM-OPS-013; WF-PFM-OPS-014; WF-PFM-OPS-015; WF-PFM-OPS-016
15 Reflect a cancellation without extending stale coverageinteractionapiproposed
Proves
BR-CAP-PFM-OPS-012-08 BR-CAP-PFM-OPS-014-01
Preconditions
A company has current windows and an enabled workspace application.
Steps
Fail one provider read, then successfully synchronize a cancelled contract and resolve availability.
Expected
The failed read preserves the earlier copy; the successful cancellation removes its contribution to access.
Data
Isolated workspace records and caller contexts for both sides of the interaction.
Source
services-platform:modules/licensing/tests/integration/services/sync/sync-company-licences.integration.spec.js#changes no snapshot, no window and no last success; services-platform:modules/licensing/tests/unit/availability/application-availability.spec.ts#answers the available ones, and only those, from the same resolution; CAP-PFM-OPS-014; WF-PFM-OPS-009; WF-PFM-OPS-013; WF-PFM-OPS-014; WF-PFM-OPS-015; WF-PFM-OPS-016
16 Read standing within the administrator’s reachinteractionapiproposed
Proves
BR-CAP-PFM-OPS-012-14
Preconditions
Two customers have workspaces with different application standing.
Steps
Read the local workspace and then request the other customer’s application information.
Expected
The local explanation is available without exposing the other customer’s standing.
Data
Isolated workspace records and caller contexts for both sides of the interaction.
Source
services-platform:modules/licensing/tests/e2e/hubspot-licensing.e2e.spec.js#refuses a staff member holding only hq.licensing.read on the sync, with 403; CAP-PFM-SEC-002; WF-PFM-OPS-009; WF-PFM-OPS-013; WF-PFM-OPS-014; WF-PFM-OPS-015; WF-PFM-OPS-016
17 Acknowledge recorded outcomes while retrying thrown processing errorsfailureapinegativeproposed
Proves
BR-CAP-PFM-OPS-012-16
Preconditions
A sync batch contains malformed input, a recorded provider failure and a sync call that throws.
Steps
Process the batch with successful execution-context creation and controlled sync-call outcomes.
Expected
Only the thrown sync call enters the returned retry list; malformed input and recorded provider outcomes are acknowledged.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Source
services-platform:modules/licensing/aws/lambda/LICENCE_SYNC.handler.ts:processLicenceSyncBatch
18 Observe refused company publication after webhook acceptancefailureapinegativetest
Proves
BR-CAP-PFM-OPS-012-17
Preconditions
A verified delivery resolves a company but its queue publisher refuses the message.
Steps
Accept the delivery with a rejecting publisher.
Expected
The delivery result identifies the refused company; the request is acknowledged and later reconciliation remains the recovery path.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Bound to
Source
services-platform:modules/licensing/tests/integration/services/sync/accept-webhook-delivery.integration.spec.js#reports the company it could not enqueue, so the nightly pass is what fixes it
19 Retain shared company evidence after deleting one workspaceinteractionapiproposed
Proves
BR-CAP-PFM-OPS-012-15 INV-DOM-PFM-OPS-003-11
Preconditions
Two workspaces share a company snapshot and licence windows; one enters deletion.
Steps
Purge the deleting workspace’s operational resources and resolve standing for the surviving workspace.
Expected
The surviving workspace can still use the retained company evidence after the removed workspace’s own records disappear.
Data
Isolated workspace and run-owned lifecycle records, with a second linked workspace where shared company evidence is checked.
Source
services-platform:modules/jobs/services/persistence/tenant-purges.ts:JOB_PURGE_RESOURCES; services-platform:modules/audit/tests/integration/services/persistence/audit-events.integration.spec.js#is refused by the database, so the purger is never a delete-by-tenant tool; services-platform:modules/licensing/services/maintenance/tenant-participant.ts:licensingParticipant

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.