> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manthan.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Human Override

> Recording a post-hoc correction with OverrideService — not currently reachable over HTTP or through either SDK

<Warning>
  There is no REST endpoint, and no TypeScript or Python SDK method, for creating or reading an [Override](/docs/concepts/override) today. `grep`-ing `packages/api/src` for `Override` returns nothing. The only way to create one is to call `OverrideService` directly in your own TypeScript code, reaching past `packages/runtime`'s public export list to do it. Read this guide as "how the mechanism works, if you wire it in yourself" rather than "how to call an existing feature."
</Warning>

## What Override is for

Parmana's runtime authorization is allow-or-block, evaluated once, deterministically — a [Decision](/docs/concepts/decision) is never paused mid-evaluation to wait on a human. If a human authority needs to correct an outcome afterward (approving something Policy rejected, for instance), that correction is recorded as a new, immutable `Override` artifact appended to the [Execution Trust Record](/docs/concepts/execution-trust-record) — the original Decision and Execution are untouched.

## Using `OverrideService` directly

```ts theme={null}
import { OverrideService } from "@parmana/runtime/dist/services/override-service.js";
// Not part of packages/runtime/src/index.ts's public export list —
// import the compiled path directly, or copy the class, until it's exported.

const overrides = new OverrideService(businessTransactionRepository, executionTrustRecordRepository);

const override = await overrides.create(
  businessTransactionId,
  "jane.doe@example.com",     // approvedBy
  "Manual approval after policy rejection", // reason
  "Vendor confirmed via phone", // justification (optional)
);
```

`OverrideService.create()` (`packages/runtime/src/services/override-service.ts`) enforces two rules: the Business Transaction must exist, and only one Override is allowed per transaction — a second call throws `"Override already exists for this Business Transaction."` The created `Override` is appended via `ExecutionTrustRecordRepository.appendOverride()`, alongside `executions`, `verifications`, and `receipts`.

<Warning>
  Don't construct the resulting object against the TypeScript or Python SDK's `Override` model — both use `authorityId` where the real domain type uses `approvedBy`, and neither models the optional `justification` field. See [TypeScript SDK → Models](/docs/typescript-sdk/models#override-has-drifted-from-the-canonical-domain-model).
</Warning>

## This is not the same as human-in-the-loop approval

"Human-in-the-loop," as a pattern, usually implies pausing an in-flight operation to wait for a person before continuing. Override is the opposite: the operation already ran to completion (approved or rejected), and a human is instead appending a correction to the historical record afterward. If you need an actual pause-and-wait approval step before execution, that has to be built into your own call site — hold the Business Transaction, get approval, and only then call `POST /execute` — Parmana's runtime itself has no notion of a pending/awaiting-approval transaction state that blocks mid-pipeline.

<Note>
  `examples/07-human-approval`'s `run.ts` is currently an unimplemented stub (`console.log("Parmana Example 07 - Human Approval")`) — despite the name, it does not yet demonstrate this pattern in runnable code.
</Note>

## Related

<CardGroup cols={2}>
  <Card title="Override (concept)" href="/docs/concepts/override">The domain model and field-drift details.</Card>
  <Card title="Execution Trust Record" href="/docs/concepts/execution-trust-record">Where the Override is appended.</Card>
  <Card title="FAQ" href="/docs/faq">More on Override vs. human-in-the-loop.</Card>
  <Card title="runtime package" href="/docs/packages/runtime">Where `OverrideService` lives today.</Card>
</CardGroup>
