Skip to content

CAP-PFM-OPS-002Resolve interrupted background work

Markdown

CAP-PFM-OPS-002

Resolve interrupted background work

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaPlatformModuleOperational RecordsRevision1

Read atservices-platform ad3f6a65macroservice-libraries 54536a44

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Interrupted work reaches an explainable resolution.Reconciled failure applies the same business consequence as ordinary failure.
Surfaces
job
Preconditions
The reconciler registers the kind and can discover its family through the service’s job views.
Postconditions
The pass repairs, settles or preserves each examined job according to the execution evidence.
Constraints
The reconciler reads its service’s job views, probes workflow executions and changes records through the engine.

Controls

24 controls apply, from the corpus control catalogue.

TC-AVL-001 TC-AVL-004 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-IAM-001 TC-IAM-006 TC-LOG-002 TC-LOG-003 TC-LOG-005 TC-MON-001 TC-MON-002 TC-PI-001 TC-PI-002 TC-PI-003 TC-PI-004 TC-PI-005 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Business Rules

12 rules, 11 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
The five-minute reconciliation pass considers jobs silent for fifteen minutes and converts timed-out, failed or unrequested aborted executions to failed jobs, preserving earned progress and failing any running step.
lifecycleservicetest
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
02must prove
Proposed
A reported successful execution settles failed if a recorded step remains running or retrying.
calculationservicetest
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
03must prove
Proposed
A stalled job with no execution handle ends failed as never started, leaving its steps queued.
lifecycleservicetest
04must prove
Proposed
Three consecutive unsuccessful execution lookups are required before reconciliation fails a missing execution, with each miss added to history.
policyservicetest
05must prove
Proposed
Reconciliation leaves recently active jobs and genuinely running executions unchanged, including their history.
policyservicetest
06must prove
Proposed
A job settled within the preceding day whose execution still runs raises an operational alert without reopening its record.
policyservicetest
07must prove
Proposed
Reconciliation applies the registered failure consequence before settlement, and that consequence must tolerate repeat application.
✓ An unstarted provisioning job moves its workspace into recoverable failure.✗ A dead execution cannot leave provisioning dependent on a failure task that never ran.
policyservicetest
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
08must prove
Proposed
A mismatch between the job summary and step records causes summary repair rather than settlement.
calculationservicetest
09must prove
Proposed
The reconciler reserves one concurrent invocation, has a silence alarm, and rejects malformed invocation requests before running a pass.
no proof recorded yet
policyserviceobserved
10
Proposed
The handler also repairs stranded provisioning and reconciles websites; after successful jobs reconciliation, an exception from provisioning repair fails the invocation before the website pass runs.
policyserviceobserved
11must prove
Proposed
Transient candidate or execution-probe errors defer the job to another pass, while an unregistered kind produces an operational alert.
policyserviceobserved
12must prove
Proposed
When a completed execution has a recorded successor, reconciliation follows the successor before deciding settlement, with a bounded continuation search.
policyserviceobserved

Scenarios

IdGivenWhenThenProvenance
01Provisioning committed but no execution started.Reconciliation examines it after the inactivity threshold.The job fails as unstarted, the workspace becomes recoverable and the notifying path is invoked.inferred
services-platform:modules/tenants/tests/integration/lifecycle/reconciled-job-failure.integration.spec.js#moves the tenant to provisioning_failed, which is what makes it retryable and deletable again
02Execution lookup cannot find a running job’s workflow.Three successive passes record the same absence.Only the last pass fails the job; the earlier passes record misses.inferred

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.