# Safety Gates and Result Semantics ## Before any write Require all applicable gates: 1. The operation matches the canonical schema and exactly one action. 2. Required business fields and existing identifiers are present. 3. Product/customer/route/OP/sales/parent mappings are unique or explicitly resolved by deterministic runtime logic. 4. `submit_mode` remains `dry_run` until local authorization enables execution. 5. Duplicate checks, task/profile lock, session readiness, and sender authorization pass. 6. The route has a verified form/API contract and post-operation query. 7. A live browser preflight and submit-intercept evidence exists for a new write route. The Agent or Skill must not set `allowRealSubmit`, credentials, whitelist entries, authorization codes, browser selectors, or cookies. ## Result meanings | Result | Meaning | Next action | |---|---|---| | `dry_run` | Valid plan; no ERP write | Review plan or authorize a separate execution. | | `operation_dry_run_completed` | Read-only browser/context probe completed | Use the evidence to decide the next technical step. | | `blocked` | A required rule, capability, safety, or authorization gate failed | Fix the named blocker; do not claim success. | | `execution_uncertain` | Transport/page result does not prove durable state | Re-query registry/ERP before retrying. | | `completed` | Durable identifier/artifact and post-operation verification exist | Return a safe business summary. | | `post_save_recovery_required` | Save is verified; export/delivery failed | Route only to export recovery with `neverResave=true`. | ## Customer-facing boundary Return only business status, safe identifiers, artifact type, next step, and necessary blocker. Never return selectors, stack traces, credentials, cookies, authorization codes, internal audit paths, or traveler PII.