Background
app.machine.ts (added in #7) declares and exports typed named actions on every boot-workflow transition, following the XState v5 idiomatic pattern where the machine declares what must be observed and the caller supplies the implementation via createActor(appMachine, { actions: { … } }):
| Transition |
Named action |
booting → failed |
recordBootFailed |
booting → title |
recordBootSucceeded |
failed → booting |
recordBootRetryRequested |
The type test file (tests/app-machine.types.test.ts) validates that these action names are part of the exported AppMachineAction contract.
However, no concrete implementations (logging, metrics counters, error telemetry) exist in the codebase yet. Per ADR 003 scope — a minimal machine with no adapter imports — this was intentionally deferred from #7.
Work required
- Wire
recordBootFailed, recordBootSucceeded, and recordBootRetryRequested with concrete logging/metrics implementations at the point where the actor is created.
- Export utility hooks (e.g.
createObservableAppActor) that surface boot success/failure/retry rates to the application layer, enabling maintainers to diagnose boot failures and monitor failure rates without reading source code.
Acceptance criteria
References
/cc @leynos
Background
app.machine.ts(added in #7) declares and exports typed named actions on every boot-workflow transition, following the XState v5 idiomatic pattern where the machine declares what must be observed and the caller supplies the implementation viacreateActor(appMachine, { actions: { … } }):booting → failedrecordBootFailedbooting → titlerecordBootSucceededfailed → bootingrecordBootRetryRequestedThe type test file (
tests/app-machine.types.test.ts) validates that these action names are part of the exportedAppMachineActioncontract.However, no concrete implementations (logging, metrics counters, error telemetry) exist in the codebase yet. Per ADR 003 scope — a minimal machine with no adapter imports — this was intentionally deferred from #7.
Work required
recordBootFailed,recordBootSucceeded, andrecordBootRetryRequestedwith concrete logging/metrics implementations at the point where the actor is created.createObservableAppActor) that surface boot success/failure/retry rates to the application layer, enabling maintainers to diagnose boot failures and monitor failure rates without reading source code.Acceptance criteria
@ts-expect-errorsuppressions introduced.References
docs/adr-003-use-xstate-for-workflow-orchestration.md/cc @leynos