Who can use it
Decisions admins only (ALLTERNIT_DECISIONS_ADMINS, user ids, comma separated). Everyone else gets 403 ERR_PERMISSION_DENIED. Proposals, versions and the audit trail are server-wide: an approved version applies to every user’s new runs of that task type.
Endpoints
Propose
The server then:
- Gathers evidence: the last 50 finished runs of the type and their trace-monitor findings by check and node, your 5 latest eval runs (failed cases of this type), Decision Runtime metrics for the graph’s S1 decision kinds over 30 days (decisions, mean confidence, abstain share, share under
min_confidence, oracle share), and the baseline evaluation’s failures and replay divergences by node. - Generates candidates from the graph new runs use now (the active version), validates each through the task-type binder and the Factory graph validator plus the guardrails, and discards invalid ones with the reason (
discarded). Candidates are ranked by the evidence (for example, raising an S1 node’smin_confidenceranks higher when the monitor reports low-confidence answers there), deduplicated, and the topkare kept. - Evaluates the current graph (baseline) and every candidate on the same cases: the task type’s shipped eval set and your suites, walked by the scripted runner on the candidate graph (no model, no effect), and recorded-only replays of the recent runs with a
graph_versioninline-candidate override. - Judges each candidate by the acceptance rule and stores it as a proposal:
pendingif it passed,failed_acceptanceif not, both with their reasons.
201) unless it needs live model calls (the LLM proposer, or replays outside scripted mode); then it is accepted (202, status: running) and finishes in the background. Read it at /v1/harness/searches/{search_id}. A daily spending cap reached during the search fails it with ERR_BUDGET_CAP_REACHED.
hsr_…) carries base (the version evaluated against), evidence, baseline (metrics), cases (case keys), candidates (one line per evaluated candidate: proposal_id, operator, target, status, passed, reasons, delta), discarded, not_evaluated, llm (whether it was used, tokens, cost, candidates kept) and pending (the ids of passing proposals).
Mutation operators
Each operator produces a graph that is valid by construction; it is still validated.LLM proposer
Withllm: true the planner model (through gizzi-code, tools off) gets the graph JSON and the evidence and is asked for {"candidates": [{"rationale", "patch"}]}, where patch is an RFC 6902 JSON Patch (add, remove, replace, move, copy, test; at most 32 operations). Every patch is applied all-or-nothing and validated like an operator’s candidate; a patch that fails to apply, does not bind, or breaks a guardrail is discarded with the reason. The call is metered on the usage ledger and checked against the same daily caps as replays and evals. In scripted mode (ALLTERNIT_AGENCY_COGNITION=scripted) no model is called and the LLM yields no candidates.
Guardrails
Every candidate, from an operator or the model, must keep:- the completion gate (
ver.check_acceptance_evidence) and its edges, the completion nodes, and every POLICY and WAIT node exactly as they were; - for every criterion of the task type’s completion contract, a VERIFY, POLICY, WAIT or CONTROL node that produces its evidence;
- write authority: no node gains a write set, and every writing node still runs after the POLICY nodes that guarded it;
- at most 4 added nodes.
Acceptance rule
Baseline and candidate are compared on the cases graded on both sides. A candidate passes only if all hold:- No high-stakes failure. Default
high_stakes: "no_new": a high-stakes case that passed on the baseline must not fail."none": no high-stakes case may fail at all. - Better, or as good and cheaper. Pass rate ≥ baseline +
min_gain(default 0.05, five points), or pass rate ≥ baseline −epsilon(default 0.02) and cost or latency improves by at leastefficiency_gain(default 0.10). - Not a likely regression. The lower bound of the paired percentile-bootstrap 95% interval of the pass-rate delta is above −
epsilon.
acceptance gives passed, reasons (one line per rule), baseline_pass_rate, candidate_pass_rate, delta, delta_ci95, cost_change, latency_change (relative, with their basis), new_high_stakes_failures and the rule used.
Proposals
A proposal (hpr_…) is what an admin reviews: operator, target, rationale, base (version and graph id it was evaluated against), acceptance, metrics (baseline and candidate: graded, passed, pass rate, cost, latency, failing stop nodes, replay divergences by node), per-case results, the evidence, the candidate graph, the patch (LLM candidates) and a readable diff:
status is pending, failed_acceptance, approved, rejected or rolled_back; history lists every transition with who and when.
Pending proposals are an admin-facing list (GET /v1/harness/proposals?status=pending), not attention requests: an attention request belongs to a run and resolves back into it, and a proposal has no run to park or resume.
Approve, reject, roll back
{"note": "..."} (at most 2000 bytes).
- Approve a
pendingproposal: the candidate is re-validated and registered as the task type’s next graph version (general.task.v2,general.task.v3, …) and becomes active. The shipped graph files are never edited; version 1 is always the shipped graph. A proposal evaluated against a version that is no longer active is refused with409 ERR_HARNESS_STALE(propose again); one that is not pending with409 ERR_HARNESS_NOT_PENDING. - Reject a
pendingproposal. - Roll back: new runs go back to the version that was active before the current one (versions form a stack; rolling back the last approved version returns to the shipped graph). The rolled-back version keeps
rolled_back_atand its proposal becomesrolled_back. With nothing to roll back:409 ERR_HARNESS_NOTHING_TO_ROLL_BACK.
GET /v1/harness/versions/{task_type}) shows active_version, the stack, and every version with its graph_id, proposal_id, parent_version, approved_by, approved_at and rolled_back_at.
Which version a run uses
A run takes the active version when it is created and keeps it: its TaskIR carriesgraph_version (task_type, graph_id, version, graph), and the executor, the trace monitor and replays of that run use that graph. Approving or rolling back changes new runs only; runs in flight finish on the graph they started with. Runs on the shipped graph carry no graph_version.
Audit
Every transition is recorded (hau_…): proposal.created, proposal.approved, proposal.rejected, version.rolled_back, each with the actor, time, task type, proposal id, versions involved and the note.