Skip to content

Validation and sign-off

A version reaches readers only after it is validated and signed by a tenant administrator who is not its author.

A version’s state is validated when:

  • its table has rows;
  • the golden trap sets of its pattern classes passed and every counted run agreed on them, and the fixed visual tests of its visual classes passed;
  • no chunk failed and no run refused it;
  • when it has a text or contextual class, a person other than its author approved it after reviewing a sample.

A version whose latest runs report failed chunks or a fingerprint refusal is failed. See Materialization.

While a definition is still a draft, and until its version is signed, a person checks it against a validation sample: a handful of whole documents of the collection, each processed whole in the background, with progress per document.

  • One document of every type. The sample first takes one document of every type the collection holds (text PDF, scanned PDF, Word, spreadsheet, presentation, email, plain text, image, audio, video, other), then fills the rest at random. When there are more types than places, the sample grows, so no type goes unreviewed. The draw is deterministic for its seed, which is derived from the definition and recorded, so it can be recomputed and audited.
  • Targeted documents. Once the version is materialized, documents the materialization marked for a look (for example table cells the column rule could not settle) join the sample as targeted items (origin: targeted, with targetReasons), on top of the random ones. They are processed, decided and counted by the sign gate like any other document. They are selected under the grant of the person reading the sample, so an approver reading the author’s version sees them too; a selection the engine refuses adds nothing, and the next read tries again.
  • Changing the sample. A reviewer can add documents by searching the collection, reprocess a document, or replace one with another document of the same type that the platform chooses. A replacement never draws a document whose stored copy failed.
  • Editing a draft keeps the documents and recomputes only the part of the definition that changed (pattern classes or text classes). A version can be created from a draft only with the definition its sample was processed with; the sample then moves to the version, so the people signing see the same documents.

Each document is processed by a background worker that holds it under a lease. While a document is processed, its progress says where it is, step by step:

Step Meaning
queued Waiting for a worker. A document whose lease expired is queued again.
patterns The pattern classes.
model The text classes, through the cell’s language model.

Each step is done, current, pending or skipped (the sample has no class of that kind), and current names the step running now. A work step carries its own count of text fragments (done, total, unit: "fragments"). Each step is counted on its own, so a long model step shows that it moves even while the document’s chunksDone, the progress of its slowest part, does not. progress is null once the document is computed or failed.

"progress": {"current": "model", "steps": [
{"step": "queued", "state": "done"},
{"step": "patterns", "state": "done", "done": 120, "total": 120, "unit": "fragments"},
{"step": "model", "state": "current", "done": 61, "total": 120, "unit": "fragments"}]}

A long document keeps its lease: the worker renews it every third of the lease while it computes, so a dense spreadsheet no longer loses its lease mid-batch. A document claimed again after a lost lease resumes where its stored results end and keeps its step and count. A document whose leases keep expiring ends as attempts_exhausted. The lease length is an operator setting (see Configuration).

What the sample stores is spans per chunk, never the text: opening a document reads it again and is audited before the text leaves. Only a tenant administrator acting as a person sees document text; other roles get counts.

On a materialized version, the sample compares each document’s original with its stored redacted copy: the file a download would serve. Each document shows its review reasons, whether it was read by OCR (scanned), and what the version hides in it per class (hidden, such as {"face": 2, "customer_name": 3}; null when the record does not say, never an invented 0).

For each document, a reviewer records one verdict:

Verdict Meaning
ok Nothing to report. Not allowed when the stored copy cannot be shown.
missing Something that should be hidden is visible.
extra Something was hidden that should not be.
other Any other problem; needs a note.

A missing or extra verdict can be told by pins on the page (up to 20 points, as percentages of the page) instead of, or besides, a note of up to 500 characters. A reviewer can undo their last decision while the sample is open: the withdrawal is appended, nothing is deleted.

Rules of the guided review:

  • The version’s author does not decide on its own sample; only the decisions of the people who validate it count.
  • A decision is given on one definition. When the document’s text changes or the definition changes, earlier decisions are listed as stale and no longer count.
  • A decision on a document that leaves the sample is kept but hidden, and shows again if the document comes back.

When a run removes a document its source no longer has, every sample of the collection that holds it records the removal, audited first.

  • In an open sample, the document’s results go, it is not processed again (errorCode: source_deleted), its decisions turn stale and it shows sourceChanged: true. A reprocess is refused. The sign gate refuses the sign-off until a person replaces it with another document of the type it had when it was chosen, and the reviewer of the version’s open review request is told (inbox kind sample_source_changed).
  • A closed sample only carries the annotation: the evidence the sign-off was given on does not change.

The sample carries sourceChanged, the number of its documents that left their source. A draft’s sample shows the same flag; its author leaves the document out or draws again.

A reviewer who finds problems returns the version to its author with an optional general comment; the notes and pins of every document decided as a problem travel with it. A returned version cannot be activated: its author creates a correction.

  1. Approve. An approving review (:review with approved) is the signature. It runs the sign gate and, in the same transaction, closes the sample: no more decisions, documents or reprocessing. The answer carries a stable receipt id.

  2. Approve the base (first version of a collection only). A tenant administrator other than the author approves that the collection’s base table keeps the original text.

  3. Activate with a reason. The activator must be a tenant administrator other than the author, and the version must be validated.

The sign gate refuses (422 E0290) while a sample document was removed at its source and not replaced (sample_source_changed), is not shown (not processed, failed, or its copy withheld: sample_unresolved), has no decision (sample_undecided) or was decided as a problem (sample_problem); the answer carries the four counts (source_changed, unresolved, undecided, problems).

Four eyes compares accountable people: the root of the caller’s delegation chain. An author acting through an agent is still the author. Every sign-off is audited before it takes effect: when the audit trail cannot record it, nothing changes (503).

Once activated, the version appears in the policy editor’s catalogue and policies can bind it by name. A pending version is never offered.