{# CUI // SP-CTI — Delta Review: side-by-side HITL delta panel (trust-hitl-02) #} {% extends "base.html" %} {% block title %}{{ app_name }} — Delta Review{% endblock %} {% block content %}

Delta Review

The delta is the reviewable unit

A force_* override records that a human overrode, never what changed. Each row below is one claim-anchored diff: what the draft said, what it says now, and — for every sentence — whether the revision actually resolved the finding that blocked it, or merely reworded it. The diff is append-only evidence in trust_deltas; your decision moves the matching approval_items ask and is written permanently to agent_approval_log with the rationale you give.

{% if not telemetry_available %} {% endif %}
{{ summary.get('pending', 0) }}
Awaiting Review
{{ summary.get('approved', 0) }}
Approved
{{ summary.get('denied', 0) }}
Denied
{{ summary.get('regressions', 0) }}
Introduced Findings
{{ summary.get('no_op', 0) }}
Changed Nothing
{% include "includes/iqe_query_widget.html" %} {% if not_found %} {% endif %}

Review Queue

Deltas whose approval item is still pending, and which no later correction supersedes. Select one to open its side-by-side panel.

{% for d in queue %} {% endfor %} {% if not queue %} {% endif %}
Artifact Stage Findings Claims Changed Recorded By Created Action
{{ d.artifact_id }} {% if d.is_no_op %}
no-op{% endif %} {% if d.review.no_ask %}
no ask{% endif %}
{{ d.stage_label }} {{ d.findings_before_n }} → {{ d.findings_after_n }} {% if d.net_findings < 0 %} {{ d.net_findings }} {% elif d.net_findings > 0 %} +{{ d.net_findings }} {% endif %} {{ d.changed_span_count }} {{ d.actor or '—' }} {{ d.created_at }} Review
{% if telemetry_available %} No deltas awaiting review. {% else %} Queue not readable — see the notice above. {% endif %}
{% if selected %}

{{ selected.artifact_id }} {{ selected.review.badge.label }}

{{ selected.stage_label }} — recorded by {{ selected.actor or '(unattributed)' }} — delta {{ selected.delta_id }} {% if selected.supersedes_delta_id %} — corrects {{ selected.supersedes_delta_id }} {% endif %}

{% if selected.rationale %}

Stated reason for the change: {{ selected.rationale }}

{% endif %} {% if selected.is_no_op %} {% endif %}
{{ selected.findings_before_n }} → {{ selected.findings_after_n }}
Findings
{{ selected.resolved_count }}
Claims Resolved
{{ selected.persisting_count }}
Still Flagged
{{ selected.regressed_count }}
Newly Flagged
{{ selected.changed_span_count }}
Claims Changed
{% if selected.persisting_count > 0 %} {% endif %} {% if selected.regressed_count > 0 %} {% endif %} {% if selected.document_findings_before or selected.document_findings_after %}

Document-level findings

These anchor to no single claim — placeholder_guard and citation_guard report at document level. A panel showing only claim-anchored findings would render a blocked draft with nothing wrong with it.

Before
{% for f in selected.document_findings_before %}
{{ f.issue }}{% if f.detail %} — {{ f.detail }}{% endif %}
{% else %}
none
{% endfor %}
After
{% for f in selected.document_findings_after %}
{{ f.issue }}{% if f.detail %} — {{ f.detail }}{% endif %}
{% else %}
none
{% endfor %}
{% endif %}

Claim-by-claim diff

Aligned on anchored_claims offsets — the same decomposition every TRUST guard numbers its findings against — so each row is a claim and its verdict, not a line of text.

Before
After
{% for s in selected.spans %}
{{ s.op_label }} {% if s.verdict_label %} {{ s.verdict_label }} {% endif %} {% if s.similarity is defined and s.similarity is not none %} {{ s.similarity }} {% endif %}
{% if s.before_claim %}
{{ s.before_claim }}
verdict: {{ s.before_verdict }}
{% for f in s.findings_before %}
{{ f.issue }}{% if f.detail %} — {{ f.detail }}{% endif %}
{% endfor %} {% else %}
(not present)
{% endif %}
{% if s.after_claim %}
{{ s.after_claim }}
verdict: {{ s.after_verdict }}
{% for f in s.findings_after %}
{{ f.issue }}{% if f.detail %} — {{ f.detail }}{% endif %}
{% endfor %} {% else %}
(removed)
{% endif %}
{% else %}

This delta decomposed into no claims.

{% endfor %}
{% if selected.can_settle %}

Decision

A rationale is mandatory (minimum {{ min_rationale_chars }} characters). An unexplained decision is unauditable after the fact and indistinguishable from a bug. Your answer moves this delta's approval item — the diff above is never rewritten — and appends a permanent agent_approval_log record carrying what you write here.

{% elif selected.review.key == 'pending' %}

Cannot be settled here

This delta is pending, but it has no readable approval item, so there is nothing for a decision to move. That means the ask failed to queue when the delta was recorded, or the mutable row has been pruned. It is reported pending rather than settled deliberately: a failed enqueue must not read as a silent approval.

{% elif selected.review.item %}

Settled

{{ selected.review.badge.label }} by {{ selected.review.item.resolved_by or '(unattributed)' }} {% if selected.review.item.resolved_at %}on {{ selected.review.item.resolved_at }}{% endif %}

Approval item {{ selected.review.item.item_id }}, state {{ selected.review.item.state }}. The rationale lives in the append-only agent_approval_log record this decision wrote — query it with the delta_review.decisions collection above. The diff stays on screen because it is evidence, not a receipt.

{% elif selected.review.key == 'superseded' %}

Superseded

A later correction replaced this delta, so it is no longer the thing to review. Its evidence stands; find the correction in the timeline below.

{% endif %} {% if selected.chain and selected.chain|length > 1 %}

Correction chain

This delta's own corrections, walked through supersedes_delta_id. Not the artifact's history — that is below.

{% for c in selected.chain %} {% endfor %}
DeltaStageFindingsReasonWhen
{{ c.delta_id[:12] }} {{ c.stage_label }} {{ c.findings_before_n }} → {{ c.findings_after_n }} {{ c.rationale or '—' }} {{ c.created_at }}
{% endif %} {% if selected.timeline and selected.timeline|length > 1 %}

Every delta on this artifact

{% for h in selected.timeline %} {% endfor %}
DeltaStageFindingsStateRecorded ByWhen
{{ h.delta_id[:12] }} {{ h.stage_label }} {{ h.findings_before_n }} → {{ h.findings_after_n }} {{ h.review.badge.label }} {{ h.actor or '—' }} {{ h.created_at }}
{% endif %}
{% endif %} {% endblock %}