Keep the assistant's reading apart from the log it read

A guess printed beside a quote is remembered as a second quote, and the next
reader inherits it as a finding.
This commit is contained in:
Gmer4Lfe
2026-08-13 16:08:23 -04:00
parent 466081aa66
commit 2c1fd4c8bf
2 changed files with 34 additions and 2 deletions
+24 -2
View File
@@ -636,8 +636,16 @@ if ($profile === 'chat') {
. "[VARAVERK-BUG]\n"
. "component: <the script or file at fault, e.g. Arrs_Stack/arr_sync.sh>\n"
. "summary: <one line, what is wrong>\n"
. "diagnosis: <why you think it happens — your reading, not a quote>\n"
. "evidence: <the log line or lines that show it, quoted verbatim>\n"
. "[/VARAVERK-BUG]\n\n"
// evidence is read as everything after its label, because a quote runs to several
// lines and guessing where it ends would truncate it. Any field added later must
// therefore be listed above it, or it is swallowed into the quote.
. "Keep diagnosis and evidence apart. Evidence is what the log says; diagnosis is "
. "what you make of it. They are labelled differently in the report because whoever "
. "reads it next — a person or another model — has to be able to tell which is which, "
. "and a guess printed beside a quote gets read back as a second quote.\n\n"
. "Leave the block out entirely for anything explained by configuration, by a host "
. "being offline, or by a job simply not having run. The evidence field is not "
. "optional and must be a line you actually saw — a report nobody can check is worse "
@@ -1108,8 +1116,18 @@ if ($can('file_bugs')
$field = function (string $k) use ($bm): string {
return preg_match('/^\s*' . $k . '\s*:\s*(.+?)\s*$/mi', $bm[1], $m) ? trim($m[1]) : '';
};
// evidence may run to several lines; take everything after the label.
$ev = preg_match('/^\s*evidence\s*:\s*(.*)$/mis', $bm[1], $em) ? trim($em[1]) : '';
// Both of these run to several lines, so neither can stop at a line break the way $field()
// does — a two-sentence diagnosis would silently lose its second half. Each runs until the
// next known label instead, which also means the order the model writes them in stops
// mattering. That matters more than it sounds: evidence used to take everything after its own
// label, so a diagnosis written after it was absorbed into the quote, and a guess sitting
// inside a verbatim block is exactly the confusion this report is shaped to prevent.
$until = fn(string $k, string $others) =>
preg_match('/^\s*' . $k . '\s*:\s*(.*?)(?=^\s*(?:' . $others . ')\s*:|\z)/mis', $bm[1], $m)
? trim($m[1]) : '';
$ev = $until('evidence', 'diagnosis|component|summary');
$diag = $until('diagnosis', 'evidence|component|summary');
$component = $field('component');
@@ -1138,6 +1156,10 @@ if ($can('file_bugs')
$res = ['ok' => false];
} else {
$res = vv_ai_bug_write($component, $field('summary'), $ev, [
// The model's reading, kept apart from the quote it is a reading of. Stored under its
// own key so the report can label it as inference — mixed into the evidence it would
// be indistinguishable from something the log actually said.
'diagnosis' => $diag,
'asked' => mb_substr($question, 0, 300),
'scope' => $scope,
'log' => $scopedLog['path'] ?? null,
+10
View File
@@ -1334,6 +1334,16 @@ function vv_ai_bug_report(array $b): string {
$out .= "### Evidence — verbatim, " . $vLabel . "\n\n```\n"
. rtrim((string) $g('evidence')) . "\n```\n\n";
// Deliberately after the evidence and deliberately labelled. This is the assistant's reading,
// and the heading has to survive being skim-read: a diagnosis printed next to a log quote
// gets remembered as a second log quote, and the next reader inherits a guess as a finding.
if (!empty($ctx['diagnosis'])) {
$out .= "### The assistant's reading — INFERENCE, not established\n\n"
. "> " . str_replace("\n", "\n> ", trim((string) $ctx['diagnosis'])) . "\n\n"
. "_Written by a 14B model from the evidence above. Worth checking, not worth "
. "trusting._\n\n";
}
if (!empty($ctx['asked'])) {
$out .= "### What was being asked when it was noticed\n\n> "
. str_replace("\n", "\n> ", trim((string) $ctx['asked'])) . "\n\n";