diff --git a/Plugin/unraid/include/ai.php b/Plugin/unraid/include/ai.php
index 8ff7e13..c01b692 100644
--- a/Plugin/unraid/include/ai.php
+++ b/Plugin/unraid/include/ai.php
@@ -824,10 +824,23 @@ function vv_ai_bug_write(string $component, string $summary, string $evidence, a
if ($component === '' || $summary === '' || $evidence === '') return ['ok' => false];
if (!vv_ai_scope_ok($component)) return ['ok' => false];
+ // The commit as it was when the fault was seen, not when the report is read. "Is this already
+ // fixed" is the first question any maintainer asks, and a version captured later answers a
+ // different question. Slot id (host1/host2) rather than the hostname — this text is written
+ // to be pasted into a public issue.
+ $commit = '';
+ $head = @file_get_contents(SCRIPTS_DIR . '/.git/HEAD');
+ if (is_string($head) && preg_match('#^ref:\s*(\S+)#', trim($head), $hm)) {
+ $commit = substr(trim((string)@file_get_contents(SCRIPTS_DIR . '/.git/' . $hm[1])), 0, 12);
+ } elseif (is_string($head)) {
+ $commit = substr(trim($head), 0, 12);
+ }
+
$rec = [
'component' => mb_substr($component, 0, 120),
'summary' => mb_substr($summary, 0, 300),
'evidence' => mb_substr($evidence, 0, 2000),
+ 'commit' => $commit,
'host' => vv_detect_host(),
'first' => time(),
'last' => time(),
diff --git a/Plugin/unraid/pages/ai.php b/Plugin/unraid/pages/ai.php
index acd55fa..7dd2a1d 100644
--- a/Plugin/unraid/pages/ai.php
+++ b/Plugin/unraid/pages/ai.php
@@ -278,6 +278,9 @@ if (is_dir('/var/log/varaverk')) {
filed from the Scheduler troubleshooter
+
+
@@ -536,6 +539,7 @@ if (is_dir('/var/log/varaverk')) {
function renderBugs(bugs) {
const wrap = $('vv-ai-bugs-wrap');
+ vvBugs = bugs;
if (!bugs.length) { wrap.style.display = 'none'; return; }
wrap.style.display = '';
$('vv-ai-bugs-sum').innerHTML =
@@ -548,6 +552,7 @@ if (is_dir('/var/log/varaverk')) {