- • Every NS write needs HITL · standing invariant
- • X-Edit-Token required on /decide
- • Approval is auditable (chat_decision_audit)
- • Direct writes that bypass HITL mirror back into proposed_actions (R379)
- • propose_price_change · propose_vendor_item_match · propose_action_*
- • matches the HITL TOOL TEMPLATE in src/index.ts (~line 3947)
- • tool returns action_id; never writes to NS directly
- • 5 propose_* tools added this session (Phases 14-19)
- • ns_pending_pushes is the durable drain table
- • NS_PUSH_QUEUE = CF Queue with DLQ + retries
- • Consumer hits NS RESTlet under TBA OAuth1
- • Applied rows update both pend + proposed_actions
- • PushMutexDO prevents concurrent pushes per entity
- • CostCapDO caps per-day AI + NS spend
- • Audit log writes to chat_decision_audit
- • Failed pushes surface in /api/proposed-actions + admin dashboard