Skip to content

ATS-PFM-QRY-019Preserve and inspect monthly data snapshots: Capability Test Specification

Markdown

ATS-PFM-QRY-019

Preserve and inspect monthly data snapshots: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleQuestions, record exploration and data deliveryRevision2

Read atservices-platform ad3f6a65react-console baf6dae3rhythm-v2-docs 99376625

Coverage

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

Test Scenarios

14 scenarios proving CAP-PFM-QRY-019; 10 bound to an existing test.

01 Available months are workspace-specificpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-019-01 INV-DOM-PFM-QRY-006-07
Preconditions
One workspace has several snapshot periods and versions.
Steps
Read periods locally and as a user from another customer.
Expected
Local periods are distinct and ordered with their selected version; the other customer is refused.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#lets the tenant’s own people read its periods
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses another customer’s user the tenant’s periods
services-platform:modules/snapshots/tests/integration/services/persistence/snapshot-runs.queries.integration.spec.js#answers each period once, newest first, decided by the current version or else the highest one
Source
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#lets the tenant’s own people read its periods
02 HQ snapshot reading differs from managementpermissionapinegativetest
Proves
BR-CAP-PFM-QRY-019-02
Preconditions
Administrator, support and customer contexts request snapshot work.
Steps
List and request runs under each context.
Expected
HQ administration can do both, support can read only and customer contexts are refused.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#lets a Support Representative read the runs, through the HQ reader policy
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a Support Representative a request, which is managing snapshots
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a customer’s own administrator every HQ route, which are staff-only
Source
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#lets a Rhythm Administrator list the runs
03 Period planning follows local month boundariesboundaryapitest
Proves
BR-CAP-PFM-QRY-019-03
Preconditions
Workspaces occupy different time zones.
Steps
Plan snapshots near month end.
Expected
Each run describes its workspace’s completed month.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#plans the eligible tenant's September in its own zone, as version 1 of a captured, scheduled run
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#reads the disabled tenant's month in its own zone, August, and skips it with the policy's reason
Source
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#plans the eligible tenant's September in its own zone, as version 1 of a captured, scheduled run
04 Eligibility and skips remain inspectableruleapinegativetest
Proves
BR-CAP-PFM-QRY-019-04
Preconditions
Fixtures contain eligible, disabled and loading workspaces.
Steps
Run planning for them.
Expected
Eligible work is planned and omitted periods retain explanatory skip state.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#reads the disabled tenant's month in its own zone, August, and skips it with the policy's reason
Source
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#plans one run and skips two, passing over none
05 Reruns and back-fill allocate appropriate versionsconcurrencyapinegativetest
Proves
BR-CAP-PFM-QRY-019-05
Preconditions
A month has active work and a requested range contains gaps.
Steps
Request overlapping work and back-fill the range.
Expected
Active overlap returns 409 and eligible range periods receive distinct runs.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#plans a manual run as version 1 of a captured run, for the dispatcher to start
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a second request for the same month while the first is under way (409)
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#back-fills one run for each month of the range
Source
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#plans a manual run as version 1 of a captured run, for the dispatcher to start
06 Failed validation preserves the preceding publicationfailureapinegativetest
Proves
BR-CAP-PFM-QRY-019-06 INV-DOM-PFM-QRY-006-02
Preconditions
Version one is published for a period using the suite’s small transaction-run self-test type.
Steps
Publish a rerun, then fail validation of another attempt.
Expected
Version two becomes current, version one remains and the failing small run retains no generated rows or current-version change. This fixture does not establish rollback of earlier committed chunks.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#publishes version 2 as the current one and keeps version 1, published and readable
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#fails the run with the checks that did not pass, and queues it for a retry
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#publishes nothing: none of its rows were kept, and version 2 is still the current one
Source
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#publishes version 2 as the current one and keeps version 1, published and readable
07 Ledger writers remain service-scopedinvariantapinegativetest
Proves
BR-CAP-PFM-QRY-019-07 INV-DOM-PFM-QRY-006-03
Preconditions
Accounting, Membership and Platform writer roles are available.
Steps
Insert, update and delete rows belonging to each service.
Expected
Roles write only their own rows, other owners are refused or unmatched, and deletion is denied.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/integration/db/snapshot-runs-accounting-writer.integration.spec.js#refuses a run whose owner_service is another service’s, in its own tenant
services-platform:modules/snapshots/tests/integration/db/snapshot-runs-accounting-writer.integration.spec.js#never deletes a run, not even its own tenant’s Accounting run: it holds no DELETE
services-platform:modules/snapshots/tests/integration/db/snapshot-runs.table.integration.spec.js#refuses Platform’s role a run of another owning service, even in its own tenant
Source
services-platform:modules/snapshots/tests/integration/db/snapshot-runs-accounting-writer.integration.spec.js#refuses a run whose owner_service is another service’s, in its own tenant
08 Active and current uniqueness remain independentinvariantapinegativetest
Proves
BR-CAP-PFM-QRY-019-08 INV-DOM-PFM-QRY-006-01
Preconditions
A period already has an active run and current publication.
Steps
Insert another active row, another current row and an inactive noncurrent row.
Expected
The first two are rejected and the unrelated retained version is allowed.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/integration/db/snapshot-runs.table.integration.spec.js#refuses a second active run of the same tenant, type and period
services-platform:modules/snapshots/tests/integration/db/snapshot-runs.table.integration.spec.js#refuses a second current version of the same tenant, type and period
services-platform:modules/snapshots/tests/integration/db/snapshot-runs.table.integration.spec.js#accepts a second version that is neither active nor current, the negative control of both
Source
services-platform:modules/snapshots/tests/integration/db/snapshot-runs.table.integration.spec.js#refuses a second active run of the same tenant, type and period
09 Retry intervals need explicit execution prooftransitionapinegativeproposed
Proves
BR-CAP-PFM-QRY-019-09
Preconditions
A snapshot attempt repeatedly fails.
Steps
Allow its dispatcher to process all four attempts.
Expected
The proposed proof requires retries after fifteen minutes, one hour and four hours, then a final failed state and alarm accounting.
Data
Prepare isolated fixtures for the states described here.
Source
services-platform:docs/snapshots/README.md#Configuration and the runbook
10 Snapshot inputs identify supported workvalidationapinegativetest
Proves
BR-CAP-PFM-QRY-019-10
Preconditions
A staff context can request snapshots.
Steps
Omit reason, use an invalid period or type and request a page above one thousand.
Expected
Each request is rejected with its invalid input identified.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a request with no reason, naming the field
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a snapshot type this environment does not run
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a page of 1,001 runs, naming the limit
Source
services-platform:modules/snapshots/tests/e2e/snapshots.e2e.spec.js#refuses a request with no reason, naming the field
11 Workspace purge removes retained snapshot historytransitionapitest
Proves
BR-CAP-PFM-QRY-019-11 INV-DOM-PFM-QRY-006-04
Preconditions
A workspace has multiple versions, runs and policy overrides.
Steps
Purge it and repeat the purge.
Expected
All its retained resources disappear and the repeated operation removes nothing further.
Data
Use the existing binding’s controlled fixture data.
Bound to
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#removes every snapshot row, run and override of the purged tenants, the run's version chain included
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#ends each tenant with a call that removed nothing, which is how the purge proves the tenant empty
Source
services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#removes every snapshot row, run and override of the purged tenants, the run's version chain included
12 Search cleanup and snapshot cleanup respect the same workspace boundaryinteractionapiproposed
Proves
BR-CAP-PFM-QRY-017-11 BR-CAP-PFM-QRY-019-11
Preconditions
Two workspaces have search resources and retained monthly history.
Steps
Delete one workspace, wait for its rebuild to settle and run the cleanup participants to completion.
Expected
The deleted workspace has no indexed documents or retained snapshot versions; the control keeps both.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/quick-search/tests/integration/services/maintenance/tenant-participant.integration.spec.js#purges the tenant once the rebuild has settled, the job’s own three tables included,services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#removes every snapshot row, run and override of the purged tenants, the run's version chain included
13 Workspace removal clears both kinds of retained historyinteractionapiproposed
Proves
BR-CAP-PFM-QRY-018-08 BR-CAP-PFM-QRY-019-11
Preconditions
An isolated workspace has export settings and queued history plus multiple snapshot versions.
Steps
Run workspace deletion to completion and inspect both inventories.
Expected
Its package foundation records and snapshot history are removed; repeat cleanup reports nothing further.
Data
Use an isolated workspace with the described source records, access grants and a surviving control workspace.
Source
services-platform:modules/data-exports/tests/e2e/data-exports.e2e.spec.js#is answered 409 not_implemented for a download, until the generation job,services-platform:modules/snapshots/tests/integration/lifecycle/pipeline/snapshot-pipeline.integration.spec.js#removes every snapshot row, run and override of the purged tenants, the run's version chain included
14 Admission leaves excess planned work waitingconcurrencyapinegativeproposed
Proves
BR-CAP-PFM-QRY-019-12 INV-DOM-PFM-QRY-006-06
Preconditions
One owning service has five eligible planned runs, including two backfills, and its configured cap is four.
Steps
Dispatch admission concurrently twice and inspect admitted runs and attached attempt jobs.
Expected
At most four runs are admitted and at most one is a backfill; waiting runs remain planned and no run receives duplicate attempt work.
Data
Create isolated periods and a controllable dispatcher for one owning service.
Source
services-platform:docs/snapshots/README.md#Configuration and the runbook

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.