Skip to content

Automatic translation — the Portuguese version is the reference. View in Portuguese

Updated on 2026-09-08

Human approval and auditing

AI proposes, a human confirms — how approval (including dual approval), idempotency and the AI audit trail work.

On this page (7)

One principle runs through all of ingestia.io's AI: the AI proposes; a human confirms. Nothing material happens without an authorized person pressing the button — and everything the AI does leaves an audit trail. This page brings together how that works in assisted generation and in actions/writeback, and what gets recorded.

Action and egress switches

The approval state machine is covered by automated tests. The switches (ACTIONS_DISABLE for actions, AI_EGRESS_DISABLE for AI egress) are optional and are OFF when not configured — in other words, without explicit configuration, execution is on, not blocked. And there is no case-by-case release gate operated by us anywhere in the product. Anyone who wants the conservative posture needs to turn the switch on deliberately.

1. The AI never publishes on its own#

In assisted generation, the AI returns a structured artifact (measure, visual, dashboard skeleton) along with a validacao field filled in by deterministic code. The preview is the artifact itself; the write only happens when you confirm through the editor's existing actions (addMeasureAction, addWidgetAction, updateWidgetAction, saveModelAction). No write originates from the AI.

The same goes for text-to-SQL: it proposes only SELECT — never DML/DDL —, and you review it before running.

2. Actions and writeback with approval#

For material effects (writing back to a system, triggering an action), there is an approval governance with segregation of duties:

  • Whoever proposes cannot approve their own action.
  • High-impact actions require two distinct approvers (dual approval) — an insider or a compromised account cannot cause damage alone.
  • State flow: pendente → aprovada → executada (with rejeitada, cancelada, falha on the detours).
  • Idempotency: the key is sha256(ação ‖ parâmetros canônicos) — the same action with the same parameters has the same key, and the executor never applies the same effect twice (the parameters are sorted canonically, so the order of the keys does not change the result).

Warning

Actions/writeback are not off by default: the ACTIONS_DISABLE switch only blocks execution when you configure it. There is no case-by-case release by our team. If the posture you want is "nothing material leaves here unless I say so", turn the switch on — do not count on a conservative default that does not exist.

3. AI audit trail#

Everything the AI does is recorded in the audit log, scoped by workspace. The main events:

EventWhat it records
ai.reserva / ai.reserva_liquidada / ai.reserva_canceladaBudget cycle (reservation → settlement).
ai.usageReal cost (tokens × price, in R$) + egress summary.
ai.blockedRefusal due to the budget cap (cost 0) — shows the blocked demand.
AI-assisted generationAssisted generation request, type, and whether it came out as a draft.
questions about the dashboard / dashboard insightsQ&A questions / insights, flagged for refusal/weak evidence.

In addition, every answer includes proveniencia: model, prompt version, real cost (R$) and opId — which links ai.reserva ↔ ai.usage ↔ ai.reserva_liquidada. This lets you correlate an answer in production with the exact prompt and cost that generated it.

4. What is NOT stored#

The product does not keep a "conversation history" with the AI. What remains is the audit trail (usage/cost/refusal) and, for reports, the token counters in the report run record. In other words: you can audit that there was a call, its cost and its provenance — without keeping a chat log.

Who can approve#

  • Confirming generation artifacts and publishing depends on an edit/publish role (see Roles (RBAC)).
  • Approving material actions depends on an approver role (owner/admin); a high-impact action requires two distinct approvers, both different from the person who proposed it.

How to validate#

  1. Nothing publishes on its own

    Ask for a measure in assisted generation and confirm that the write only happens after human confirmation.

  2. Honest draft

    Ask for something impossible and confirm rascunho: true with the errors listed.

  3. Segregation of duties

    On an action that requires approval, confirm that the proposer cannot approve their own action.

  4. Auditing

    Check the audit log for the ai.reserva, ai.usage, ai.blocked events and the proveniencia (opId) linking reservation ↔ usage.

Related#


Last reviewed: 2026-09-08.

Related links