Skip to content

ATS-PFM-OPS-002Resolve interrupted background work: Capability Test Specification

Markdown

ATS-PFM-OPS-002

Resolve interrupted background work: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-PFM-OPS-002

Design

Executed by
TST-PFM-OPS-004, TST-PFM-OPS-013, TST-PFM-OPS-069

KindAcceptance test setProduct areaPlatformModuleOperational RecordsRevision2

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

Coverage

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

Test Scenarios

12 scenarios proving CAP-PFM-OPS-002; 9 bound to an existing test.

01 Resolve a timed-out executiontransitionapitest
Proves
BR-CAP-PFM-OPS-002-01
Preconditions
A running job has exceeded the inactivity threshold and its execution timed out.
Steps
Run reconciliation once.
Expected
The failed result retains progress and fails the running step with reconciliation history.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#settles the job failed, with the reconciled summary and the progress its steps earned
02 Reject incomplete reported successinvariantapinegativetest
Proves
BR-CAP-PFM-OPS-002-02 INV-DOM-PFM-OPS-001-07
Preconditions
Execution reports success while a recorded step still runs.
Steps
Reconcile the job.
Expected
The record settles failed rather than accepting unsupported success.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#corrects the job to failed, never succeeded, keeping the progress its steps earned
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#corrects the job to failed, never succeeded, keeping the progress its steps earned
03 Resolve an execution that never startedtransitionapinegativetest
Proves
BR-CAP-PFM-OPS-002-03
Preconditions
A pending job has no execution handle and is stale.
Steps
Run a reconciliation pass.
Expected
The failure identifies an unstarted job and its steps remain queued.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#settles it failed, saying the job never started
04 Require repeated missing-execution evidenceboundaryapitest
Proves
BR-CAP-PFM-OPS-002-04
Preconditions
A running execution cannot be found.
Steps
Run three lookup passes.
Expected
The first two add misses and only the third fails the job.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#halts the job only on the third pass
05 Preserve active workedgeapinegativetest
Proves
BR-CAP-PFM-OPS-002-05
Preconditions
One job has recent activity and another execution still runs.
Steps
Run reconciliation against both.
Expected
Their records and histories remain unchanged.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#leaves the root exactly as it was, version and all
06 Alert on execution after finalityinvariantapinegativetest
Proves
BR-CAP-PFM-OPS-002-06
Preconditions
A recently failed job’s execution is still running.
Steps
Run a pass.
Expected
An operational alert is emitted without reopening the job.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#raises one alert and changes nothing
07 Apply the business consequence before failurefailureunitproposed
Proves
BR-CAP-PFM-OPS-002-07
Preconditions
A registered kind has a failure consequence that can fail before settlement.
Steps
Reconcile a failed execution, first refusing the consequence and then allowing it to finish.
Expected
The refusal leaves the run open for another pass; successful consequence application precedes failed settlement.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Source
macroservice-libraries:packages/jobs/src/reconciler/job-reconciler.spec.ts#applies it before the settlement, so a consequence that fails leaves the job for the next pass
08 Repair summary driftruleapitest
Proves
BR-CAP-PFM-OPS-002-08
Preconditions
Recorded step progress and the root summary disagree.
Steps
Reconcile the stale run.
Expected
The root is repaired and the job remains unsettled.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#repairs the summary instead of settling the job
09 Explain a never-started run to its requesterinteractionapiproposed
Proves
BR-CAP-PFM-OPS-002-03 BR-CAP-PFM-OPS-003-06
Preconditions
A notifying provisioning run has no execution handle.
Steps
Reconcile the stale run and inspect its requester notice.
Expected
The message refers to the same failed run and carries its reconciliation explanation.
Data
Isolated workspace records and caller contexts for both sides of the interaction.
Source
services-platform:modules/jobs/tests/integration/lifecycle/job-reconciliation/job-reconciliation.integration.spec.js#settles it failed, saying the job never started; services-platform:modules/tenants/tests/integration/lifecycle/reconciled-job-failure.integration.spec.js#tells the staff member who asked for the tenant that it failed, though no task of the job ever ran; CAP-PFM-OPS-003; WF-PFM-OPS-003
10 Retain lifecycle failure evidenceinteractionapiproposed
Proves
BR-CAP-PFM-OPS-002-07
Preconditions
A workspace lifecycle run reaches an interrupted execution outcome.
Steps
Reconcile it and inspect the lifecycle record alongside the job record.
Expected
Both records identify the failed work without silently reopening its final history.
Data
Isolated workspace records and caller contexts for both sides of the interaction.
Source
macroservice-libraries:packages/jobs/src/reconciler/job-reconciler.spec.ts#applies it before the settlement, so a consequence that fails leaves the job for the next pass; CAP-PFM-SEC-003; WF-PFM-OPS-003
11 Defer a transient candidate lookupfailureunitnegativetest
Proves
BR-CAP-PFM-OPS-002-11
Preconditions
A stalled candidate’s repository lookup raises a connection error.
Steps
Run one reconciliation pass with the transient lookup fault.
Expected
The candidate is deferred without a settlement or an unregistered-kind alert.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Bound to
Source
macroservice-libraries:packages/jobs/src/reconciler/job-reconciler.spec.ts#defers the candidate to a later pass
12 Follow continuation before deciding the outcomeinteractionunittest
Proves
BR-CAP-PFM-OPS-002-12 BR-CAP-PFM-OPS-001-12
Preconditions
The previous execution succeeded by creating a recorded successor that remains running.
Steps
Reconcile first against the predecessor, then against the ended successor.
Expected
The first pass preserves the active job; the later pass uses the successor’s outcome.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Bound to
Source
macroservice-libraries:packages/jobs/src/engine/job-continuation.spec.ts#the reconciler

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.