Context
Tenant provisioning waits until every service acks (0210 decision 6), but@stackra/workflow had signals only within
one service and no await-all. Untaken signals were dropped after a hard-coded seven days. 0152 pins a run to its
version and keeps the old class, without saying what the old class is called. Document runs had no test helper.
Decision
- Service acked.
ServiceAckedis an integration event (workflow.service.acked.v1: subject, service member key) that each service records when its part is done. The waiting workflow callsServiceAckService.expect(subject, services)in the step that sends the request (so no ack comes first), and waits on theAllServicesAckedsignal correlated by{ subject }. The waiting service’s explorer records each ack inworkflow.service_ack_sets(one versioned row per subject, so two acks at once conflict and the redelivered one completes the set) and holds the signal on the completing ack. The services expected are the caller’s configuration. - Signal retention is configuration.
workflow.signalRetention(7dby default,1mto90d) sets how long an untaken signal or held event is kept. - Version-pin names. A kept older version lives beside the current class as
<name>.v<n>.workflow.tsand is named<Name>V<n>Workflow, with the samekeyandversion: n; the current class keeps the plain name. - Document runs in tests.
runDocument(document, input, { as, key })in./testingruns an automation document or a plan through the testing app’s pipeline and returns its journal record, refusal included.
Consequences
- Provisioning’s list of services is data; adding a service is a configuration change.
- A gen naming check for decision 3 is still to write.
Enforcement
packages/runtime/workflow/src/node/services/__tests__/service-ack.service.test.ts,
src/node/__tests__/workflow.explorer.test.ts, src/config/__tests__/workflow.config.test.ts,
src/testing/functions/__tests__/run-document.function.test.ts. Decision 3: planned — gen’s kind_class_name check.
Supersedes and sources
Supersedes: none. Amends 0152 (decision 2 naming; held-signal retention). Sources: STA-844 (tenancy SPEC G5), STA-773.