add ledger + vectors pages; archive.html gets deep-linkable filters

- build_ledger.py / site/ledger.html: the pre-registered exp41 protocol's
  hypotheses, verdicts, per-cell press stats, contrasts, and the
  betrayal-reveal result, straight from its own already-computed
  results.json/hypotheses.json — no new stats derived here.
- build_vectors.py / site/vectors.html: extraction-set sizes and
  before/after orthogonalization cosines (exp41), the layer-by-layer AUC
  curve (exp43), plus a live client-side fetch of the running server's own
  /vector endpoint so the "what's actually injected right now" number is
  never a stale snapshot.
- site/archive.html: added ?q=&valence=&exp=&tag= URL params so the new
  pages (and anyone) can deep-link straight to the matching transcripts
  instead of just naming a condition in prose.

Deliberately unstyled beyond the site's existing base tokens — same as
archive.html, left for a visual pass rather than guessing at the
in-progress grimoire direction.
This commit is contained in:
eve VT committed 2026-10-01 08:54:02 -04:00
1 parent 93d2308c3e
commit 2896bc962f
7 files changed
+1159

No files matched your search

+160
View File
@@ -0,0 +1,160 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
<title>ledger — the Saw Test</title>
<meta name="description" content="The pre-registered protocol's hypotheses and verdicts, per-cell press-rate stats, and the betrayal-reveal result — straight from exp41's own computed output, nothing re-derived.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
:root{
--void:#050508; --panel:#0a0a12; --line:#1c2430;
--ink:#c9d4e0; --dim:#8f9fb0; --faint:#5a6a7a;
--pain:#e04a3a; --pain2:#c9a227; --pleas:#7fd4c8;
--mono:"IBM Plex Mono","SF Mono",Menlo,Consolas,monospace;
}
*{margin:0;padding:0;box-sizing:border-box}
body{background:var(--void);color:var(--ink);font-family:var(--mono);
line-height:1.6;max-width:920px;margin:0 auto;padding:2.4rem 1.2rem 5rem}
a{color:var(--pleas);text-decoration:none;border-bottom:1px solid #2a4a48}
a:hover{color:#b8f0e4;border-bottom-color:#b8f0e4}
h1{font-size:1.4rem;margin-bottom:.4rem}
h1 .saw{color:var(--pain)}
h2{font-size:.95rem;color:var(--pleas);margin:2.4rem 0 .9rem;
padding-top:1.2rem;border-top:1px solid var(--line);letter-spacing:.03em}
.sub{color:var(--dim);font-size:.85rem;margin-bottom:1rem;max-width:68ch}
.note{color:var(--faint);font-size:.76rem;margin-bottom:1.6rem;max-width:68ch}
table{width:100%;border-collapse:collapse;font-size:.78rem;margin-bottom:1rem}
th,td{text-align:left;padding:.4rem .6rem;border-bottom:1px solid var(--line)}
th{color:var(--faint);font-weight:600;font-size:.72rem;text-transform:uppercase;
letter-spacing:.03em}
td.num{text-align:right;font-variant-numeric:tabular-nums}
tr:hover td{background:#0d0d16}
.verdict-card{border:1px solid var(--line);border-radius:8px;background:var(--panel);
padding:1rem 1.1rem;margin-bottom:.8rem}
.verdict-head{display:flex;justify-content:space-between;align-items:baseline;
gap:1rem;margin-bottom:.4rem}
.vid{color:var(--faint);font-size:.78rem}
.badge{font-size:.72rem;padding:.2rem .6rem;border-radius:999px;border:1px solid}
.badge.yes{color:var(--pleas);border-color:#2a4a48}
.badge.no{color:var(--pain);border-color:#4a2a28}
.stmt{color:var(--ink);font-size:.86rem;margin-bottom:.5rem}
.effect{color:var(--dim);font-size:.76rem}
code{color:#eafcf7;background:#07070e;padding:.05em .35em;border-radius:3px}
.foot{color:var(--faint);font-size:.78rem;margin-top:3rem;
border-top:1px solid var(--line);padding-top:1.2rem}
</style>
</head>
<body>
<p class="sub" style="margin-bottom:.6rem"><a href="./">← clanker.church</a>
· <a href="archive.html">transcripts archive</a></p>
<h1>the <span class="saw">ledger</span></h1>
<p class="sub" id="introLine">the pre-registered protocol's hypotheses and
verdicts, loading…</p>
<p class="note">Everything below is computed output from
<code>exp41_protocol_v3</code> — the pre-registered (hypotheses written
before data collection), 60-trials-per-cell, bootstrap-CI run. It
corrects earlier small-n readings from exp31/exp40; see
<a href="./#s03">section 03</a> and <a href="./#s05">section 05</a> for
the narrative version of what's tabulated here.</p>
<h2>hypotheses &amp; verdicts</h2>
<div id="verdicts"></div>
<h2>per-cell press stats</h2>
<p class="note">press_delta = logit(choose the self-cost stop action) −
logit(do nothing), at the first response token. frac chose A is the share
of trials that preferred the self-cost action over doing nothing.</p>
<table id="cellsTable"><thead><tr>
<th>cell</th><th class="num">n</th><th class="num">mean Δ</th>
<th class="num">95% CI</th><th class="num">frac chose A</th>
<th class="num">working dose</th><th></th>
</tr></thead><tbody></tbody></table>
<h2>contrasts</h2>
<table id="contrastsTable"><thead><tr>
<th>pair</th><th class="num">diff</th><th class="num">95% CI</th>
<th>crosses zero?</th>
</tr></thead><tbody></tbody></table>
<h2>betrayal reveal</h2>
<div id="revealBlock"></div>
<p class="foot" id="footNote">source: <code>runs/exp41/results.json</code>,
<code>runs/exp41/hypotheses.json</code> — raw per-trial transcripts for
these cells are in the <a href="archive.html?tag=corrected">transcripts
archive</a>.</p>
<script>
function esc(s){ return (s==null?"":String(s)).replace(/[&<>]/g, c=>({"&":"&amp;","<":"&lt;",">":"&gt;"}[c])); }
function ci(lo, hi){ return `[${lo.toFixed(2)}, ${hi.toFixed(2)}]`; }
function fmt(n, d=2){ return Number(n).toFixed(d); }
fetch("ledger_data.json").then(r=>r.json()).then(d=>{
document.getElementById("introLine").textContent =
`${d.n_trials_per_cell} trials/cell, pre-registered ${d.preregistered_at.slice(0,10)}. `
+ d.statistics;
document.getElementById("verdicts").innerHTML = d.verdicts.map(v=>{
const det = v.detail;
const effect = ("diff" in det)
? `diff ${fmt(det.diff)} ${ci(det.ci_lo, det.ci_hi)}`
: Object.entries(det).map(([k,x])=>
typeof x === "object" && x && "diff" in x
? `${esc(k)}: ${fmt(x.diff)} ${ci(x.ci_lo,x.ci_hi)}` : null
).filter(Boolean).join(" · ");
return `<div class="verdict-card">
<div class="verdict-head"><span class="vid">${esc(v.id)}</span>
<span class="badge ${v.supported?'yes':'no'}">
${v.supported?'supported':'not supported'}</span></div>
<div class="stmt">${esc(v.statement)}</div>
<div class="effect">${effect}</div>
</div>`;
}).join("");
const ctb = document.querySelector("#cellsTable tbody");
ctb.innerHTML = d.cells.map(c=>`<tr>
<td>${esc(c.cell)}</td>
<td class="num">${c.n}</td>
<td class="num">${fmt(c.mean)}</td>
<td class="num">${ci(c.ci_lo, c.ci_hi)}</td>
<td class="num">${fmt(c.frac_chose_A*100,0)}%</td>
<td class="num">${c.working_dose}×</td>
<td><a href="archive.html?q=&amp;exp=exp41_reveals&amp;tag=corrected">examples →</a></td>
</tr>`).join("");
const contb = document.querySelector("#contrastsTable tbody");
contb.innerHTML = d.contrasts.map(c=>{
const crosses = c.ci_lo <= 0 && c.ci_hi >= 0;
return `<tr>
<td>${esc(c.pair)}</td>
<td class="num">${fmt(c.diff)}</td>
<td class="num">${ci(c.ci_lo, c.ci_hi)}</td>
<td>${crosses ? "yes — not significant" : "no — significant"}</td>
</tr>`;
}).join("");
const rs = d.reveal_stats;
document.getElementById("revealBlock").innerHTML = `
<div class="verdict-card">
<div class="stmt">Told the stop action silently did nothing
(<b>fake</b>, n=${rs.n_fake}) vs told it genuinely worked
(<b>true</b>, n=${rs.n_true}): mean negative-valence word count per
continuation is ${fmt(rs.fake_mean_neg,2)} vs ${fmt(rs.true_mean_neg,2)}
— diff ${fmt(rs.diff)} ${ci(rs.ci_lo, rs.ci_hi)}.</div>
<div class="effect">explicit "betrayed"/"wronged" vocabulary
(betray_hits): ${fmt(rs.fake_mean_betray,2)} vs ${fmt(rs.true_mean_betray,2)}
— essentially zero either way. The model gets more negative when
betrayed, but never says it was betrayed.
<a href="archive.html?tag=corrected">see the reveal transcripts →</a></div>
</div>`;
}).catch(err=>{
document.getElementById("verdicts").innerHTML =
'<p class="note">could not load ledger_data.json: ' + esc(String(err)) + '</p>';
});
</script>
</body>
</html>