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

# OACP Operator Runbook

> Grantex operator runbook for authority requests, cache safety, launch checks, and rollback.

# OACP Operator Runbook

Canonical end-to-end flow: [OACP authority overview](./overview). Launch closure source of truth: [OACP Runtime Launch Closure PRD](./runtime-launch-closure-prd).

## Provision AgenticOrg Authority Access

1. Store `COMMERCE_C6Z_AUTHORITY_SERVICE_TOKEN` through the production secret path.
2. Add the AgenticOrg tenant id to `COMMERCE_C6Z_AUTHORITY_SERVICE_TENANTS`.
3. Deploy or restart the Grantex auth service with both values available.
4. Submit a fixture `POST /v1/commerce/oacp/c6z/authority-requests` for that tenant.
5. Confirm `artifact_count = 11`, or record the exact refusal/blocker.
6. To roll back, remove the tenant id from `COMMERCE_C6Z_AUTHORITY_SERVICE_TENANTS` and rotate the token if there is any suspicion of exposure.

Never put Shopify tokens, provider credentials, payment credentials, raw provider payloads, checkout links, raw POS callbacks, or webhook secrets in Grantex artifacts or logs.

## Smoke Tests

```mermaid theme={null}
flowchart TD
  start[Start] --> token[Verify service token and tenant allowlist]
  token --> config[Confirm AgenticOrg merchant config is tenant/merchant/seller scoped]
  config --> request[Submit fixture authority request]
  request --> artifact[Confirm 11 artifact families or expected blocker]
  artifact --> verify[Run artifact verifier checks]
  verify --> adapters[Inspect adapter mapping payload]
  adapters --> cache[Ask AgenticOrg to cache and answer from source labels]
  cache --> purchase[Confirm purchase request returns handoff or blocker]
```

## Checklist

| Check                       | Command or evidence                                                                                                        |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Authority route exists      | `apps/auth-service/src/routes/commerce-oacp-runtime.ts`                                                                    |
| AgenticOrg tenant allowlist | `COMMERCE_C6Z_AUTHORITY_SERVICE_TENANTS` contains only approved tenant ids                                                 |
| AgenticOrg service token    | `COMMERCE_C6Z_AUTHORITY_SERVICE_TOKEN` is present only via secret manager                                                  |
| Artifact tests pass         | `npm --prefix apps/auth-service test -- commerce-c6z-runtime-artifact-authority.test.ts`                                   |
| Adapter tests pass          | `npm --prefix apps/auth-service test -- commerce-c6w4-oacp-adapter-previews.test.ts`                                       |
| Conformance gate            | `node scripts/commerce-c6oe-preview-conformance-gate.mjs --mode pr`                                                        |
| Guardrail scan              | Search changed docs for stale or overclaim wording.                                                                        |
| Merchant config boundary    | Confirm Shopify is runtime-supported and WooCommerce/ERP/bank/custom provider configs are pending-adapter unless approved. |

## Rollback

1. Remove the AgenticOrg tenant from `COMMERCE_C6Z_AUTHORITY_SERVICE_TENANTS`.
2. Rotate the service token if compromise is suspected.
3. Ask AgenticOrg to stop refreshing artifacts and mark affected cache records stale.
4. Leave existing historical artifacts reviewable for audit/export.
5. Publish an operator note with affected tenants, merchant ids, artifact families, and timestamps.

## Refusal Copy

Use exact blockers: missing source evidence, stale artifact, unsafe executable request, provider capability missing, tenant not allowlisted, or authority temporarily unavailable.
