# `Outcome`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Type · `import type { Outcome } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 2. Operations, reports, causes, problems

Where an operation ended. Spec section 6.2 has the state machine.
- 'committed': passed its commit point; irrevocable. `changed: false` when its result equalled
  the current state, so nothing was recorded.
- 'staged': written through a `tx`; the open transaction decides.
- 'deferred': a camera move or clip through a `tx`; it starts when that transaction is shown.
- 'superseded': a newer operation replaced it before its commit point; nothing of it remains.
- 'rolled-back': it ran, then was undone (reason 'timeout', 'enlisted-failed' or
  'internal-error').
- 'refused': it had no effect (see [`Reason`](Reason.md)).
- 'dry-run': it ran and reported, then was undone by design.

## Outcomes

| Code | Summary |
| --- | --- |
| [`'committed'`](../outcomes/committed.md) | passed its commit point; irrevocable. `changed: false` when its result equalled the current state, so nothing was recorded. |
| [`'staged'`](../outcomes/staged.md) | written through a `tx`; the open transaction decides. |
| [`'deferred'`](../outcomes/deferred.md) | a camera move or clip through a `tx`; it starts when that transaction is shown. |
| [`'superseded'`](../outcomes/superseded.md) | a newer operation replaced it before its commit point; nothing of it remains. |
| [`'rolled-back'`](../outcomes/rolled-back.md) | it ran, then was undone (reason 'timeout', 'enlisted-failed' or 'internal-error'). |
| [`'refused'`](../outcomes/refused.md) | it had no effect (see [`Reason`](Reason.md)). |
| [`'dry-run'`](../outcomes/dry-run.md) | it ran and reported, then was undone by design. |

The set is open: a code newer than your declared contract arrives as `'other'`.

## Declaration

```ts
export type Outcome = 'committed' | 'staged' | 'deferred' | 'superseded' | 'rolled-back' | 'refused' | 'dry-run' | 'other';
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `Outcome` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
