feat: add DeepSeek message-history factorial probe

This commit is contained in:
wuyang
2026-07-29 18:05:59 +08:00
parent 28f8066626
commit efe3ffcb4e
11 changed files with 1890088 additions and 33 deletions
+756 -11
View File
@@ -12,6 +12,8 @@ import rawMatched24Repro from "@/data/deepseek-v2-lite-routing-matched24-repro.j
import rawLengthSensitivity from "@/data/deepseek-v2-lite-routing-length-sensitivity.json";
import rawTemplate from "@/data/deepseek-v2-lite-routing-template.json";
import rawTemplateRepro from "@/data/deepseek-v2-lite-routing-template-repro.json";
import rawHistory from "@/data/deepseek-v2-lite-routing-history-factorial.json";
import rawHistoryRepro from "@/data/deepseek-v2-lite-routing-history-factorial-repro.json";
const trace = rawTrace as any;
const repro = rawRepro as any;
@@ -26,11 +28,14 @@ const matched24Repro = rawMatched24Repro as any;
const lengthSensitivity = rawLengthSensitivity as any;
const template = rawTemplate as any;
const templateRepro = rawTemplateRepro as any;
const history = rawHistory as any;
const historyRepro = rawHistoryRepro as any;
const absorbExact = JSON.stringify(absorb) === JSON.stringify(absorbRepro);
const corpusExact = JSON.stringify(corpus) === JSON.stringify(corpusRepro);
const matched16Exact = JSON.stringify(matched16) === JSON.stringify(matched16Repro);
const matched24Exact = JSON.stringify(matched24) === JSON.stringify(matched24Repro);
const templateExact = JSON.stringify(template) === JSON.stringify(templateRepro);
const historyExact = JSON.stringify(history) === JSON.stringify(historyRepro);
const bytes = (value: number) => value >= 1024
? `${(value / 1024).toFixed(2)} KiB`
: `${value.toLocaleString()} B`;
@@ -144,6 +149,101 @@ const templateCompact = {
})),
};
const templateCompactJson = JSON.stringify(templateCompact).replaceAll("<", "\\u003c");
const historyConditions = ["s0f0", "s1f0", "s0f1", "s1f1"];
const historyEdges = ["system_at_f0", "system_at_f1", "fewshot_at_s0", "fewshot_at_s1"];
const aggregateHistoryAlignment = (layer: any, domain: string, edge: string) => {
const rows = layer.prompts
.filter((prompt: any) => prompt.domain === domain)
.map((prompt: any) => prompt.alignments[edge]);
const aligned = rows.reduce((sum: number, row: any) => sum + row.aligned_tokens, 0);
const setExact = rows.reduce((sum: number, row: any) => sum + row.set_topk_exact, 0);
const orderedExact = rows.reduce((sum: number, row: any) => sum + row.ordered_topk_exact, 0);
const weightedJaccard = rows.reduce(
(sum: number, row: any) => sum + row.mean_jaccard * row.aligned_tokens,
0,
);
return {
aligned,
setExactRate: setExact / aligned,
orderedExactRate: orderedExact / aligned,
meanJaccard: weightedJaccard / aligned,
};
};
const historyCompact = {
domains: history.corpus_contract.domains,
labels: history.corpus_contract.domain_labels,
inference: history.inference_contract,
messages: {
system: history.message_history_contract.system_message,
demoUser: history.message_history_contract.demo_user,
demoAssistant: history.message_history_contract.demo_assistant,
},
exact: historyExact,
layers: history.layers.slice(1).map((layer: any) => ({
layer: layer.layer,
alignment: Object.fromEntries(
history.corpus_contract.domains.map((domain: string) => [
domain,
Object.fromEntries(
historyEdges.map((edge) => [
edge,
aggregateHistoryAlignment(layer, domain, edge),
]),
),
]),
),
scopes: Object.fromEntries(
["target_content", "full_input"].map((scope) => [
scope,
{
modes: Object.fromEntries(
["prompt_balanced", "token_weighted"].map((mode) => {
const statistics = layer.statistics[scope].modes[mode];
return [
mode,
{
conditions: Object.fromEntries(
historyConditions.map((condition) => [
condition,
Object.fromEntries(
history.corpus_contract.domains.map((domain: string) => [
domain,
statistics.conditions[condition][domain].metrics.cv.point,
]),
),
]),
),
factorial: Object.fromEntries(
history.corpus_contract.domains.map((domain: string) => [
domain,
statistics.factorial[domain].metric_effects.cv,
]),
),
comparisons: Object.fromEntries(
historyEdges.map((edge) => [
edge,
Object.fromEntries(
history.corpus_contract.domains.map((domain: string) => [
domain,
{
cv: statistics.comparisons[edge][domain].metrics.cv,
tv: statistics.comparisons[edge][domain].total_variation,
jsd: statistics.comparisons[edge][domain].js_divergence,
},
]),
),
]),
),
},
];
}),
),
},
]),
),
})),
};
const historyCompactJson = JSON.stringify(historyCompact).replaceAll("<", "\\u003c");
const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoint_tensor_bytes;
---
@@ -155,7 +255,7 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
</div>
<p>
固定官方 revision、tokenizer、模型代码和 BF16 第一分片;RTX 5090 连续执行 layer 0–6,
从 3,240 次 token 显微轨迹扩到 870,912 次公开语料路由,并让 layer-1 权重继续走入官方吸收式 cache。
从 3,240 次 token 显微轨迹扩到 1,736,352 次公开语料路由,并让 layer-1 权重继续走入官方吸收式 cache。
所有结论都带证据身份与停止线。
</p>
</header>
@@ -186,8 +286,11 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
<button type="button" role="tab" data-artifact-tab="template" aria-selected="false" tabindex="-1">
<span>06</span><b>官方模板扰动</b><small>raw → user → assistant</small>
</button>
<button type="button" role="tab" data-artifact-tab="history" aria-selected="false" tabindex="-1">
<span>07</span><b>消息历史 2×2</b><small>system × one-shot</small>
</button>
<button type="button" role="tab" data-artifact-tab="evidence" aria-selected="false" tabindex="-1">
<span>07</span><b>证据断面</b><small>revision · shards · rerun</small>
<span>08</span><b>证据断面</b><small>revision · shards · rerun</small>
</button>
</div>
@@ -717,6 +820,136 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
</div>
</section>
<section class="artifact-panel" data-artifact-panel="history" hidden>
<div class="panel-lead">
<div><span>X / MESSAGE-HISTORY FACTORIAL</span><h4>把 system 与 one-shot 拆成四格,而不是只做两组对比</h4></div>
<p>
同一批 128 条目标内容,在官方模板中切换两个固定处理。system 每条恒增 16 tokens,
one-shot 每条恒增 17 tokens;四格同 batch,目标内容精确对齐。
</p>
</div>
<div class="history-ledger">
<article><span>SOURCE PROMPTS</span><b>128</b><p>与上一模板探针逐项同 cohort</p></article>
<article><span>2×2 VARIANTS</span><b>512</b><p>S0F0 · S1F0 · S0F1 · S1F1</p></article>
<article><span>INPUT TOKENS</span><b>24,040</b><p>四格完整协议输入</p></article>
<article><span>REAL ROUTES</span><b>865,440</b><p>四格 × 前六个 MoE 层</p></article>
<article><span>ALIGNED TARGET</span><b>2,874 × 4</b><p>相同字符跨度与 token ID</p></article>
<article class="exact"><span>INDEPENDENT RERUN</span><b>{historyExact ? "BYTE-EXACT" : "MISMATCH"}</b><p>完整 JSON SHA-256 5765fbf8…c1fb</p></article>
</div>
<div class="history-factorial" aria-label="System 与 one-shot 的二乘二实验矩阵">
<div class="history-axis">
<span>ONE-SHOT FACTOR →</span>
<b>F0 · 无示例</b>
<b>F1 · 固定 user / assistant 示例</b>
</div>
<div class="history-row">
<strong>S0<br /><small>无 SYSTEM</small></strong>
<article>
<span>S0F0 / BASE</span>
<div><i>USER TARGET</i><em>Assistant:</em></div>
<p>每条约 30 tokens;只含目标单轮。</p>
</article>
<article>
<span>S0F1 / ONE-SHOT</span>
<div><b>USER DEMO</b><b>ASSISTANT · EOS</b><i>USER TARGET</i><em>Assistant:</em></div>
<p>相对 base 每条固定 +17 tokens。</p>
</article>
</div>
<div class="history-row">
<strong>S1<br /><small>固定 SYSTEM</small></strong>
<article>
<span>S1F0 / SYSTEM</span>
<div><u>SYSTEM</u><i>USER TARGET</i><em>Assistant:</em></div>
<p>相对 base 每条固定 +16 tokens。</p>
</article>
<article>
<span>S1F1 / COMBINED</span>
<div><u>SYSTEM</u><b>USER DEMO</b><b>ASSISTANT · EOS</b><i>USER TARGET</i><em>Assistant:</em></div>
<p>两种增量严格相加:+16 +17 tokens。</p>
</article>
</div>
</div>
<div class="history-controls">
<div>
<span>MOE LAYER</span>
<div class="layer-switch history-layer-switch" role="group" aria-label="选择消息历史层">
{[1, 2, 3, 4, 5, 6].map((layer) => (
<button type="button" data-history-layer={layer} class={layer === 1 ? "active" : ""}>L{layer}</button>
))}
</div>
</div>
<div>
<span>MEASUREMENT SCOPE</span>
<div class="history-scope-switch" role="group" aria-label="选择消息历史统计范围">
<button type="button" data-history-scope="target_content" aria-pressed="true">目标内容</button>
<button type="button" data-history-scope="full_input" aria-pressed="false">完整输入</button>
</div>
</div>
<div>
<span>AGGREGATION</span>
<div class="history-mode-switch" role="group" aria-label="选择消息历史聚合口径">
<button type="button" data-history-mode="prompt_balanced" aria-pressed="true">prompt 等权</button>
<button type="button" data-history-mode="token_weighted" aria-pressed="false">token 加权</button>
</div>
</div>
<div>
<span>DEPTH MAP EFFECT</span>
<div class="history-effect-switch" role="group" aria-label="选择消息历史因子效应">
<button type="button" data-history-effect="system_main" aria-pressed="false">System</button>
<button type="button" data-history-effect="fewshot_main" aria-pressed="false">One-shot</button>
<button type="button" data-history-effect="interaction" aria-pressed="true">Interaction</button>
</div>
</div>
<p data-history-note>
目标内容:四格只保留相同相对字符跨度与相同 token ID;下方 Δ 均为 CV 的 source-paired 2×2 效应。
</p>
</div>
<div class="history-domain-grid" data-history-domain-grid></div>
<div class="history-buffer-summary">
<article><span>SYSTEM EDGE TV</span><b>24 / 24 ↓</b><p>有 one-shot 时,六层四域的 system-edge TV 全部下降。</p></article>
<article><span>MEAN TARGET TV</span><b>.073 → .019</b><p>system at F0 → system at F1,平均下降约 74%。</p></article>
<article><span>|Δ CV|</span><b>21 / 24 ↓</b><p>绝对 CV system effect 从均值 .068 降至 .016。</p></article>
<article><span>BOUNDARY</span><b>HISTORY BUFFER</b><p>不能单独归因给示例语义;距离、EOS、角色与文本共同变化。</p></article>
</div>
<div class="history-buffer">
<div>
<span>CURRENT LAYER / SYSTEM EDGE</span>
<h5>同样增加 16 tokens,先经过一轮历史后变化更小</h5>
<p>每域同时显示目标路由 TV 与逐 token top-6 set exact;左为 F0,右为 F1。</p>
</div>
<div data-history-buffer-grid></div>
</div>
<div class="history-depth">
<div>
<span>DEPTH MAP / Δ CV</span>
<h5 data-history-depth-title>Interaction:两个处理是否可以简单相加</h5>
<p>绿色为 CV 下降,红色为 CV 上升;颜色身份只表示方向,不表示能力好坏。</p>
</div>
<div data-history-depth-map></div>
</div>
<div class="evidence-links">
<a href="https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite/blob/main/tokenizer_config.json" rel="noreferrer">官方 tokenizer_config ↗</a>
<a href="https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite" rel="noreferrer">官方 V2-Lite 模型卡 ↗</a>
<a href="https://arxiv.org/abs/2405.04434" rel="noreferrer">DeepSeek-V2 技术报告 ↗</a>
</div>
<div class="artifact-boundary">
<b>HISTORY COMPOSITION, NOT ROLE SEMANTICS</b>
<p>
这组 2×2 同时改变固定文本、角色边界、EOS、距离与长度;“24 / 24 TV 下降”是本探针中的
历史缓冲模式,不证明 one-shot 语义本身稳定了路由,更不证明答案质量提升。
</p>
</div>
</section>
<section class="artifact-panel" data-artifact-panel="evidence" hidden>
<div class="panel-lead">
<div><span>O + X / EVIDENCE SLICE</span><h4>为什么执行到 layer 6 就停,而不是把“部分下载”写成“完整复现”</h4></div>
@@ -810,12 +1043,15 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
<code>experiments/deepseek/compare_routing_length_control.py</code> ·
<code>research/DEEPSEEK_ROUTING_LENGTH_CONTROL_AUDIT.md</code> ·
<code>experiments/deepseek/v2_lite_routing_template_probe.py</code> ·
<code>research/DEEPSEEK_ROUTING_TEMPLATE_AUDIT.md</code>
<code>research/DEEPSEEK_ROUTING_TEMPLATE_AUDIT.md</code> ·
<code>experiments/deepseek/v2_lite_routing_history_factorial_probe.py</code> ·
<code>research/DEEPSEEK_ROUTING_HISTORY_FACTORIAL_AUDIT.md</code>
</figcaption>
<script is:inline type="application/json" data-dsv2-trace set:html={compactJson}></script>
<script is:inline type="application/json" data-dsv2-corpus set:html={corpusCompactJson}></script>
<script is:inline type="application/json" data-dsv2-template set:html={templateCompactJson}></script>
<script is:inline type="application/json" data-dsv2-history set:html={historyCompactJson}></script>
</figure>
<script>
@@ -829,10 +1065,17 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
const payloadNode = one<HTMLScriptElement>("[data-dsv2-trace]");
const corpusNode = one<HTMLScriptElement>("[data-dsv2-corpus]");
const templateNode = one<HTMLScriptElement>("[data-dsv2-template]");
if (!payloadNode?.textContent || !corpusNode?.textContent || !templateNode?.textContent) return;
const historyNode = one<HTMLScriptElement>("[data-dsv2-history]");
if (
!payloadNode?.textContent
|| !corpusNode?.textContent
|| !templateNode?.textContent
|| !historyNode?.textContent
) return;
const data = JSON.parse(payloadNode.textContent);
const corpusData = JSON.parse(corpusNode.textContent);
const templateData = JSON.parse(templateNode.textContent);
const historyData = JSON.parse(historyNode.textContent);
const tabs = all<HTMLButtonElement>("[data-artifact-tab]");
const panels = all<HTMLElement>("[data-artifact-panel]");
@@ -1405,6 +1648,175 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
});
});
renderTemplate();
let historyLayerNumber = 1;
let historyScope = "target_content";
let historyMode = "prompt_balanced";
let historyEffect = "interaction";
const historyEffectLabels: Record<string, string> = {
system_main: "SYSTEM MAIN",
fewshot_main: "ONE-SHOT MAIN",
interaction: "INTERACTION",
};
const historyConditionLabels: Record<string, string> = {
s0f0: "S0F0",
s1f0: "S1F0",
s0f1: "S0F1",
s1f1: "S1F1",
};
const renderHistory = () => {
all<HTMLButtonElement>("[data-history-layer]").forEach((button) => {
button.classList.toggle(
"active",
Number(button.dataset.historyLayer) === historyLayerNumber,
);
});
all<HTMLButtonElement>("[data-history-scope]").forEach((button) => {
button.setAttribute(
"aria-pressed",
String(button.dataset.historyScope === historyScope),
);
});
all<HTMLButtonElement>("[data-history-mode]").forEach((button) => {
button.setAttribute(
"aria-pressed",
String(button.dataset.historyMode === historyMode),
);
});
all<HTMLButtonElement>("[data-history-effect]").forEach((button) => {
button.setAttribute(
"aria-pressed",
String(button.dataset.historyEffect === historyEffect),
);
});
set(
"[data-history-note]",
historyScope === "target_content"
? "目标内容:四格只保留相同相对字符跨度与相同 token ID;下方 Δ 均为 CV 的 source-paired 2×2 效应。"
: "完整输入:system、demo、EOS、目标与 Assistant: 全部进入统计;它回答协议流量,不等同于目标内容本身。",
);
const currentLayer = historyData.layers.find(
(item: any) => item.layer === historyLayerNumber,
);
const view = currentLayer.scopes[historyScope].modes[historyMode];
const grid = one<HTMLElement>("[data-history-domain-grid]");
if (grid) {
grid.replaceChildren(...historyData.domains.map((domain: string) => {
const card = document.createElement("article");
const label = document.createElement("span");
const cells = document.createElement("div");
const effect = view.factorial[domain][historyEffect];
const primary = document.createElement("strong");
const ci = document.createElement("p");
const allEffects = document.createElement("small");
const edges = document.createElement("em");
label.textContent = corpusLabels[domain];
cells.className = "history-cell-values";
["s0f0", "s1f0", "s0f1", "s1f1"].forEach((condition) => {
const cell = document.createElement("i");
const name = document.createElement("small");
const value = document.createElement("b");
name.textContent = historyConditionLabels[condition];
value.textContent = view.conditions[condition][domain].toFixed(3);
cell.append(name, value);
cells.append(cell);
});
primary.textContent = `${historyEffectLabels[historyEffect]} · Δ ${signed(effect.point)}`;
primary.className = deltaClass(effect.ci95);
ci.textContent = `source-paired 95% ${formatSignedCi(effect.ci95)}`;
allEffects.textContent = [
`S ${signed(view.factorial[domain].system_main.point)}`,
`F ${signed(view.factorial[domain].fewshot_main.point)}`,
`I ${signed(view.factorial[domain].interaction.point)}`,
].join(" · ");
edges.textContent = [
`system TV at F0 ${view.comparisons.system_at_f0[domain].tv.point.toFixed(3)}`,
`at F1 ${view.comparisons.system_at_f1[domain].tv.point.toFixed(3)}`,
].join(" → ");
card.append(label, cells, primary, ci, allEffects, edges);
return card;
}));
}
const bufferView = currentLayer.scopes.target_content
.modes.prompt_balanced;
const bufferGrid = one<HTMLElement>("[data-history-buffer-grid]");
if (bufferGrid) {
bufferGrid.replaceChildren(...historyData.domains.map((domain: string) => {
const card = document.createElement("article");
const label = document.createElement("span");
const tv = document.createElement("b");
const reduction = document.createElement("strong");
const stability = document.createElement("p");
const f0 = bufferView.comparisons.system_at_f0[domain].tv.point;
const f1 = bufferView.comparisons.system_at_f1[domain].tv.point;
const alignF0 = currentLayer.alignment[domain].system_at_f0;
const alignF1 = currentLayer.alignment[domain].system_at_f1;
label.textContent = corpusLabels[domain];
tv.textContent = `TV ${f0.toFixed(3)} → ${f1.toFixed(3)}`;
reduction.textContent = `↓ ${((1 - f1 / f0) * 100).toFixed(0)}%`;
stability.textContent = `top-6 set exact ${(alignF0.setExactRate * 100).toFixed(1)}% → ${(alignF1.setExactRate * 100).toFixed(1)}% · J ${alignF0.meanJaccard.toFixed(3)} → ${alignF1.meanJaccard.toFixed(3)}`;
card.append(label, tv, reduction, stability);
return card;
}));
}
const effectTitles: Record<string, string> = {
system_main: "System main:平均两个 one-shot 水平后的 system 增量",
fewshot_main: "One-shot main:平均两个 system 水平后的示例增量",
interaction: "Interaction:两个处理是否可以简单相加",
};
set("[data-history-depth-title]", effectTitles[historyEffect]);
const depth = one<HTMLElement>("[data-history-depth-map]");
if (depth) {
depth.replaceChildren(...historyData.domains.map((domain: string) => {
const row = document.createElement("div");
const label = document.createElement("b");
label.textContent = corpusLabels[domain];
row.append(label);
historyData.layers.forEach((layer: any) => {
const effect = layer.scopes[historyScope].modes[historyMode]
.factorial[domain][historyEffect];
const cell = document.createElement("span");
cell.className = deltaClass(effect.ci95);
cell.style.setProperty(
"--strength",
String(Math.min(1, Math.abs(effect.point) / 0.22)),
);
cell.textContent = `L${layer.layer} ${signed(effect.point)}`;
cell.title = `${corpusLabels[domain]} · L${layer.layer} · ${historyEffectLabels[historyEffect]} Δ CV ${signed(effect.point)} · paired 95% ${formatSignedCi(effect.ci95)}`;
row.append(cell);
});
return row;
}));
}
};
all<HTMLButtonElement>("[data-history-layer]").forEach((button) => {
button.addEventListener("click", () => {
historyLayerNumber = Number(button.dataset.historyLayer);
renderHistory();
});
});
all<HTMLButtonElement>("[data-history-scope]").forEach((button) => {
button.addEventListener("click", () => {
historyScope = button.dataset.historyScope ?? "target_content";
renderHistory();
});
});
all<HTMLButtonElement>("[data-history-mode]").forEach((button) => {
button.addEventListener("click", () => {
historyMode = button.dataset.historyMode ?? "prompt_balanced";
renderHistory();
});
});
all<HTMLButtonElement>("[data-history-effect]").forEach((button) => {
button.addEventListener("click", () => {
historyEffect = button.dataset.historyEffect ?? "interaction";
renderHistory();
});
});
renderHistory();
});
</script>
@@ -1460,7 +1872,14 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.template-controls > div > span,
.template-domain-grid > :global(article > span),
.template-negative-control span,
.template-depth span {
.template-depth span,
.history-ledger span,
.history-factorial span,
.history-controls > div > span,
.history-domain-grid > :global(article > span),
.history-buffer-summary span,
.history-buffer span,
.history-depth span {
margin: 0;
color: var(--blue);
font: 700 .69rem/1.3 var(--font-mono);
@@ -1514,7 +1933,7 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.artifact-status b { color: var(--ink); font-size: .72rem; }
.artifact-tabs {
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-columns: repeat(8, 1fr);
background: var(--ink);
}
.artifact-tabs button {
@@ -2341,6 +2760,311 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
background: rgba(186,118,44,.1);
color: var(--ink);
}
.history-ledger {
display: grid;
grid-template-columns: repeat(6, 1fr);
border: 1px solid rgba(32,32,39,.14);
}
.history-ledger article {
padding: .85rem;
border-right: 1px solid rgba(32,32,39,.12);
}
.history-ledger article:last-child { border-right: 0; }
.history-ledger article.exact { background: rgba(57,120,110,.1); }
.history-ledger b {
display: block;
margin-top: .4rem;
font: 750 1.05rem/1.05 var(--font-display);
}
.history-ledger p {
margin: .3rem 0 0;
color: rgba(32,32,39,.56);
font-size: .61rem;
line-height: 1.4;
}
.history-factorial {
margin-top: .8rem;
border: 1px solid rgba(32,32,39,.15);
overflow-x: auto;
background: #fffdf8;
}
.history-axis,
.history-row {
display: grid;
grid-template-columns: 7rem 1fr 1fr;
min-width: 720px;
}
.history-axis {
background: var(--ink);
color: white;
}
.history-axis > * {
padding: .65rem .8rem;
border-right: 1px solid rgba(255,255,255,.13);
}
.history-axis > b {
font: 650 .64rem/1.3 var(--font-mono);
}
.history-row > strong {
display: grid;
align-content: center;
padding: .8rem;
border-right: 1px solid rgba(32,32,39,.12);
border-bottom: 1px solid rgba(32,32,39,.12);
background: #e5ded2;
color: var(--blue);
font: 750 .8rem/1.4 var(--font-mono);
}
.history-row > strong small {
color: rgba(32,32,39,.55);
font: .56rem/1.35 var(--font-mono);
}
.history-row article {
padding: .8rem;
border-right: 1px solid rgba(32,32,39,.12);
border-bottom: 1px solid rgba(32,32,39,.12);
}
.history-row article > div {
display: flex;
flex-wrap: wrap;
gap: .2rem;
margin-top: .55rem;
}
.history-row article > div > * {
padding: .34rem .4rem;
border: 1px solid rgba(32,32,39,.13);
font: 650 .56rem/1 var(--font-mono);
font-style: normal;
text-decoration: none;
}
.history-row article u { background: rgba(161,77,77,.1); color: var(--red); }
.history-row article b { background: rgba(186,118,44,.1); color: var(--amber); }
.history-row article i { background: rgba(57,120,110,.11); color: var(--teal); }
.history-row article em { background: rgba(98,105,155,.13); color: var(--blue); }
.history-row article p {
margin: .5rem 0 0;
color: rgba(32,32,39,.56);
font-size: .61rem;
line-height: 1.4;
}
.history-controls {
display: grid;
grid-template-columns: auto .9fr .9fr 1.35fr;
gap: .8rem;
align-items: end;
margin-top: .8rem;
padding: .85rem;
border: 1px solid rgba(32,32,39,.14);
background: #e8e2d7;
}
.history-controls > div { display: grid; gap: .45rem; }
.history-controls .layer-switch { margin: 0; }
.history-scope-switch,
.history-mode-switch,
.history-effect-switch { display: flex; }
.history-scope-switch button,
.history-mode-switch button,
.history-effect-switch button {
padding: .58rem .66rem;
border: 1px solid rgba(32,32,39,.22);
background: #fffdf8;
color: var(--ink);
font: 650 .61rem/1 var(--font-mono);
cursor: pointer;
}
.history-scope-switch button + button,
.history-mode-switch button + button,
.history-effect-switch button + button { border-left: 0; }
.history-scope-switch button[aria-pressed="true"],
.history-mode-switch button[aria-pressed="true"],
.history-effect-switch button[aria-pressed="true"] {
border-color: var(--blue);
background: var(--blue);
color: white;
}
.history-controls > p {
grid-column: 1 / -1;
margin: 0;
padding-top: .75rem;
border-top: 1px solid rgba(32,32,39,.12);
color: rgba(32,32,39,.62);
font-size: .69rem;
line-height: 1.5;
}
.history-domain-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
margin-top: .8rem;
border: 1px solid rgba(32,32,39,.14);
background: #fffdf8;
}
.history-domain-grid > :global(article) {
padding: .85rem;
border-right: 1px solid rgba(32,32,39,.12);
}
.history-domain-grid > :global(article:last-child) { border-right: 0; }
.history-domain-grid :global(.history-cell-values) {
display: grid;
grid-template-columns: 1fr 1fr;
gap: .25rem;
margin-top: .55rem;
}
.history-domain-grid :global(.history-cell-values > i) {
display: grid;
gap: .18rem;
padding: .4rem;
background: #e8e2d7;
font-style: normal;
}
.history-domain-grid :global(.history-cell-values small) {
color: rgba(32,32,39,.5);
font: 650 .53rem/1 var(--font-mono);
}
.history-domain-grid :global(.history-cell-values b) {
font: 720 .7rem/1 var(--font-mono);
}
.history-domain-grid > :global(article > strong) {
display: inline-block;
margin-top: .48rem;
padding: .26rem .38rem;
font: 750 .65rem/1 var(--font-mono);
}
.history-domain-grid > :global(article > strong.down),
.history-depth :global(span.down) {
background: rgba(57,120,110,.13);
color: var(--teal);
}
.history-domain-grid > :global(article > strong.up),
.history-depth :global(span.up) {
background: rgba(161,77,77,.12);
color: var(--red);
}
.history-domain-grid > :global(article > strong.neutral),
.history-depth :global(span.neutral) {
background: rgba(186,118,44,.12);
color: var(--amber);
}
.history-domain-grid > :global(article > p) {
margin: .4rem 0 0;
color: rgba(32,32,39,.56);
font: .58rem/1.4 var(--font-mono);
}
.history-domain-grid > :global(article > small),
.history-domain-grid > :global(article > em) {
display: block;
margin-top: .35rem;
color: rgba(32,32,39,.57);
font: .57rem/1.4 var(--font-mono);
font-style: normal;
}
.history-domain-grid > :global(article > em) {
padding-top: .35rem;
border-top: 1px solid rgba(32,32,39,.1);
}
.history-buffer-summary {
display: grid;
grid-template-columns: repeat(4, 1fr);
margin-top: .8rem;
border: 1px solid rgba(32,32,39,.14);
background:
linear-gradient(115deg, rgba(57,120,110,.11), transparent 48%),
#e8e2d7;
}
.history-buffer-summary article {
padding: .9rem;
border-right: 1px solid rgba(32,32,39,.12);
}
.history-buffer-summary article:last-child { border-right: 0; }
.history-buffer-summary b {
display: block;
margin-top: .4rem;
font: 750 .94rem/1.05 var(--font-display);
}
.history-buffer-summary p {
margin: .4rem 0 0;
color: rgba(32,32,39,.58);
font-size: .62rem;
line-height: 1.45;
}
.history-buffer,
.history-depth {
display: grid;
grid-template-columns: .52fr 1.48fr;
gap: 1rem;
margin-top: .8rem;
padding: 1rem;
border: 1px solid rgba(32,32,39,.14);
}
.history-buffer h5,
.history-depth h5 {
margin: .4rem 0;
font: 720 1rem/1.15 var(--font-display);
}
.history-buffer p,
.history-depth p {
margin: 0;
color: rgba(32,32,39,.58);
font-size: .66rem;
line-height: 1.5;
}
.history-buffer > :global([data-history-buffer-grid]) {
display: grid;
grid-template-columns: 1fr 1fr;
gap: .35rem;
}
.history-buffer :global([data-history-buffer-grid] article) {
padding: .65rem;
background: #fffdf8;
border: 1px solid rgba(32,32,39,.12);
}
.history-buffer :global([data-history-buffer-grid] article > *) {
display: block;
}
.history-buffer :global([data-history-buffer-grid] b) {
margin-top: .35rem;
font: 720 .74rem/1.2 var(--font-mono);
}
.history-buffer :global([data-history-buffer-grid] strong) {
margin-top: .3rem;
color: var(--teal);
font: 750 .68rem/1 var(--font-mono);
}
.history-buffer :global([data-history-buffer-grid] p) {
margin-top: .35rem;
font: .55rem/1.4 var(--font-mono);
}
.history-depth > :global([data-history-depth-map]) {
display: grid;
gap: .35rem;
}
.history-depth :global([data-history-depth-map] > div) {
display: grid;
grid-template-columns: 5.5rem repeat(6, 1fr);
gap: .25rem;
}
.history-depth :global([data-history-depth-map] > div > b),
.history-depth :global([data-history-depth-map] > div > span) {
display: grid;
align-items: center;
min-height: 2.2rem;
padding: .35rem;
font: 650 .57rem/1.2 var(--font-mono);
}
.history-depth :global([data-history-depth-map] > div > b) {
color: var(--blue);
}
.history-depth :global([data-history-depth-map] > div > span.down) {
background: color-mix(in srgb, var(--teal) calc(var(--strength) * 55%), #eef0e9);
color: var(--ink);
}
.history-depth :global([data-history-depth-map] > div > span.up) {
background: color-mix(in srgb, var(--red) calc(var(--strength) * 48%), #f3ebe6);
color: var(--ink);
}
.history-depth :global([data-history-depth-map] > div > span.neutral) {
background: rgba(186,118,44,.1);
color: var(--ink);
}
.observed-cache {
display: grid;
grid-template-columns: 1fr auto 1.25fr;
@@ -2579,7 +3303,10 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.length-sensitivity-head,
.template-protocol,
.template-controls,
.template-depth { grid-template-columns: 1fr; }
.template-depth,
.history-controls,
.history-buffer,
.history-depth { grid-template-columns: 1fr; }
.artifact-status { grid-template-columns: 1fr 1fr; }
.artifact-tabs { grid-template-columns: 1fr 1fr; }
.route-controls { grid-template-columns: 1fr 1fr; }
@@ -2593,6 +3320,9 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.corpus-ledger { grid-template-columns: repeat(3, 1fr); }
.template-ledger { grid-template-columns: repeat(3, 1fr); }
.template-domain-grid { grid-template-columns: 1fr 1fr; }
.history-ledger { grid-template-columns: repeat(3, 1fr); }
.history-domain-grid,
.history-buffer-summary { grid-template-columns: 1fr 1fr; }
.template-protocol > i { transform: rotate(90deg); justify-self: center; }
.length-delta-grid { grid-template-columns: 1fr 1fr; }
.corpus-heat-head p { text-align: left; }
@@ -2628,7 +3358,10 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.length-pair-summary,
.template-ledger,
.template-domain-grid,
.template-negative-control { grid-template-columns: 1fr; }
.template-negative-control,
.history-ledger,
.history-domain-grid,
.history-buffer-summary { grid-template-columns: 1fr; }
.route-metrics article,
.cache-ratio article,
.load-lessons article,
@@ -2639,15 +3372,24 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.corpus-findings article,
.template-ledger article,
.template-domain-grid > :global(article),
.template-negative-control article { border-right: 0; border-bottom: 1px solid rgba(32,32,39,.12); }
.template-negative-control article,
.history-ledger article,
.history-domain-grid > :global(article),
.history-buffer-summary article { border-right: 0; border-bottom: 1px solid rgba(32,32,39,.12); }
.corpus-mode-switch,
.corpus-cohort-switch,
.template-scope-switch,
.template-mode-switch { display: grid; grid-template-columns: 1fr; }
.template-mode-switch,
.history-scope-switch,
.history-mode-switch,
.history-effect-switch { display: grid; grid-template-columns: 1fr; }
.corpus-mode-switch button + button,
.corpus-cohort-switch button + button,
.template-scope-switch button + button,
.template-mode-switch button + button { border-left: 1px solid rgba(32,32,39,.22); border-top: 0; }
.template-mode-switch button + button,
.history-scope-switch button + button,
.history-mode-switch button + button,
.history-effect-switch button + button { border-left: 1px solid rgba(32,32,39,.22); border-top: 0; }
.length-delta-grid > :global(article),
.length-pair-summary article { border-right: 0; border-bottom: 1px solid rgba(32,32,39,.11); }
.artifact-boundary { grid-template-columns: 1fr; }
@@ -2664,6 +3406,9 @@ const shardFraction = trace.provenance.shard_1_bytes / trace.provenance.checkpoi
.precision-lens b { text-align: left; }
.template-depth { overflow-x: auto; }
.template-depth > :global([data-template-depth-map]) { min-width: 620px; }
.history-buffer > :global([data-history-buffer-grid]) { grid-template-columns: 1fr; }
.history-depth { overflow-x: auto; }
.history-depth > :global([data-history-depth-map]) { min-width: 620px; }
.layer-evidence { grid-template-columns: repeat(7, 1fr); }
.repro-gate { grid-template-columns: 1fr; }
.repro-gate > p { grid-column: auto; }