{% extends "base.html" %} {% block content %}

Session: {{ session.session_id }}

Task Type{{ session.task_type }}
Source Path{{ session.source_path }}
Scored At{{ session.scored_at[:19] | replace("T", " ") }} UTC
Axes Scored{{ session.axes_scored | join(", ") }}
{# ---- TOKEN ECONOMY ---- #}

Token Economy

{% if session.baseline_available %} {% else %} {% endif %}
Real Tokens{{ "{:,}".format(session.real_tokens) }}
Band Verdict {% if session.band_verdict == "above_p75" %} {{ session.band_verdict }} {% elif session.band_verdict == "below_p25" %} {{ session.band_verdict }} {% elif session.band_verdict == "within_band" %} {{ session.band_verdict }} {% else %} {{ session.band_verdict }} {% endif %}
p25 Baseline{{ "{:,}".format(session.p25) if session.p25 is not none else "—" }}
Median Baseline{{ "{:,}".format(session.median) if session.median is not none else "—" }}
p75 Baseline{{ "{:,}".format(session.p75) if session.p75 is not none else "—" }}
BaselineNot available for this task type
Baseline Reference {% set bs = session.get("baseline_source", "b2_corpus") %} {% if bs == "self" %} vs your own lean runs ({{ session.p25 | default("?", true) | string }} – {{ session.p75 | default("?", true) | string }} token band) {% elif bs == "building" %} building your baseline — self-baseline not yet active {% elif bs == "corpus" %} corpus fallback (infra-heavy — your own baseline pending) {% else %} B2 reference corpus (infra-heavy single-developer; self-baseline not yet scored) {% endif %}
Scope Status{{ session.scope_status }}
Interpretation{{ session.interpretation }}
{{ session.token_domain_of_validity }}
{# ---- TRAJECTORY QUALITY ---- #}

Trajectory Quality

{% if traj_state == TrajectoryRenderState.UNAVAILABLE %}

UNAVAILABLE — no local judge configured

To enable trajectory scoring, install Ollama and run tes score <path> --judge. Token and waste axes still ran.

{% elif traj_state == TrajectoryRenderState.STALE %} {% if session.judge_score is not none %} {% endif %} {% if session.judge_reasoning %} {% endif %}
Verdict{{ session.judge_verdict }}
Score{{ "%.2f"|format(session.judge_score) }}
Reasoning{{ session.judge_reasoning }}

Verdict from an earlier version of this session (session grew after judging). Re-run tes score <path> to update.

{% else %} {# CURRENT #} {% if session.judge_score is not none %} {% endif %} {% if session.judge_reasoning %} {% endif %}
Verdict{{ session.judge_verdict }}
Score{{ "%.2f"|format(session.judge_score) }}
Reasoning{{ session.judge_reasoning }}
{% endif %}
{{ session.trajectory_domain_of_validity }}
{# ---- DETERMINISTIC WASTE ---- #}

Deterministic Waste

{% if session.waste_event_count == 0 %}

0 events detected.

{% else %}

{{ session.waste_event_count }} event(s) detected.

{% for event in session.waste_events %} {% endfor %}
Detector Proof Turns Wasted Cost Evidence
{{ event.get("detector", "—") }} {% set turns = event.get("turns", []) %} {% if turns %} {{ turns | join(", ") }} {% else %} — {% endif %} {% set wc = event.get("wasted_cost_usd") %} {% if wc is not none and wc > 0 %} ~${{ "%.3f" | format(wc) }} {% else %} {% endif %} {% set evidence = event.get("evidence", {}) %} {% if evidence %}
{{ evidence | tojson(indent=2) }}
{% else %} — {% endif %}
{% endif %}
{{ session.waste_domain_of_validity }}
{# ---- COST ANNOTATION ---- #}

Cost Annotation

Cost is not a score. It annotates the token axis at API-equivalent rates. Flat-plan users: marginal cost differs; token consumption is the honest metric.

{% if session.get("session_cost_usd") is not none %} {% if cost_vs_baseline_pct is not none %} {% else %} {% endif %}
Session Cost ${{ "%.2f" | format(session.session_cost_usd) }} {% if session.get("cost_approximate") %} [~] APPROXIMATE {% endif %}
vs Your Baseline {% if cost_vs_baseline_pct >= 0 %} +{{ cost_vs_baseline_pct }}% above your typical efficient run (~${{ "%.2f" | format(baseline_cost_median) }}) {% else %} {{ cost_vs_baseline_pct }}% below your typical efficient run (~${{ "%.2f" | format(baseline_cost_median) }}) {% endif %}
vs Your Baseline No baseline cost comparison yet (need more waste-free sessions with cost data)
Price Provenance {{ price_provenance }}
{% if session.get("cost_domain_of_validity") %}
Domain of validity (click to expand)
{{ session.cost_domain_of_validity }}
{% endif %} {% else %}

Cost not computed for this session (run backfill_cost() or re-score).

{% endif %} {% endblock %}