Skip to content

Reference

Outcome log and reason codes

What outcomes.jsonl records, the outcome_failed verdict, and the documented reason codes.

View source on GitHub (opens in a new tab)

On this page

The outcome log#

outcomes.jsonl lives at a path you choose. In runtime use, each protected call appends one structural line. The log is for structure only. It never contains arguments, field values, record IDs, response bodies or credentials.

What each line records:

ItemNotes
TimeWhen the call was checked.
Server labelThe label you gave the wrapped server.
Tool nameThe protected tool.
ModeShadow or enforce.
statusThe verdict, written as pass, fail or unknown.
reason_codeThe reason, for example postcondition_satisfied.
Checked field namesThe names of the extracted fields, never their values.
gate_msThe time Fourgate added to the call.

The limited beta documentation names three of these keys: status, reason_code and gate_ms. It describes the others without giving their JSON key names, so this page does too.

fourgate summary renders one or more of these logs as a single local page. See Protect your first tool.

The outcome_failed verdict#

In enforce mode, a confirmed FAIL prepends one verdict to the connector's original content. It has exactly four top-level keys:

KeyDescription
kindoutcome_failed.
toolThe fully qualified tool, for example demo/create_issue.
evidenceStructural facts only, such as reason_code and checked_fields.
recoveryTaken from the approved contract.

The original content, structuredContent and other useful result fields stay behind the verdict.

Reason codes#

Verdicts appear as a status and a reason code, written STATUS / reason_code. These are the codes the limited beta documentation lists.

PASS#

Reason codeMeaning
postcondition_satisfiedThe independent GET found the record and every expected_fields value matched.

FAIL#

Reason codeMeaning
record_missingThe GET returned a status you listed in missing_statuses on every attempt.
field_mismatchThe record exists, but a field differs. The scan report's mismatched_fields shows expected and observed values.

UNKNOWN#

Reason codeMeaning
success_without_record_idThe tool result had no isError, but the ID selector found no ID. No read-back was attempted.
not_success_resultThe tool result had isError: true, or a JSON-RPC error.
readback_unconfirmedThe GET returned another status. evidence.readback.status holds the number.
readback_shape_invalidThe GET returned 200, but an expected_fields path is absent.
readback_error, readback_timeoutA network failure, or the read-back time budget ran out.
required_field_missingAn extract selector other than the ID found nothing.
credential_missingtoken_env is not set. No write was sent.
tool_not_discoveredThe server's tool list does not contain that name. No write was sent.
RuntimeErrorWith tool null: the server failed to start, initialize or list tools.
TimeoutErrorThe call exceeded call_timeout_ms and the scan stopped. The write may have happened.
verifier_errorAt runtime, a verifier error. For fourgate.verify_http, any uncertainty (401/403, an unconfigured status, a timeout, a missing credential, invalid config or input) prints nothing, exits non-zero and is recorded as this. A dry run shows the cause.
verifier_timeoutAt runtime, the 2000 ms budget was exceeded.
verifier_malformedAt runtime, the verifier answered with a reason code that is not allowed.

An UNKNOWN is never a FAIL and never a PASS. After a timed-out write, check the account by hand before any rerun.