> For the complete documentation index, see [llms.txt](https://rawctx.gitbook.io/rawctx-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rawctx.gitbook.io/rawctx-docs/documentation/answer-evidence/independent-reconciliation.md).

# Independent reconciliation

Independent reconciliation compares answer-audit logs with a short-period reference set from another system of record. Use it to detect completeness gaps without putting rawctx in the inline decision path.

## Choose a useful reference

Prefer a source that is difficult to rewrite in lockstep with answer logs, such as a business-system export, provider usage export, or auditor-controlled extract. Align its decision key with one of:

* `idempotency_key`
* `external_trace_id`
* `external_message_id`

## Create a run

A run covers at most seven days and accepts 1 to 10,000 reference records. Always set one `application_key` and `environment`; an application JWT can reconcile only its bound application and needs `answer_audit:reconcile`.

```json
{
  "source_key": "los-daily-export",
  "source_type": "business_system_export",
  "period_start": "2026-06-12T00:00:00Z",
  "period_end": "2026-06-13T00:00:00Z",
  "application_key": "loan_review_bot",
  "environment": "production",
  "key_field": "idempotency_key",
  "allowed_lag_seconds": 3600,
  "reference_records": [
    {
      "decision_id": "loan-review:app-123",
      "decided_at": "2026-06-12T09:13:00Z"
    }
  ]
}
```

```bash
rawctx reconcile run reconciliation.json --json
rawctx reconcile findings RUN_ID --json
rawctx reconcile proof RUN_ID --output reconciliation-proof.json
rawctx trust verify reconciliation-proof.json --online
```

## Review findings

* **`missing_rawctx`:** a reference decision has no matching answer log.
* **`unexpected_rawctx`:** rawctx has a record absent from the selected reference set.
* **`late_rawctx`:** the matching answer trust leaf was recorded outside the permitted lag window relative to `decided_at`.
* **`duplicate_reference`:** the reference input repeats a decision key.
* **`duplicate_rawctx`:** more than one rawctx record matches a decision key.
* **`unanchored_rawctx`:** the matching answer record has no trust leaf. This is distinct from later external Bitcoin confirmation state.

Run status is `passed` or `failed`. A proof can remain pending until a signed checkpoint covers the reconciliation leaf. Fetch it again after the next checkpoint instead of treating a pending shell as a verified anchor.

## Public-safe boundary

The request carries raw decision identifiers for matching, but persisted findings and proof material are commitment-oriented. Do not put API keys, raw customer exports, personal data, secrets, or private system URLs in payload metadata.

## Honest limit

The completeness and independence of reconciliation depend on its reference source. Reconciliation cannot detect decisions omitted from that source, and it does not prevent a decision from happening.

See the [official reconciliation guide](https://hub.rawctx.dev/docs/reconciliation) for the current production workflow.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rawctx.gitbook.io/rawctx-docs/documentation/answer-evidence/independent-reconciliation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
