thirdshift 0.33.0

Turn a GitHub issue into a ready-for-review pull request, unattended
{% macro spark(drawn) %}<td><svg class="metrics-spark" viewBox="0 0 100 20" preserveAspectRatio="none" role="img" aria-label="{{ drawn.label }}"><path d="{{ drawn.path }}"/></svg></td>{% endmacro -%}
{% macro bar(tally) %}<td><svg class="metrics-bar" viewBox="0 0 100 10" preserveAspectRatio="none" role="img" aria-label="{{ tally.summary() }}">{% for segment in tally.segments() %}<rect class="{{ segment.css }}" x="{{ segment.x }}" width="{{ segment.width }}" height="10"><title>{{ segment.title }}</title></rect>{% endfor %}</svg></td>{% endmacro -%}
{% macro change(comparison) %}<td>{% if let Some(compared) = comparison %}{{ compared.text() }}{% endif %}</td>{% endmacro -%}
<!doctype html>
<html lang="en" data-theme="{{ page.theme }}">
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Metrics · {{ page.hostname }} · thirdshift</title><link rel="icon" href="data:,"><link rel="stylesheet" href="/assets/console.css"><script src="/assets/console.js" type="module"></script></head>
<body>{% include "console/header.html" %}{% include "console/nav.html" %}
<main class="metrics"><div class="page-title"><h1>Metrics</h1><code>thirdshift metrics --json</code></div>
<p>How this machine's Commands ended and went, in four groups, with the readable Commands of other OS accounts tagged by account. Each signal keeps its own units, and a bounded window shows its change from the window before. Success rate is Succeeded / (Succeeded + Failed); Paused and Stopped show beside it, outside that rate. A Pickup run counts only when it failed or died before dispatching; skipped Passes never count. Reload to see changes.</p>
{% if let Some(error) = error %}<p role="alert">{{ error }}</p>{% endif %}
{% include "console/metrics_form.html" %}
<p>Window: {% if let Some(preset) = trends.window.preset %}{{ preset }}, {% endif %}{{ trends.window.grain }} buckets{% if let Some(from) = trends.window.from %} from {{ from }}{% endif %}{% if let Some(through) = trends.window.through %} through {{ through }}{% endif %}. <code>thirdshift metrics{% if let Some(preset) = trends.window.preset %} --window {{ preset }}{% else %} --grain {{ trends.window.grain }}{% if let Some(from) = trends.window.from %} --from {{ from }}{% endif %}{% if let Some(through) = trends.window.through %} --through {{ through }}{% endif %}{% endif %}{% for repo in trends.filters.repo %} --repo {{ repo }}{% endfor %}{% for kind in trends.filters.kind %} --kind '{{ kind }}'{% endfor %}{% for harness in trends.filters.harness %} --harness {{ harness }}{% endfor %}{% for model in trends.filters.model %} --model {{ model }}{% endfor %}{% for version in trends.filters.version %} --version {{ version }}{% endfor %}{% for account in trends.filters.account %} --account {{ account }}{% endfor %} --json</code></p>
{% if !trends.unavailable_accounts.is_empty() %}<p>Unreadable OS accounts: {% for account in trends.unavailable_accounts %}{% if !loop.first %}, {% endif %}{{ account }}{% endfor %}</p>{% endif %}
{% let compared = trends.window.prior.is_some() %}<ul class="metrics-legend" aria-label="Outcome stacks">{% for class in classes %}<li><svg class="metrics-swatch" viewBox="0 0 10 10" aria-hidden="true"><rect class="{{ class.css() }}" width="10" height="10"/></svg>{{ class.name() }}</li>{% endfor %}</ul>
<section aria-labelledby="metrics-yield"><h2 id="metrics-yield">Yield and pull-request survival</h2>
{% if let Some(comparison) = trends.comparison %}<section aria-label="Compared with the preceding window"><h3>Compared with the preceding window</h3>
<p>{{ comparison.current.from }} – {{ comparison.current.through }} against {{ comparison.prior.from }} – {{ comparison.prior.through }}. <code>n</code> is Succeeded + Failed; observed Commands have ended or died, missing ones are still live.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Comparison table"><table>
<thead><tr><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Success rate</th><th scope="col">Prior</th><th scope="col">Change</th><th scope="col">Current outcomes</th><th scope="col">Prior outcomes</th><th scope="col">Observed / missing</th></tr></thead>
<tbody>{% for row in comparison.rows %}<tr><th scope="row">{{ row.kind }}</th><td>{% if let Some(account) = row.account %}{{ account }}{% endif %}</td><td>{{ row.current.rate() }} · n {{ row.current.n }}</td><td>{{ row.prior.rate() }} · n {{ row.prior.n }}</td><td>{{ row.delta.rate() }}</td><td>{{ row.current.summary() }}</td><td>{{ row.prior.summary() }}</td><td>{{ row.current.observed }} / {{ row.current.missing }} now, {{ row.prior.observed }} / {{ row.prior.missing }} prior</td></tr>{% endfor %}</tbody>
</table></div>{% if comparison.rows.is_empty() %}<p>No Commands in either window.</p>{% endif %}</section>{% endif %}
<section aria-label="Outcomes"><h3>Outcomes</h3>
<p>A marked row starts the first bucket on a new <code>thirdshift</code> version, or, once a filter narrows the view, a new Harness or Model. A Failed count opens those Commands in History.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Outcomes table"><table>
<thead><tr><th scope="col">{% if trends.window.weekly() %}Week{% else %}Day{% endif %}</th><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Ended</th><th scope="col">Succeeded</th><th scope="col">Failed</th><th scope="col">Paused</th><th scope="col">Stopped</th><th scope="col">Live</th><th scope="col">Success rate</th></tr></thead>
<tbody>{% for line in trends.timeline() %}{% match line %}{% when Timeline::Transition(transition) %}<tr class="metrics-change"><th scope="row">{{ transition.bucket }}</th><td colspan="9"><span aria-hidden="true">◆ </span>{{ transition.text() }}</td></tr>{% when Timeline::Bucket(row) %}<tr><th scope="row">{{ row.bucket }}</th><td>{{ row.kind }}</td><td>{% if let Some(account) = row.account %}{{ account }}{% endif %}</td>
{% call bar(row.tally) %}{% endcall %}
{% for class in classes %}<td title="{{ row.tally.breakdown(**class) }}">{% if *class == Class::Failed && !row.failed_commands.is_empty() %}<a href="{{ self.bucket_history(row) }}">{{ row.tally.count(**class) }}</a>{% else %}{{ row.tally.count(**class) }}{% endif %}</td>{% endfor %}<td>{{ row.tally.live }}</td><td>{{ row.tally.rate() }}</td></tr>{% endmatch %}{% endfor %}</tbody>
</table></div>{% if trends.outcomes.is_empty() %}<p>No Commands in this window.</p>{% endif %}</section>
<section aria-label="By thirdshift version"><h3>By thirdshift version</h3>
<p>The window's Commands by the <code>thirdshift</code> version that started them. Older records name none; their Session traces supply it when they can, and the rest stay missing.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Versions table"><table>
<thead><tr><th scope="col">Version</th><th scope="col">Recorded / recovered</th><th scope="col">Ended</th><th scope="col">Outcomes</th><th scope="col">Success rate</th></tr></thead>
<tbody>{% for row in trends.versions.rows %}<tr><th scope="row">{% if let Some(version) = row.thirdshift_version %}<a href="{{ self.version_slice(version) }}">{{ version }}</a>{% else %}missing{% endif %}</th><td>{{ row.recorded }} / {{ row.recovered }}</td>
{% call bar(row.tally) %}{% endcall %}<td>{{ row.tally.summary() }}</td><td>{{ row.tally.rate() }}</td></tr>{% endfor %}</tbody>
</table></div>{% if trends.versions.rows.is_empty() %}<p>No Commands in this window.</p>{% endif %}</section>
<section aria-label="Kept pull requests"><h3>Kept pull requests</h3>
<p>What became of each kind's pull requests, as this machine's kept GitHub answer last showed: <code>metrics</code> reads no GitHub. Survival is merged / (merged + closed without merging).</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Kept pull requests table"><table>
<thead><tr><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Survival trend</th><th scope="col">Merged</th><th scope="col">Closed unmerged</th><th scope="col">Open</th><th scope="col">Not kept</th><th scope="col">Survival</th>{% if compared %}<th scope="col">Change</th>{% endif %}</tr></thead>
<tbody>{% for line in trends.groups.yield_.pull_requests.lines %}<tr><th scope="row">{{ line.key.kind }}</th><td>{% if let Some(account) = line.key.account %}{{ account }}{% endif %}</td>{% call spark(line.spark(trends.groups.yield_.pull_requests.axis.as_slice())) %}{% endcall %}<td>{{ line.window.merged }}</td><td>{{ line.window.closed }}</td><td>{{ line.window.open }}</td><td>{{ line.window.not_kept }}</td><td>{{ line.window.rate() }}</td>{% if compared %}{% call change(line.comparison) %}{% endcall %}{% endif %}</tr>{% endfor %}</tbody>
</table></div>{% if trends.groups.yield_.pull_requests.lines.is_empty() %}<p>No pull requests in this window.</p>{% endif %}
</section></section>
<section aria-labelledby="metrics-failures"><h2 id="metrics-failures">Where runs failed</h2>
<p>The window's Failed Commands, died ones included, by the stage they stopped at and how: <code>held</code>, <code>waiting</code>, <code>crashed</code> or <code>stage_failed</code> as each recorded it. An older or died Command recorded neither, so it shows its last recorded stage and <code>failed</code> or <code>died</code>. {{ trends.where_runs_failed.observed }} of {{ trends.where_runs_failed.failed }} recorded theirs; {{ trends.where_runs_failed.missing }} are missing. A row opens its Commands in History; each name opens its details.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Where runs failed table"><table>
<thead><tr><th scope="col">Stopped at</th><th scope="col">Category</th><th scope="col">Source</th><th scope="col">Failed</th><th scope="col">Commands</th></tr></thead>
<tbody>{% for row in trends.where_runs_failed.rows %}<tr><th scope="row"><a href="{{ self.row_history(row) }}">{% if let Some(stage) = row.stopped_at %}{{ stage }}{% else %}no stage{% endif %}</a></th><td>{{ row.ending.category() }}</td><td>{% if row.ending.recorded() %}recorded{% else %}fallback{% endif %}</td><td><a href="{{ self.row_history(row) }}">{{ row.failed }}</a></td><td>{% for command in row.commands %}{% if !loop.first %}, {% endif %}<a href="{{ self.details(command.selector) }}">{{ command.name }}</a>{% endfor %}</td></tr>{% endfor %}</tbody>
</table></div>{% if trends.where_runs_failed.rows.is_empty() %}<p>No Failed Commands in this window.</p>{% endif %}
</section>
<section aria-labelledby="metrics-quality"><h2 id="metrics-quality">Post-merge quality and interventions</h2>
<section aria-label="Bug origins"><h3>Bug origins by merge</h3>
<p>Merged pull requests by the bucket they merged in, with the confirmed Bug origins that name them.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Bug origins table"><table>
<thead><tr><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Bug origin trend</th><th scope="col">Merged</th><th scope="col">Confirmed Bug origins</th><th scope="col">Per merged</th>{% if compared %}<th scope="col">Change</th>{% endif %}</tr></thead>
<tbody>{% for line in trends.groups.quality.bug_origins.lines %}<tr><th scope="row">{{ line.key.kind }}</th><td>{% if let Some(account) = line.key.account %}{{ account }}{% endif %}</td>{% call spark(line.spark(trends.groups.quality.bug_origins.axis.as_slice())) %}{% endcall %}<td>{{ line.window.merged }}</td><td>{{ line.window.confirmed_bug_origins }}</td><td>{{ line.window.per_merged() }}</td>{% if compared %}{% call change(line.comparison) %}{% endcall %}{% endif %}</tr>{% endfor %}</tbody>
</table></div>{% if trends.groups.quality.bug_origins.lines.is_empty() %}<p>No merged pull requests in this window.</p>{% endif %}
</section>
<section aria-label="Scores"><h3>Scores</h3>
<p>The Grader's weekly Scores by criterion, from this machine's Scoring runs. A pass rate shows once its criterion is calibrated; model Scores on pull requests for you to score stay hidden until yours are saved. Kind and account filters leave Scores whole.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Scores table"><table>
<thead><tr><th scope="col">Criterion</th><th scope="col">Calibration</th><th scope="col">Pass rate trend</th><th scope="col">Passed / graded</th><th scope="col">Pass rate</th>{% if compared %}<th scope="col">Change</th>{% endif %}</tr></thead>
<tbody>{% for line in trends.groups.quality.scores.lines %}<tr><th scope="row">{{ line.key.criterion }}</th><td>{% if line.key.calibrated %}calibrated{% else %}uncalibrated{% endif %}</td>{% call spark(line.spark(trends.groups.quality.scores.axis.as_slice())) %}{% endcall %}<td>{{ line.window.passed }}/{{ line.window.graded }}</td><td>{% if line.key.calibrated %}{{ line.window.rate() }}{% else %}uncalibrated{% endif %}</td>{% if compared %}{% call change(line.comparison) %}{% endcall %}{% endif %}</tr>{% endfor %}</tbody>
</table></div>{% if trends.groups.quality.scores.lines.is_empty() %}<p>No Scores in this window.</p>{% endif %}
</section>
<section aria-label="Needs you and Stops"><h3>Needs you and Stops</h3>
<p>Commands that ended needing the Day shift: Failed, died, Paused or Stopped, or holding Security findings. Stops count each request once, where it was asked.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Needs you and Stops table"><table>
<thead><tr><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Needs you trend</th><th scope="col">Commands</th><th scope="col">Needs you</th><th scope="col">Stops</th>{% if compared %}<th scope="col">Change</th>{% endif %}</tr></thead>
<tbody>{% for line in trends.groups.quality.interventions.lines %}<tr><th scope="row">{{ line.key.kind }}</th><td>{% if let Some(account) = line.key.account %}{{ account }}{% endif %}</td>{% call spark(line.spark(trends.groups.quality.interventions.axis.as_slice())) %}{% endcall %}<td>{{ line.window.commands }}</td><td>{{ line.window.needs_you }}</td><td>{{ line.window.stops }}</td>{% if compared %}{% call change(line.comparison) %}{% endcall %}{% endif %}</tr>{% endfor %}</tbody>
</table></div>{% if trends.groups.quality.interventions.lines.is_empty() %}<p>No Commands in this window.</p>{% endif %}
</section></section>
<section aria-labelledby="metrics-efficiency"><h2 id="metrics-efficiency">Efficiency, wasted effort and Repair churn</h2>
<p>Minutes, Repairs and CI rounds are means over Succeeded Commands only, so fast crashes cannot make them look better. First-pass clean is Succeeded with no Repair. Per success divides every ended attempt's minutes or spend by the Succeeded count. Wasted is the Failed (died included) and Stopped share of that time or spend. Observed and missing count the attempts that did or did not record it.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Efficiency table"><table>
<thead><tr><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Harness</th><th scope="col">Model</th><th scope="col">Minutes per success trend</th><th scope="col">Succeeded / ended</th><th scope="col">Minutes</th><th scope="col">Repairs</th><th scope="col">CI rounds</th><th scope="col">First-pass clean</th><th scope="col">Minutes per success</th><th scope="col">Spend per success</th><th scope="col">Wasted time</th><th scope="col">Wasted spend</th>{% if compared %}<th scope="col">Change</th>{% endif %}</tr></thead>
<tbody>{% for line in trends.groups.efficiency.lines %}<tr><th scope="row">{{ line.key.kind }}</th><td>{% if let Some(account) = line.key.account %}{{ account }}{% endif %}</td><td>{{ line.key.harness }}</td><td>{% if let Some(model) = line.key.model %}{{ model }}{% else %}missing{% endif %}</td>{% call spark(line.spark(trends.groups.efficiency.axis.as_slice())) %}{% endcall %}<td>{{ line.window.succeeded }}/{{ line.window.ended }}</td><td>{{ line.window.succeeded_minutes.text() }}</td><td>{{ line.window.succeeded_repairs.text() }}</td><td>{{ line.window.succeeded_ci_rounds.text() }}</td><td>{{ line.window.first_pass() }}</td><td>{{ line.window.minutes_per_success_text() }}</td><td>{{ line.window.cost_per_success_text() }}</td><td>{{ line.window.wasted_time_text() }}</td><td>{{ line.window.wasted_spend_text() }}</td>{% if compared %}{% call change(line.comparison) %}{% endcall %}{% endif %}</tr>{% endfor %}</tbody>
</table></div>{% if trends.groups.efficiency.lines.is_empty() %}<p>No ended Commands in this window.</p>{% endif %}
</section>
<section aria-labelledby="metrics-friction"><h2 id="metrics-friction">Stage bottlenecks and session friction</h2>
<p>Above is the share of stages past the top of their repository's Usual range, of those that had one; Suspended time keeps a stage out of it. Tool calls, errors, denials and killed work are means per Session. Destructive counts Sessions with any destructive command, and Security holds count Commands left with unaddressed Security findings. Review finding counts are not shown as quality.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Friction table"><table>
<thead><tr><th scope="col">Kind</th><th scope="col">Account</th><th scope="col">Above trend</th><th scope="col">Above Usual range</th><th scope="col">By stage</th><th scope="col">Sessions</th><th scope="col">Repeated tool calls</th><th scope="col">Tool errors</th><th scope="col">Permission denials</th><th scope="col">Killed work</th><th scope="col">Destructive</th><th scope="col">Security holds</th>{% if compared %}<th scope="col">Change</th>{% endif %}</tr></thead>
<tbody>{% for line in trends.groups.friction.lines %}<tr><th scope="row">{{ line.key.kind }}</th><td>{% if let Some(account) = line.key.account %}{{ account }}{% endif %}</td>{% call spark(line.spark(trends.groups.friction.axis.as_slice())) %}{% endcall %}<td>{{ line.window.all_stages.text() }}</td><td>{{ line.window.stages_text() }}</td><td>{{ line.window.sessions }} ({{ line.window.missing_sessions }} missing)</td><td>{{ line.window.repeated_tool_calls.text() }}</td><td>{{ line.window.tool_errors.text() }}</td><td>{{ line.window.permission_denials.text() }}</td><td>{{ line.window.killed_work.text() }}</td><td>{{ line.window.destructive() }}</td><td>{{ line.window.security() }}</td>{% if compared %}{% call change(line.comparison) %}{% endcall %}{% endif %}</tr>{% endfor %}</tbody>
</table></div>{% if trends.groups.friction.lines.is_empty() %}<p>No ended Commands in this window.</p>{% endif %}
</section>
<section aria-label="Signals by setup"><h2>Signals by setup</h2>
<p>Repairs, CI rounds and total minutes are means over Succeeded Commands that recorded each, with how many did not.</p>
<div class="metrics-table" tabindex="0" role="region" aria-label="Signals table"><table>
<thead><tr><th scope="col">{% if trends.window.weekly() %}Week{% else %}Day{% endif %}</th><th scope="col">Repository</th><th scope="col">Kind</th><th scope="col">Session</th><th scope="col">Account</th><th scope="col">Runs</th><th scope="col">Repairs</th><th scope="col">CI rounds</th><th scope="col">Total minutes</th></tr></thead>
<tbody>{% for row in trends.rows() %}<tr><th scope="row">{{ row.bucket() }}</th><td>{{ row.repository() }}</td><td>{{ row.kind() }}</td><td>{% if let Some(session) = row.session_kind() %}{{ session }}{% endif %}</td><td>{% if let Some(account) = row.account() %}{{ account }}{% endif %}</td><td>{{ row.runs }}</td><td>{{ row.repairs.text() }}</td><td>{{ row.ci_rounds.text() }}</td><td>{{ row.total_minutes.text() }}</td></tr>{% endfor %}</tbody>
</table></div>{% if trends.rows().is_empty() %}<p>No signals in this window.</p>{% endif %}</section>
</main>{% include "console/chrome.html" %}</body></html>