Skip to content

ATS-PFM-OPS-003Notify a job’s requester of its outcome: Capability Test Specification

Markdown

ATS-PFM-OPS-003

Notify a job’s requester of its outcome: Capability Test Specification

Markdown
  • DocumentProposed

Planning

Proves capability
CAP-PFM-OPS-003

Design

Executed by
TST-PFM-OPS-071, TST-PFM-OPS-079, TST-PFM-OPS-119

KindAcceptance test setProduct areaPlatformModuleOperational RecordsRevision2

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

Coverage

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

Test Scenarios

13 scenarios proving CAP-PFM-OPS-003; 8 bound to an existing test.

01 Address the recorded requesterruleunitproposed
Proves
BR-CAP-PFM-OPS-003-02
Preconditions
One provisioning job names a person and another has no requester.
Steps
Run notification handling for both.
Expected
Only the named requester has a recipient message.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Source
services-platform:modules/jobs/tests/unit/services/notices/job-notice-email.spec.js#is addressed to the requester alone: the notice is about their own job
02 Suppress repeat completed noticesinvariantapinegativetest
Proves
BR-CAP-PFM-OPS-003-03 INV-DOM-PFM-OPS-001-11
Preconditions
Delivered and suppressed outcome records already exist.
Steps
Request another claim for each.
Expected
Neither record is returned for sending or has its attempt count advanced.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/services/persistence/job-notices.integration.spec.js#answers nothing at all to the second claim, so nothing is sent twice
03 Reclaim incomplete noticestransitionapitest
Proves
BR-CAP-PFM-OPS-003-04
Preconditions
Pending and failed outcome records remain.
Steps
Claim them again.
Expected
The existing records become pending with another counted attempt and cleared error.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/services/persistence/job-notices.integration.spec.js#is claimed again, because a notice nobody received is worse than one that arrives twice
04 Isolate delivery failure from the jobfailureapinegativeproposed
Proves
BR-CAP-PFM-OPS-003-05
Preconditions
The email sender throws during notification.
Steps
Invoke requester notification.
Expected
No exception escapes and failure evidence is recorded and logged independently of the job.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Source
services-platform:modules/jobs/services/notices/notify-job-requester.ts:notifyJobRequester
05 Reach a requester without a started executioninteractionapitest
Proves
BR-CAP-PFM-OPS-003-06
Preconditions
A notifying provisioning job has never begun.
Steps
Allow reconciliation to fail it.
Expected
The requester receives the reconciled failure explanation.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
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
Source
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
06 Build the HQ link and environment labelboundaryunittest
Proves
BR-CAP-PFM-OPS-003-07
Preconditions
The sending settings contain a console address and environment.
Steps
Render the requester notice.
Expected
The message identifies its environment and opens the matching HQ job page.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/jobs/tests/unit/services/notices/job-notice-email.spec.js#is the job’s own page in Rhythm HQ, by kind and id
07 Keep reconciled provisioning recoverableinteractionapitest
Proves
AS-JNY-PFM-OPS-002-01 AS-JNY-PFM-OPS-002-02
Preconditions
A provisioning job is stale without an execution.
Steps
Reconcile it and invoke the consequence again.
Expected
The workspace remains recoverably failed and the completed notice is not resent.
Data
Controlled records and caller contexts matching this scenario’s preconditions.
Bound to
Source
services-platform:modules/tenants/tests/integration/lifecycle/reconciled-job-failure.integration.spec.js#sends the requester nothing a second time either
08 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-002; WF-PFM-OPS-002; WF-PFM-OPS-003; WF-PFM-OPS-004
09 Retain lifecycle failure evidenceinteractionapiproposed
Proves
BR-CAP-PFM-OPS-003-06
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
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-SEC-003; WF-PFM-OPS-002; WF-PFM-OPS-003; WF-PFM-OPS-004
10 Refuse incomplete notice configurationvalidationunitnegativetest
Proves
BR-CAP-PFM-OPS-003-09
Preconditions
The sending configuration lacks the from address in one case and the console address in another.
Steps
Resolve notice settings for both incomplete configurations.
Expected
Configuration validation prevents message construction and identifies the missing settings.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Bound to
Source
services-platform:modules/jobs/tests/unit/services/notices/job-notice-email.spec.js#refuses to send at all when the console is unset, so no notice links nowhere
11 Record each delivery outcome before a later claimtransitionapitest
Proves
BR-CAP-PFM-OPS-003-03 BR-CAP-PFM-OPS-003-04 INV-DOM-PFM-OPS-001-11
Preconditions
Four separate pending notices can be recorded as delivered, suppressed or failed, or left unfinished.
Steps
Write the three outcomes, leave the fourth pending, and request another claim for each row.
Expected
Delivered and suppressed notices refuse another claim; failed and unfinished notices return to pending with another counted attempt.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/services/persistence/job-notices.integration.spec.js#claiming and settling the notice a job’s requester is sent
12 Keep success and failure notices distinctinvariantapitest
Proves
BR-CAP-PFM-OPS-003-10 INV-DOM-PFM-OPS-001-11
Preconditions
One run has no claimed success or failure notice.
Steps
Claim both outcome notices.
Expected
The two claims have different row identities and preserve their distinct outcome kinds.
Data
Run-owned records and controlled clocks or dependency responses named in the preconditions.
Bound to
Source
services-platform:modules/jobs/tests/integration/services/persistence/job-notices.integration.spec.js#are separate notices, because the unique key is the job and the outcome together
13 Claim a successful run’s notice again after deliveryinteractionapiproposed
Proves
BR-CAP-PFM-OPS-003-03 BR-CAP-PFM-OPS-001-04
Preconditions
A notifying run has succeeded and its requester message has a delivered outcome.
Steps
Invoke notification again for that same job outcome and inspect the run and notice.
Expected
The ordinary repeat does not send another message or change the final job.
Data
Isolated workspace and run-owned lifecycle records, with a second linked workspace where shared company evidence is checked.
Source
services-platform:modules/jobs/tests/integration/services/job-snapshot/job-snapshot.integration.spec.js#takes that catalog from the published event rather than the declaration, which the event itself carries; macroservice-libraries:packages/jobs/src/workflow/job-workflow.spec.ts#lets no detail of the transient error reach the job or the execution state; macroservice-libraries:packages/jobs/src/engine/job-engine.ts:settleJob; 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; services-platform:modules/jobs/services/notices/notify-job-requester.ts:notifyJobRequester

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.