# `CommitOptions`

> 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.

Interface · `import type { CommitOptions } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 5. Writers, transactions, session

The options of a commit. A write through `session` takes them. A write through a `tx` (or a
handle obtained from it) does not: they belong to the transaction, so pass them to
[`session.transaction(work, options)`](Session.transaction.md). Through a `tx` they are a type error ([`NoCommitOptions`](NoCommitOptions.md));
an untyped call that passes one throws HoloInputError('option-in-transaction') with a `fix`.
Member options (`assetBaseUrl`, `from`/`to`, `near`, `orient`, `owner`, `durationMs`,
`easing`, `fadeMs`, `signal`) pass through a `tx`.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="expectrevision"></a>[`expectRevision?`](CommitOptions.expectRevision.md) | property | If-match on [`session.revision`](Session.revision.md). |
| <a id="undo"></a>[`undo?`](CommitOptions.undo.md) | property | An undo label makes this write one undo step. |
| <a id="dryrun"></a>[`dryRun?`](CommitOptions.dryRun.md) | property | Runs and reports, then rolls back by design ('dry-run'). |
| <a id="actor"></a>[`actor?`](CommitOptions.actor.md) | property | Who made the write. |
| <a id="origin"></a>[`origin?`](CommitOptions.origin.md) | property | Your tag, echoed unchanged in [`Report.origin`](ReportFields.origin.md) and `cause.origin`. |
| <a id="supersede"></a>[`supersede?`](CommitOptions.supersede.md) | property | While a transaction is open: roll it back (it resolves 'superseded'); the writes queued behind it apply in call order, then this one, which supersedes an adjacent replacing write to its target (spec section 6.1, O2c). |
| <a id="expectgroup"></a>[`expectGroup?`](CommitOptions.expectGroup.md) | property | A guard, checked at the call: this write belongs to the undo group you are running. |

## Declaration

```ts
export interface CommitOptions {
  expectRevision?: number;
  undo?: 'rebase' | (string & {});
  dryRun?: boolean;
  actor?: Actor;
  origin?: string;
  supersede?: boolean;
  expectGroup?: HistoryGroup;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `CommitOptions` 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) |
