﻿# ADR 0001 — Price Override Returns Explicit 403 Instead of Silent Ignore

Date: 2026-09-11
Status: Accepted
Refs: T-B03, T-B04, EXECUTION_ROADMAP.md §4

## Context

When an admin submits a manual `unit_price` override on an order item,
the system must decide what to do if the requesting user lacks the
`orders.price_override` permission.

Two options were considered:
1. **Silent ignore**: accept the request, discard the override, use system price.
2. **Explicit 403**: reject the request with ERR_PRICE_OVERRIDE_FORBIDDEN.

## Decision

**Option 2 — Explicit 403** was chosen.

Rationale:
- Silent ignore hides intent: the admin believes they set a price, but the system
  silently applies a different one. This leads to billing confusion.
- An explicit rejection is debuggable and auditable.
- The permission `orders.price_override` is intentionally narrow — users without
  it should not be sending price overrides at all. A 403 enforces this contract.

## Consequences

- Clients (Flutter admin app) must check for 403 on order creation and display
  a clear message: "You do not have permission to override the price."
- The UI in `wholesale_detail_screen.dart` should hide the unit_price field
  entirely for users without `orders.price_override` (T-C02).
- Future: if silent-ignore behavior is needed for a specific flow, introduce a
  separate flag rather than reverting this decision.
