AI System DesignAI System Design FundamentalsModule 11 — Architecture contracts and integration
Designing AI Workflows with Scoped, Expiring and Accountable Policy Exceptions
Question 31 of 47 · Updated
On this page
- 1. Begin with a policy catalog, not an override button
- 2. Architecture and trust boundaries
- 3. Define the request and issued grant separately
- 4. Assess risk and obtain accountable approval
- 5. Lifecycle, expiration and renewal
- 6. Deterministic conflict resolution and inheritance
- 7. Enforce at the transactional boundary
- 8. Worked allowance and concurrency scenario
- 9. Tested implementation: exception-aware local commitment
- 10. Revocation, expiry automation and downstream remediation
- 11. Auditability and user interaction
- 12. Prevent exception abuse and operational drift
- 13. Capacity, economics and monitoring
- 14. Failure and production test matrix
- 15. Interview-ready answer and module conclusion
- References and research transparency
Treat an exception as a narrowly scoped, time-bounded, independently approved authorization to deviate from a specific waivable business rule—not as a switch that disables policy. A trusted policy owner defines which rules admit exceptions and the maximum deviation. AI may identify a potential exception, gather evidence and propose alternatives, but it cannot approve its own request or redefine a mandatory invariant. The executor verifies current authority, exact scope, policy compatibility, expiry, revocation and remaining allowance at the point of commitment. Every approval and consumption is attributable to an accountable human or explicitly governed authority, and every exception has a defined end.
How would you design an AI workflow with explicit business-policy exceptions, expiration and accountable approval?
ASD-090 | Module 11 — Architecture contracts and integration | Learning order 18. This concludes the module's study of independently versioned artifacts, contracts and accountable authority. ASD-006 separates evidence, policy and execution; ASD-082 binds approval to immutable catalog edits; ASD-086 covers configuration inheritance; ASD-089 transfers authority during migration. This lesson specifically defines the business-policy exception as a first-class governed artifact, with delegated waiver authority, scope, expiry, cumulative consumption and revocation. The published agent approval-pause lesson and pending ASD-046 cross-system approval queues concern checkpointing, delivery and safe resumption; those are supporting mechanisms, not the exception semantics. The upcoming procurement and IT access-request cases apply these ideas to their specific domains. All numerical examples are fictional. No live purchasing system, legal assessment or actual AI model was used.
1. Begin with a policy catalog, not an override button#
Imagine an AI-assisted procurement workspace. It proposes expedited shipping for an urgently needed component. Standard freight approval is limited to $100 per charge. A qualified operations manager may grant an exception for a particular purchase order, within a hard maximum of $300 per charge and an explicit total exception budget. The supplier must remain eligible; the purchase order cannot be blocked; the buyer must be authorized; the overall budget and contractual restrictions still apply. The model predicts the cost of delay, but its forecast does not create waiver authority.
Classify policies before deciding whether any exception is possible:
| Rule category | Example | Exception behavior |
|---|---|---|
| Non-overridable invariant | Tenant isolation, blocked supplier or purchase order, required accounting integrity | No exception through this workflow |
| Waivable business default | Standard freight limit $100 | Explicitly delegated exception within defined ceiling |
| Conditional policy | Additional verification required above a threshold | Follow defined alternative procedure if expressly permitted |
| Preference/optimization objective | Prefer least expensive eligible shipment | Change within ordinary policy; no waiver needed |
| Unclassified or disputed obligation | Ambiguous inherited rule | Hold and obtain accountable policy clarification |
A policy owner must determine the classification based on actual obligations; the examples are not legal conclusions. A contractual, regulatory or safety requirement cannot be bypassed merely because an administrator clicks Approve. If a formal obligation genuinely has a lawful exception process, represent that explicitly in the governing policy and delegate only the permitted authority. An application-level exception cannot manufacture it.
Document the rule ID, policy version, owner, normal predicate, eligible exception scope, hard bounds, risk classes, maximum duration, approver qualifications, required evidence and compensating controls. Record how changes to the parent policy affect issued exceptions. If there is no declared exception route, deny the requested deviation.
Do not confuse a policy exception with a runtime exception, feature flag, role elevation, discount code or normal approval. An ordinary approval authorizes an operation already within policy. An exception authorizes a defined deviation from one waivable rule, while ordinary approval and resource authorization may still be required. An emergency process is not a master bypass; it has its own bounded authority, logging and review requirements.
2. Architecture and trust boundaries#
The AI assistant has no write permission to the policy catalog, approvals or effective grant state. It may request an exception through a narrow typed interface and present a draft justification with supporting evidence. The exception service validates eligibility, owns request and grant lifecycle, and verifies delegated approver authority. The protected executor owns the final decision and local state mutation. An audit and monitoring service tracks behavior but does not grant permission by absence of an alert.
Use independent identities and narrow credentials for each role. A worker that drafts requests should not hold an approval credential. An approver should not directly update a grant's remaining budget or activate a new policy version through an unrelated admin endpoint. The executor must not accept a plain-text instruction, a model-generated approval token, an email reply alone or a client-supplied flag such as bypass_policy=true.
An exception reference is a lookup key, not a bearer credential. Every lookup and use is independently authorized for the resource and tenant. The actual enforcement point must have trustworthy current grant and policy information; a remote approval response does not make a subsequent external action atomic.
3. Define the request and issued grant separately#
A request records the deviation sought, not permission already granted. A useful typed request includes the canonical requester and intended beneficiary, tenant, exact resource/action, waivable rule and current version, requested magnitude and duration, purpose, business impact, alternative options, evidence and limitations, compensating controls and proposal digest. Generate identifiers and trusted times on the server. A proposed amount, order identity or evidence reference generated by AI must be verified against authorized data.
Illustrative approved grant representation:
JSON{ "exception_id": "ex-741", "revision": 1, "request_ref": "request-318", "tenant_id": "tenant-a", "beneficiary_actor": "buyer-17", "resource_ref": "purchase-order-84", "action": "commit_expedited_freight", "rule_id": "freight.normal_charge_limit", "policy_version": "procurement/v12", "approved_request_digest": "illustrative-sha256", "not_before": "2026-01-15T10:00:00Z", "expires_at": "2026-01-15T14:00:00Z", "currency": "USD", "per_charge_cap_minor": 20000, "total_allowance_minor": 30000, "approval_refs": ["approval-91"], "required_controls": ["approved_supplier", "purchase_order_open"], "revocation_epoch": 0 }
The schema is illustrative, not a ready-to-deploy authorization protocol. Money is expressed in integer minor units with explicit currency. The approved terms are immutable. Remaining allowance, revocation and derived effective state can evolve in separate protected records or transactional projections. Include a unique grant identity and exact approved terms, including whether the allowance counts the full affected amount or only the excess over normal policy. This lesson's fixture counts the full amount of each above-normal charge, not the excess.
Avoid broad predicates such as "any future freight order for this buyer." If a standing exception is truly necessary, define its closed subject set or precisely authorized scope, independent caps, time limit and periodic review. Do not reevaluate an originally frozen selection as a dynamic query that can silently expand. Changes to resource, purpose, duration, amount, model-generated action or required controls may invalidate approval and require a new request.
A digital signature or digest can establish integrity of protected terms under appropriate key management. It cannot establish current eligibility, remaining allowance or revocation by itself. A signed token with a long expiration is insufficient for a workflow requiring immediate revocation or cumulative consumption.
4. Assess risk and obtain accountable approval#
Risk assessment must be linked to the actual deviation. Identify the normal control's purpose, possible failure modes, affected parties, financial and operational exposure, worst credible outcomes, uncertainty, reversibility, and whether a safer permitted alternative exists. Determine whether the requested exception is necessary and proportionate. Include counter-evidence, not only the AI's strongest rationale.
For the freight example, assume the standard option costs $90, the expedited option $180, and a missed component delivery creates a hypothetical $600 loss. A validated decision-support estimate puts the probability of this loss at 0.4 under standard shipment and 0.1 under expedited shipment. Under the simplified loss model, expected costs are $90 + 0.4 × $600 = $330 and $180 + 0.1 × $600 = $240. Expected benefit is $90. If the risk reduction is only 0.1 instead of 0.3, the extra $90 freight cost exceeds the $60 expected benefit. These numbers are conditional assumptions, not an observed causal benefit. Validate the intervention assumptions and uncertainty; a predictor trained only on standard shipping outcomes does not establish what expedited shipping will achieve.
Even a strong estimated benefit does not override the hard limit. An approver needs sufficient evidence and authority to accept the residual risk. Required evidence could include verified order status, quoted shipping charge and currency, alternatives, operational deadline and confirmation of eligible supplier. If evidence is missing or stale, hold. The reviewer should see precisely which rule would be waived and which remain in force.
Approval must be an authenticated, attributable decision tied to exact terms. Define role, resource scope, financial/risk tier, delegation period, conflict-of-interest rules and quorum. Separate requester, beneficiary and approver when policy demands it; prohibit self-approval and evaluate effective identities, not merely different usernames or service accounts controlled by the same principal. For high-risk categories require independent second approval or specialized review as prescribed. Two reviewers from the same compromised authority chain are not automatically independent.
Bind approval to the immutable request digest and policy release. An edit after approval creates a new revision; it does not inherit prior consent. Silence, a timeout or a model's claim that a manager agreed is not approval. Store reviewer ID, verified role/delegation, decision time, approval scope, reasons and obligations. Record rejection and requests for changes as well as grants. Do not notify reviewers with confidential raw prompts or secret values.
5. Lifecycle, expiration and renewal#
This diagram describes an exception lifecycle, not a universal implementation. A renewal creates a new request and new grant with predecessor linkage; the original remains expired, revoked, exhausted or historically active for the period in which it was valid. Do not reset remaining allowance or extend expiry in place. The approval request itself can have a deadline distinct from the eventual grant. An approval made after the request deadline requires revalidation and a new authorized request if the governing contract demands it.
Use half-open validity intervals [not_before, expires_at). At exactly expires_at a new use is not allowed. Establish trusted clock semantics and consistent UTC timestamps, including how clock uncertainty is handled. A browser's countdown is informational. Use a conservative time bound where clock skew matters.
Expiration is checked synchronously whenever a new effect is authorized. A scheduled expiry sweeper is useful for notifications, UI cleanup, index maintenance and removing stale derived entitlements, but a late scheduler must never extend permission. Maintain indexes for upcoming deadlines and use idempotent expiry transitions; a retry of the same expiry event must not create duplicate downstream actions. Where revoked grants support ongoing sessions or leases, independently enforce the maximum revalidation/termination time and stop future protected operations.
Clarify what expiry governs. An exception that authorizes *committing a purchase* by 14:00 may allow already committed fulfillment after 14:00 if the original contract says so. An exception that authorizes *continuing access* must be checked during access and terminated under its revocation/expiry SLA. An exception for a long-running workflow may need checks at each protected dispatch. Do not make a blanket claim that all already initiated activities are undone at expiry.
Renewal is a new risk decision: assess whether need persists, evidence and authority are current, previous uses stayed within terms, and the policy still allows the exception. Repeated renewals may indicate a default policy that needs formal review. Do not silently convert them into permanent access.
6. Deterministic conflict resolution and inheritance#
A defensible evaluation sequence is:
- Authenticate and authorize the actor and resource; validate the operation and its current state.
- Apply all applicable mandatory constraints. A mandatory denial is terminal for that attempted action.
- Determine which ordinary policy predicates fail, using trusted policy and facts.
- For each failing waivable predicate, verify an explicitly applicable current grant and its obligations.
- Enforce all cumulative limits and required controls; if any required predicate remains unsatisfied, deny or hold.
- Independently validate and commit the authorized operation, recording the actual grant usage.
This is an abstract ordering; the concrete policy decision must preserve the approved precedence semantics. If an action violates both a waivable freight threshold and a non-waivable supplier hold, the freight exception does not help. If it violates a waivable threshold and an independently required review rule, one exception does not waive the other. A tenant's exception cannot override the platform's non-overridable restriction.
Overlapping grants are dangerous. Define a deterministic grant selection rule and prohibit combining allowances unless stacking is explicitly approved. A $200 per-charge grant plus a second $200 grant does not automatically permit a $400 charge. A global aggregate limit or per-resource cap remains in force even across multiple grants and actors. If two exceptions impose incompatible conditions, do not pick the more permissive one; resolve with the policy owner or hold. Track shared budgets across grants where policy requires them, rather than merely per-record counters.
Version the baseline policy and the exception-eligibility rules independently where necessary. One conservative policy is to invalidate every old grant on a relevant policy epoch change. A more available design may permit an explicitly approved compatibility relation, preserving a grant only if current policy still recognizes the same rule and obligations. Never assume a rollback to older policy reinstates a revoked grant. Record the compatibility decision with authority and provenance.
7. Enforce at the transactional boundary#
The enforcement point must check the trusted action and actual amount against the grant, not merely a model's requested amount. Use atomic updates, appropriate isolation, row locks or conditional operations and constraints for shared budgets. In a single database transaction, lock/check the relevant policy, grant and resource state, verify remaining allowance, consume it and write a receipt with the resulting effect intent. Avoid holding locks during inference, human review or external calls. The receipt and budget debit must be atomic for the chosen local consistency contract.
A read-then-write allowance check in independent transactions can overspend. Two workers may each observe $150 remaining and each spend $120. In a guarded transaction, only one such operation can succeed if the budget is $150. A local database transaction does not cover an unrelated external carrier service; use durable dispatch intent, downstream idempotency and reconciliation for uncertain external effects. If policy requires the actual carrier commitment before expiry, a previously written dispatch intent is not enough: enforce a compatible deadline at dispatch and external commitment boundary or obtain a new authorized plan. State where the grant is consumed: reservation, local commitment or external effect, and how cancellation or uncertainty affects release of allowance. Never restore allowance just because a timeout occurred.
Revocation must be serialized with competing new commitments under the agreed authority protocol. If revocation commits first, the new use must fail. If a valid use commits first, revocation prevents subsequent uses; that prior effect may need remediation. A remote policy service whose response is cached before a separate write cannot provide strict instantaneous revocation without a coordinating consistency mechanism. For strict effects, keep authoritative grant state at the resource owner or implement a proven fence/transaction protocol. Where only eventual revocation is feasible, document the worst-case exposure and obtain approval for that weaker contract.
Use a stable tenant-scoped intent key and exact action identity. If the original commitment succeeded but its response was lost, an authorized receipt lookup returns the original outcome without consuming allowance again. Expiry should not turn the historical receipt into a new failure or authorize another effect. A repeated key with different material inputs is a conflict. Receipt visibility remains subject to current access; historical success is not current eligibility.
8. Worked allowance and concurrency scenario#
Suppose the grant allows freight charges above the ordinary $100 limit, at most $200 per charge and $300 in total, valid from 10:00 inclusive until 14:00 exclusive. The tenant and buyer may use it only for purchase order 84. The hard ceiling is $300 per charge, and blocked orders are always denied.
| Request | Current balance | Result | New balance |
|---|---|---|---|
| $90 ordinary charge | $300 | Ordinary eligible; no exception debit | $300 |
| $150 at 10:00 | $300 | Approved scoped use | $150 |
| Same intent retry | $150 | Original receipt; no second debit | $150 |
| New $151 charge | $150 | Insufficient exception allowance | $150 |
| New $150 charge | $150 | Eligible if all other controls pass | $0 |
| New $110 charge | $0 | Exhausted | $0 |
| Any new above-limit use at 14:00 | Any | Expired | Unchanged |
The table describes only the exception budget, not the organization's overall spending control. Ordinary charges must also obey separate purchase-order and aggregate spending limits. In this design a user cannot evade an aggregate obligation by splitting a $250 charge into three ordinary charges: evaluate the real economic transaction and shared aggregate policies independently. Where charges are permitted installments, define that domain contract explicitly rather than banning all legitimate partial payments.
For a competing $150 debit and $120 debit with $150 remaining, only the first committed valid use can succeed. The loser must get an explicit insufficient-balance or conflict result, not a quietly reduced amount. If revocation occurs concurrently, the serialized authoritative order determines whether a new use was eligible. The audit records which outcome actually occurred, not merely which API call was sent first.
9. Tested implementation: exception-aware local commitment#
The standard-library Python fixture below demonstrates one waivable per-charge limit, one hard cap, blocked-order denial, tenant and actor scope, a current reviewer role, strict policy-version compatibility, expiration, revocation, allowance consumption, an idempotent receipt and rollback on a deliberately injected write failure. Values in the fixture are integer teaching units; production monetary amounts need explicit currency and integer minor units.
PYTHONimport sqlite3 def commit(db, tenant, actor, order, key, amount, exception, now): # Identities and time are supplied by a trusted server in this fixture. if type(amount) is not int or amount <= 0: return 'INVALID' db.execute('BEGIN IMMEDIATE') try: def finish(status): db.commit() return status if not db.execute('SELECT 1 FROM grants WHERE tenant=? AND actor=? AND role=\'buyer\'', (tenant, actor)).fetchone(): return finish('DENIED') receipt = db.execute('SELECT actor,order_id,amount,exception_id FROM receipts ' 'WHERE tenant=? AND intent=?', (tenant, key)).fetchone() if receipt: return finish('COMMITTED' if receipt == (actor, order, amount, exception) else 'KEY_CONFLICT') row = db.execute('SELECT blocked FROM orders WHERE tenant=? AND id=?', (tenant, order)).fetchone() if row is None or row[0]: return finish('HARD_DENY') version, normal, ceiling = db.execute('SELECT version,normal,ceiling FROM policy').fetchone() if amount > ceiling: return finish('HARD_DENY') if amount > normal: e = db.execute('SELECT actor,order_id,reviewer,version,starts,ends,cap,remaining,revoked ' 'FROM exceptions WHERE tenant=? AND id=?', (tenant, exception)).fetchone() if not e: return finish('EXCEPTION_REQUIRED') a, o, reviewer, pv, start, end, cap, remaining, revoked = e if (a != actor or o != order or reviewer == actor or pv != version or revoked or not start <= now < end or amount > cap or amount > remaining or not db.execute('SELECT 1 FROM grants WHERE tenant=? AND actor=? AND role=\'approver\'', (tenant, reviewer)).fetchone()): return finish('EXCEPTION_INVALID') db.execute('UPDATE exceptions SET remaining=remaining-? WHERE tenant=? AND id=?', (amount, tenant, exception)) db.execute('INSERT INTO receipts VALUES (?,?,?,?,?,?)', (tenant, key, actor, order, amount, exception)) return finish('COMMITTED') except BaseException: db.rollback() raise db = sqlite3.connect(':memory:', isolation_level=None) db.executescript('''CREATE TABLE policy(version INTEGER,normal INTEGER,ceiling INTEGER); INSERT INTO policy VALUES(1,100,300); CREATE TABLE grants(tenant TEXT,actor TEXT,role TEXT,PRIMARY KEY(tenant,actor,role)); INSERT INTO grants VALUES('a','buyer','buyer'),('a','lead','approver'); CREATE TABLE orders(tenant TEXT,id TEXT,blocked INTEGER,PRIMARY KEY(tenant,id)); INSERT INTO orders VALUES('a','o1',0),('a','o2',0),('a','blocked',1); CREATE TABLE exceptions(tenant TEXT,id TEXT,actor TEXT,order_id TEXT,reviewer TEXT, version INTEGER,starts INTEGER,ends INTEGER,cap INTEGER,remaining INTEGER,revoked INTEGER, PRIMARY KEY(tenant,id)); INSERT INTO exceptions VALUES('a','e1','buyer','o1','lead',1,10,20,200,300,0); CREATE TABLE receipts(tenant TEXT,intent TEXT,actor TEXT,order_id TEXT,amount INTEGER, exception_id TEXT,PRIMARY KEY(tenant,intent));''') def run(key='k', amount=150, now=15, order='o1', exception='e1', tenant='a', actor='buyer'): return commit(db, tenant, actor, order, key, amount, exception, now) assert run(actor='stranger') == 'DENIED' assert run(tenant='b') == 'DENIED' assert run(amount=True) == 'INVALID' assert run(order='blocked') == 'HARD_DENY' assert run(amount=301) == 'HARD_DENY' assert run(exception=None) == 'EXCEPTION_REQUIRED' assert run(order='o2') == 'EXCEPTION_INVALID' assert run(now=9) == 'EXCEPTION_INVALID' assert run(now=20) == 'EXCEPTION_INVALID' assert run(amount=201) == 'EXCEPTION_INVALID' assert run(key='ordinary', amount=100, exception=None) == 'COMMITTED' assert run(now=10) == 'COMMITTED' assert run(now=99) == 'COMMITTED' assert run(amount=151) == 'KEY_CONFLICT' assert db.execute('SELECT remaining FROM exceptions').fetchone()[0] == 150 assert run(key='too-much', amount=151) == 'EXCEPTION_INVALID' db.execute('UPDATE exceptions SET revoked=1') assert run(key='revoked') == 'EXCEPTION_INVALID' db.execute('UPDATE exceptions SET revoked=0,reviewer=\'buyer\'') assert run(key='self') == 'EXCEPTION_INVALID' db.execute('UPDATE exceptions SET reviewer=\'lead\'') db.execute('DELETE FROM grants WHERE role=\'approver\'') assert run(key='lost-role') == 'EXCEPTION_INVALID' db.execute("INSERT INTO grants VALUES('a','lead','approver')") db.execute('UPDATE policy SET version=2') assert run(key='old-policy') == 'EXCEPTION_INVALID' db.execute('UPDATE exceptions SET version=2') # fixture-only fresh approval simulation # Inject a write failure after budget debit; both writes must roll back. db.execute("CREATE TRIGGER fail_receipt BEFORE INSERT ON receipts BEGIN SELECT RAISE(ABORT,'fault'); END") try: run(key='retry') except sqlite3.IntegrityError: pass else: raise AssertionError('fault not injected') assert db.execute('SELECT remaining FROM exceptions').fetchone()[0] == 150 assert db.execute("SELECT count(*) FROM receipts WHERE intent='retry'").fetchone()[0] == 0 db.execute('DROP TRIGGER fail_receipt') assert run(key='retry') == 'COMMITTED' assert db.execute('SELECT remaining FROM exceptions').fetchone()[0] == 0 assert run(key='exhausted') == 'EXCEPTION_INVALID' print('26 checks passed')
Observed local execution using Python 3.13.5:
26 checks passedThe run contains 25 assertions and one expected-exception check. It verifies denied and cross-tenant callers, invalid Boolean amount, blocked order and hard cap, missing grant, wrong order, not-yet-valid and exact expiration boundary, per-use cap, ordinary commitment, inclusive start, idempotent retry after expiry, conflicting intent reuse, remaining balance, revocation, self-approval, lost approver role, policy change, rollback of the debit when receipt insertion fails, successful retry and exhausted allowance.
The code assumes that identities and evaluation time come from trusted server context. It uses one in-memory SQLite connection and a single policy row. The stored exceptions represent already issued grants; the example does not implement the approval-writing service. The direct test updates to reviewer, revocation and version are fixture setup for independent cases, not legitimate production renewal or unrevocation. The fixture has coarse buyer grants only; production must verify object-level authority, actual order state and revision, current approval scope, grant purpose/action and policy rule ID, and bind the approved digest and actual input. It does not enforce global purchase budgets or prevent splitting an economic transaction; those are separate non-waivable invariants required by the production design. The receipt's exception reference is the request reference even on an ordinary path; production should separately record the grant actually consumed, including an explicit no-grant-used value and the consumed amount. A retry returns the existing commitment only after the current coarse buyer check; production needs current receipt-specific authorization. The code does not record failed attempts, expiry events, evidence, all applicable approvals or an outbox. It does not execute an actual purchase.
BEGIN IMMEDIATE serializes write access for this local database. The trigger aborts receipt insertion after the allowance update, and the exception handler rolls back both. The test genuinely verifies that selected local failure boundary, but does not prove multi-connection behavior, distributed revocation, crash durability, real identity checks, external effect delivery or timing under production clocks. A supplied now is fixed for the teaching transaction; the real system must establish its time-of-use semantics, including time spent waiting for locks and any downstream deadline. With indexed keys each request uses a bounded number of database operations; contention on shared allowance rows may dominate throughput. The example is not a performance benchmark.
10. Revocation, expiry automation and downstream remediation#
Revocation may be initiated by the policy owner, authorized risk owner or a governed emergency controller. Reasons include changed facts, detected abuse, compromised reviewer authority, supplier hold, policy update or withdrawal of business need. Persist actor, reason, timestamp, scope and monotonic state version. Invalidate derived authorization and caches through versioned events, but enforce current state at the protected effect boundary. A delayed grant-activated event must not reactivate a revoked grant.
The expiry worker can scan indexed deadlines, conditionally mark due grants expired and emit notification intents. Handle duplicate jobs, delayed delivery and concurrent revocation. If expiration and revocation are both applicable, preserve the actual lifecycle transitions and effective denial reason under the defined precedence. Do not depend on a cron job's precision for enforcement.
For already committed effects, preserve the original decision and approval. Determine whether continued work remains permitted and whether a correction, cancellation, reinspection, reconciliation or compensating transaction is required. Revocation of a grant cannot unsend a completed shipment or erase an external financial obligation. Make unresolved effects visible to responsible operators. An unused reserved allowance may be released only after trustworthy confirmation that the reserved operation cannot still commit, according to the reservation contract.
11. Auditability and user interaction#
Keep the following records linked by stable identities:
| Record | Evidence |
|---|---|
| Rule catalog | Exact policy and exception eligibility version |
| Exception request | Requested terms, purpose, evidence and requester |
| Approval | Approver identity, delegated authority, exact reviewed terms, rationale and time |
| Grant | Immutable terms, scope, valid interval, limits and required controls |
| Lifecycle event | Activation, revocation, expiry, renewal linkage and reason |
| Consumption receipt | Actual operation, amount, balance delta, policy and grant identity |
| Effect receipt | What happened downstream, including unresolved outcome |
| Review/remediation | Investigated misuse, correction and accountable owner |
Protect append-only audit records from unauthorized mutation, minimize sensitive data, and use retention rules appropriate to the purpose. A hash chain or protected append-only store may improve tamper evidence under its threat model; neither proves that the original reviewer made a sound decision. Store relevant evidence references and verification results rather than indiscriminately copying raw documents and model prompts.
The user interface should show "Exception required," "Awaiting independent approval," "Approved for order 84 until 14:00; $150 remaining," "Expired," or "Revoked" with meaningful reason codes. A previous approval is not a permanent green badge. Show exactly which action is covered and which mandatory rules still apply. At the point of use, display whether the request is currently eligible and ask for fresh review if the action changed. Preserve the difference between approval, commitment and fulfillment. The notification and resumption infrastructure is developed in ASD-046; it must carry these semantics rather than invent them.
12. Prevent exception abuse and operational drift#
The main failure mode is normalization of deviance: employees learn that submitting an exception always produces approval, AI learns to write increasingly persuasive rationales, and a temporary exception becomes the default.
Use bounded eligible exception categories and explicit risk tiers. Rate-limit or prioritize requests under a documented policy without silently approving excess demand. Detect repeated use, near-threshold values, split purchases, reused evidence, reviewer concentration, unusual grant duration, expired-use attempts and repeated renewals. These are investigation signals, not proof of abuse. Protect the investigation from biased or incomplete evidence; qualified reviewers should determine the appropriate disposition.
Prevent scope laundering. A user must not obtain a broad exception for a low-risk operation and reuse it on a more consequential action, another tenant or a modified proposal. Require structured terms, resource binding, current authorization and independent verification at the sink. Treat untrusted model output and retrieved instructions as data. A generated rationale cannot alter the policy classification or reviewer role. Limit the AI's tools to eligible request creation and authorized read access; protect approval and grant administration separately.
For emergency procedures, define an explicit bounded emergency policy with appropriate current authorization, narrow scope, hard limits, short expiry and accountable post-event review. If independent approval is ordinarily required, do not silently skip it merely by labeling a request urgent; only the governing authority may define a permitted emergency alternative. Mandatory controls remain mandatory. Test emergency pathways and ensure they cannot be reused as ordinary shortcuts.
13. Capacity, economics and monitoring#
Imagine 10,000 attempted procurement decisions per day, with 4% requesting an exception. That is 400 requests/day. At an illustrative four minutes per initial review, the direct review effort is 1,600 minutes or 26.67 reviewer-hours/day, excluding escalations, documentation and interruptions. If each reviewer has five effective review-hours/day, at least six reviewer equivalents are needed even under ideal averages. Actual staffing requires headroom for peaks and specialist cases. If 10% need a separate ten-minute specialist review, that adds 400 minutes or 6.67 specialist-hours. Do not infer response-time guarantees from these daily averages.
If request volume rises because an AI agent now proposes an exception for every unavailable preferred option, reduce unnecessary proposals by improving baseline policy explanation and alternative selection. Do not automate the acceptance of previously human-reviewed deviations just to reduce backlog. Reassess whether the rule itself should change formally if valid exceptions dominate; changes must go through the accountable policy process and independent risk evaluation.
Monitor:
| Metric | Why it matters |
|---|---|
| Requests per eligible decision, by rule and purpose | Detect changing need or exception overuse |
| Approval, denial, withdrawal and unresolved rates | Review burden and possible drift |
| Review queue age and deadline misses | Operational viability |
| Grant duration, unused allowance and renewal frequency | Persistent or excessive authorization |
| Actual committed uses and aggregate amounts | Exposure, not merely granted ceilings |
| Denied expired/revoked/wrong-scope attempts | Enforcement and abuse signals |
| Revocation-to-enforcement lag | Actual authority freshness |
| Mandatory invariant failures | Immediate containment and investigation |
| Duplicate receipts, budget mismatch and unresolved effects | Integrity and reconciliation |
| Outcome loss, benefit and reviewer disagreement | Whether exceptions deliver legitimate value |
Count by logical intent or grant as appropriate. A denied retry is not necessarily a new request; an approved grant may never be used. Track outcomes of ordinary and exception paths, respecting intervention and selection effects. Do not equate approval rate with correctness or low revocation count with effective governance.
For scale, cache relatively stable policy metadata and approved terms only within the consistency contract. Mutable budget and revocation checks for strict commitments must be authoritative. Partition by tenant and real allowance/aggregate scope, use appropriate indexes for grant lookup and expiry, and handle hot shared budgets explicitly. Optimizing by independent local counters without a coordinated global cap can overspend. Reservation-based allocation may improve throughput if the aggregate invariant and reservation recovery are proven.
14. Failure and production test matrix#
| Failure or adversarial condition | Required behavior |
|---|---|
| AI proposes a waiver of a hard constraint | Deny; no approval request can authorize it |
| Approver acts outside delegated risk tier | Reject approval |
| Requester approves own request where prohibited | Reject separation-of-duties violation |
| Request edited after approval | New approval for exact terms |
| Grant from different tenant/order/action | Deny and log scoped reason |
| Exact expiry boundary or scheduler delay | Deny new use regardless of stored active label |
| Revocation races with commitment | Defined serialized outcome; no stale permission |
| Policy change invalidates grant | Revalidate or hold; never restore revoked authority |
| Two workers consume same balance | Guarded debit prevents exceeding allowance |
| Receipt insertion fails after debit | Roll back both local writes |
| External acknowledgment lost | Resolve effect outcome; avoid duplicate purchase or premature refund |
| Review unavailable | Hold or approved ordinary alternative, not implicit approval |
| Renewed grant overlaps old one | Enforce explicit predecessor and aggregate-budget policy |
| Receipt replay with altered payload | Conflict; no new effect |
| Cache/invalidation transport fails | Use approved current-authority contract or deny affected protected work |
Test all non-overridable invariants independently of model behavior. Include role and delegation boundaries, expired requests, invalid signatures/references, cross-tenant and cross-resource access, malicious AI-generated justifications, request mutation, explicit policy precedence, exact time boundaries, clock skew, renewals, exhaustion and overlapping grants. Execute concurrency tests against the real authoritative datastore and effect owner: competing consumption, concurrent revocation, isolation/serialization retries, duplicate submission, state changes between review and commit, worker crash and ambiguous external effect. Verify all audit links and lifecycle event ordering. Test actual recovery and notification paths, not just unit tests.
Evaluate the AI's assistance separately: factual grounding of rationale, recognition of prohibited deviations, quality of alternative proposals, calibrated decision-support estimates where relevant, and unauthorized data exposure. Passing these evaluations never grants the model approval authority. The local fixture demonstrates selected local logic only; deployed validation must cover these broader conditions.
15. Interview-ready answer and module conclusion#
I would first classify policies into non-overridable invariants, ordinary defaults that have an explicit exception authority, and normal preferences. I would define the exact exception contract: waivable rule, tenant, requester and beneficiary, resource, action, amount and cumulative cap, evidence, obligations, policy version, validity interval and accountable reviewer authority. AI could draft the request and identify safer alternatives, but could not create or approve the grant.
I would separate request, independent approval, issued grant, mutable consumption and lifecycle records. I would implement explicit approval and separation-of-duties rules and bind the decision to immutable terms. Every protected effect would check current actor/resource authority, mandatory constraints, grant scope, policy compatibility, revocation, expiration and remaining allowance at the authoritative boundary. It would atomically consume the allowance and record a durable receipt, with idempotent retry and separate reconciliation of external effects. Expiry would be checked on use, not depend on a scheduled job. Renewal would require a new approved grant. Revocation would prevent future uses under a defined consistency contract, with remediation for past commitments where necessary.
I would monitor exception frequency, reviewer capacity, concentration, residual risk, abuse signals and actual outcomes. Repeated legitimate exceptions would trigger formal policy review, not permanent invisible overrides. Finally I would test the mandatory and temporal boundaries, actual concurrency and failure recovery, independent authorization and evidence lineage.
Module 11's unifying lesson is that AI components may evolve independently only if their contracts are explicit and their authority is bounded. A result can be versioned, uncertain, stale or corrected; an architecture can be configurable and migrated progressively; but an exception must never turn those flexible behaviors into a way around the governing obligations.
References and research transparency#
The authorized offline research exception applies. These sources identify established policy, access-control, risk, transaction and provenance guidance. NIST controls such as separation of duties and least privilege inform the design; the fictional procurement example is not a claim of compliance with any particular framework. Live reference contents, URL availability and the Supabase changelog could not be checked. Three standard triple-backtick Mermaid diagrams were structurally reviewed; no parser or live frontend rendering was tested. The exact Python fixture was executed on Python 3.13.5, with 25 assertions and one injected failure check passing. No actual model, external purchasing API, distributed authorization, concurrency benchmark, security assessment or production workflow was exercised. All scenarios, thresholds and monetary values are hypothetical.
- NIST SP 800-53 Rev. 5 — Security and Privacy Controls for Information Systems and Organizations
- NIST SP 800-207 — Zero Trust Architecture
- NIST AI Risk Management Framework 1.0
- NIST SP 800-30 Rev. 1 — Guide for Conducting Risk Assessments
- Open Policy Agent — Policy Language
- OMG — Decision Model and Notation
- OWASP — Authorization Cheat Sheet
- IETF RFC 3339 — Date and Time on the Internet
- PostgreSQL — Transaction Isolation
- PostgreSQL — Explicit Locking
- SQLite — Transaction Documentation
- Amazon Builders' Library — Making retries safe with idempotent APIs
- W3C — PROV-DM: The PROV Data Model
References
- 1.
- 2.
- 3.
- 4.
- 5.Open Policy Agent — Policy Languageopenpolicyagent.org
- 6.
- 7.OWASP — Authorization Cheat Sheetcheatsheetseries.owasp.org
- 8.IETF RFC 3339 — Date and Time on the Internetrfc-editor.org
- 9.PostgreSQL — Transaction Isolationpostgresql.org
- 10.PostgreSQL — Explicit Lockingpostgresql.org
- 11.SQLite — Transaction Documentationsqlite.org
- 12.
- 13.
Related questions
Explore other topics:Forward Deployed EngineeringMachine LearningMLOpsPython