Skip to content
Docs
Request access

Read a gate result

Every gate that runs on a task leaves a result: the gate, its kind, the outcome and who checked. You read the results in the run’s report. The same results are in the ledger, so they can be checked later.

  • A run and its id. To make one: Run a team. The examples use the run run-1 of the team folder my-team.
  1. Print the run’s report.

    Terminal window
    nuramesh report run-1 --team my-team
  2. Read one task. The first line is the task; each gate line is one gate result.

    [done] run-1-fix-add (dana, attempts 1): Fix the failing add() test in calc.py
    gate has-fix (rule): passed by gate:rule
    gate tests (test_command): passed by gate:test_command
    gate review (verifier): passed by agent:rhea
    Part Meaning
    [done] the task’s status
    (dana, attempts 1) the agent that did the work and how many attempts it took
    gate has-fix the gate’s id, from the task’s definition of done
    (rule) the gate’s kind: rule, test_command, verifier or human
    passed the outcome: passed, failed or error
    by gate:rule who checked: a built-in check (gate:...), a verifier agent (agent:...) or a person (human:...)
  3. For a task that is not done, read the note line under it.

    [needs_human] gate-2-fix-add (dana, attempts 2): Fix the failing add() test in calc.py
    gate has-fix (rule): passed by gate:rule
    gate no-debug (rule): failed by gate:rule
    gate tests (test_command): passed by gate:test_command
    note: failed after 2 attempts: no-debug

    Each gate is listed once, with its latest result. A gate with no line did not run: here the verifier was not called because a cheaper gate had failed.

  4. For a script, ask for JSON. Each task has a gates list with gate, kind, outcome and checked_by.

    Terminal window
    nuramesh report run-1 --team my-team --output json
Outcome Meaning What happens next
passed every criterion the gate checks was met the next gate runs; after the last gate the task is done
failed a criterion was not met the worker gets the feedback and tries again; when the attempts are used up the task is needs_human
error the gate could not decide, for example a verifier’s answer was not in the required format never counted as a pass: the task is needs_human with note: gate errors and the gate’s id

A task that waits at a human gate is verifying with note: waiting for a human and the gate’s id.

Check it worked: the same result in the ledger

Section titled “Check it worked: the same result in the ledger”

The report is read from the ledger. To see the entries themselves, export the ledger to a new file:

Terminal window
nuramesh ledger export --out ledger.jsonl --team my-team

Each gate run is two entries, gate.started and gate.completed. A gate.completed entry names the task, the gate, the attempt, the outcome, who checked, and a verdict for each criterion:

{"attempt": 1, "checked_by": "gate:rule", "gate": "no-debug", "outcome": "failed", "verdicts": [{"criterion": "no-debug", "verdict": "not_met"}]}

This is the entry’s payload, shortened. The entry holds a hash of the result, not the output text. nuramesh ledger verify --team my-team checks that no entry was changed afterwards.

You see Do this
no run '...' in this store (exit code 2) The run id or the team folder is wrong. nuramesh status --team my-team lists unfinished runs
A task has no gate lines No gate ran: the work itself stopped first. The note says why, for example budget hard stop or policy refused
already exists; refusing to overwrite it The --out file exists. export never overwrites; choose a new file name
The last line of the report does not say (verified) The ledger’s hash chain did not check out. Run nuramesh ledger verify --team my-team and see The ledger and anchors

Was this page helpful?