{% extends "base.html" %} {% block title_suffix %} — {{ session.session_id[:12] }}{% endblock %} {% block content %} {# ── Session header ──────────────────────────────────────────────── #}
{{ session.task_type }} · {{ session.scored_at[:19] | replace("T", " ") }} UTC · {{ session.source_path }}
{# ── Takeaway ────────────────────────────────────────────────────── #} {% if attribution_takeaway %}| Bucket | Cost% ▼ | Tok% | Cost ($) | |
|---|---|---|---|---|
| {{ row.bucket }} {{ row.label }} | {{ row.cost_pct }}% | {{ row.tok_pct }}% | ${{ "%.4f" | format(row.usd) }} | |
| TOTAL (billed) | 100% | 100% | ${{ "%.4f" | format(attribution.total_usd) }} |
Basis: {{ "{:,}".format(attribution.total_billed_tokens) }} total billed tokens (includes cached re-reads). real_tokens (verdict basis): {{ "{:,}".format(attribution.real_tokens) }} — cached re-reads are excluded from the verdict axis but included in this chart; do not compare attribution cost% directly to the real_tokens verdict.
Source file not accessible — attribution requires the original JSONL log.
Ensure source_path is reachable, or re-run tes score <path>.
| Real Tokens | {{ "{:,}".format(session.real_tokens) }} |
| Band Verdict | {% if session.band_verdict == "above_p75" %} above_p75 {% elif session.band_verdict == "below_p25" %} below_p25 {% elif session.band_verdict == "within_band" %} within_band {% else %} {{ session.band_verdict }} {% endif %} |
| Baseline | {% set bs = session.get("baseline_source", "b2_corpus") %} {% if bs == "self" %} self vs your own lean waste-free runs {% if session.p25 is not none and session.p75 is not none %} ({{ "{:,}".format(session.p25) }}–{{ "{:,}".format(session.p75) }} token band) {% endif %} {% elif bs == "building" %} building self-baseline not yet active {% elif bs == "corpus" %} corpus infra-heavy fallback — your own baseline pending {% else %} b2 B2 reference corpus (infra-heavy single-developer; self-baseline not yet scored) {% endif %} |
| Band | p25 {{ "{:,}".format(session.p25) if session.p25 is not none else "—" }} · median {{ "{:,}".format(session.median) if session.median is not none else "—" }} · p75 {{ "{:,}".format(session.p75) if session.p75 is not none else "—" }} |
| Scope | {{ session.scope_status }} |
| Interpretation | {{ session.interpretation }} |
UNAVAILABLE
Token and waste axes ran. Trajectory scoring is optional — enable with one of:
qwen3:30b-a3b
(~18 GB VRAM), then re-run tes score <path> --judge
tes score <path> --api-judge --api-judge-key YOUR_KEY
API judge note: sends session data — including 300-char snippets that may contain your code — to your configured provider. Explicit consent required at the CLI before any data is sent.
{% elif traj_state == TrajectoryRenderState.STALE %}{{ session.judge_verdict }} {% if session.judge_score is not none %} score {{ "%.2f" | format(session.judge_score) }} {% endif %}
{% if session.judge_reasoning %}{{ session.judge_reasoning }}
{% endif %}Verdict from an earlier version of this session (session grew after judging). Re-run tes score <path> to update.
{{ session.judge_verdict }} {% if session.judge_score is not none %} score {{ "%.2f" | format(session.judge_score) }} {% endif %}
{% if session.judge_reasoning %}{{ session.judge_reasoning }}
{% endif %} {% endif %} {# Honesty element 1: trajectory DOV — visible #}No waste detected.
{% else %} {# Compute total waste cost for collapsed-state signal (honesty element 7) #} {% set wns = namespace(total=0.0) %} {% for ev in session.waste_events %} {% set wc = ev.get("wasted_cost_usd") %} {% if wc is not none and wc > 0 %}{% set wns.total = wns.total + wc %}{% endif %} {% endfor %} {# Honesty element 7: collapsed state SHOWS count + cost; one click reveals evidence #}| 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 %}
|
| Session Cost | ${{ "%.2f" | format(session.session_cost_usd) }} {% if session.get("cost_approximate") %} [~] approximate {% endif %} |
| vs Your Baseline | {% if cost_vs_baseline_pct is not none %} {% 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 %} {% else %} no baseline yet {% endif %} |
| Price Basis | {{ price_provenance }} |
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("cost_domain_of_validity") %}