<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Audit-Dimension on Tarragon</title><link>https://tarrragon.github.io/blog/tags/audit-dimension/</link><description>Recent content in Audit-Dimension on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Tue, 19 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/audit-dimension/index.xml" rel="self" type="application/rss+xml"/><item><title>Data topology 是 process content 的第 6 audit 維度</title><link>https://tarrragon.github.io/blog/report/data-topology-as-audit-dimension/</link><pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/report/data-topology-as-audit-dimension/</guid><description>&lt;h2 id="結論">結論&lt;/h2>
&lt;p>Process content 的 &lt;a href="../content-structure-by-max-diff-dimension/">diff dimension audit&lt;/a> 原本 5 維 — schema / operational / paradigm / components / application change — 漏了 &lt;em>data topology&lt;/em> 這軸。Topology 是 &lt;em>資料在 cluster / partition / region 之間的分佈拓樸&lt;/em>、跟既有 5 維任一個都不對等：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>維度&lt;/th>
 &lt;th>處理對象&lt;/th>
 &lt;th>對 topology 的關係&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Schema / API&lt;/td>
 &lt;td>資料結構（column / type / index）&lt;/td>
 &lt;td>不同層、schema 不變 topology 可能變&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Operational model&lt;/td>
 &lt;td>運維 stack（HA / backup / monitoring）&lt;/td>
 &lt;td>topology 可能影響 ops、但不是同一概念&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Paradigm&lt;/td>
 &lt;td>核心抽象（OLTP / log / pub-sub）&lt;/td>
 &lt;td>同 paradigm 內 topology 可變&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Components&lt;/td>
 &lt;td>元件數量（1 vs N）&lt;/td>
 &lt;td>同 component 數可有不同 topology&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Application change&lt;/td>
 &lt;td>application code 改動量&lt;/td>
 &lt;td>topology 變不必然 application 改&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Data topology&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>slot / shard / partition / region 分佈&lt;/strong>&lt;/td>
 &lt;td>&lt;strong>本卡新增的第 6 維&lt;/strong>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>&lt;strong>Data topology 是 &lt;em>資料分佈&lt;/em> 層級的概念&lt;/strong> — 跟資料結構（schema）、運維機制（operational）、抽象模型（paradigm）、組件數量（components）、application code 改動量（application change）並列為第 6 軸；topology 變動時其他 5 維可能完全不變、但 &lt;em>資料在 cluster / partition / region 之間的擺放方式&lt;/em> 改變、需要獨立的結構處理。&lt;/p>
&lt;p>擴 audit 到 6 維、新增 &lt;a href="../content-structure-by-max-diff-dimension/">Type F「Topology re-layout」&lt;/a> 結構對映 &lt;em>topology 高差異&lt;/em> 的 process content。&lt;/p>
&lt;h2 id="topology-的-5-個-sub-dimension">Topology 的 5 個 sub-dimension&lt;/h2>
&lt;p>不同 source/target 配對對 topology 的影響不同、用 5 sub-dimension 描述具體變化：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Sub-dimension&lt;/th>
 &lt;th>內容&lt;/th>
 &lt;th>例&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Sharding strategy&lt;/td>
 &lt;td>Slot / hash / range / consistent hash / key-based&lt;/td>
 &lt;td>Redis cluster slot 重分配&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Partition strategy&lt;/td>
 &lt;td>Declarative / range / list / hash / sub-partition&lt;/td>
 &lt;td>PostgreSQL monthly → daily partition&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Replication topology&lt;/td>
 &lt;td>Single primary / multi-master / star / hub-spoke / mesh&lt;/td>
 &lt;td>Single primary → multi-master 切換、或加 logical replication subscriber&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Region distribution&lt;/td>
 &lt;td>Single / multi-AZ / multi-region / global&lt;/td>
 &lt;td>Cassandra single DC → multi-DC&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Co-location / locality&lt;/td>
 &lt;td>Locality-aware queries / row-level region pinning&lt;/td>
 &lt;td>CockroachDB region 強制 row 對應&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>任一 sub-dimension 變動就構成 topology layout 變動；多個 sub-dimension 同時變更（如「sharding strategy + region distribution 同時改」）是 &lt;em>complex topology migration&lt;/em>、結構複雜度高。&lt;/p></description><content:encoded><![CDATA[<h2 id="結論">結論</h2>
<p>Process content 的 <a href="../content-structure-by-max-diff-dimension/">diff dimension audit</a> 原本 5 維 — schema / operational / paradigm / components / application change — 漏了 <em>data topology</em> 這軸。Topology 是 <em>資料在 cluster / partition / region 之間的分佈拓樸</em>、跟既有 5 維任一個都不對等：</p>
<table>
  <thead>
      <tr>
          <th>維度</th>
          <th>處理對象</th>
          <th>對 topology 的關係</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Schema / API</td>
          <td>資料結構（column / type / index）</td>
          <td>不同層、schema 不變 topology 可能變</td>
      </tr>
      <tr>
          <td>Operational model</td>
          <td>運維 stack（HA / backup / monitoring）</td>
          <td>topology 可能影響 ops、但不是同一概念</td>
      </tr>
      <tr>
          <td>Paradigm</td>
          <td>核心抽象（OLTP / log / pub-sub）</td>
          <td>同 paradigm 內 topology 可變</td>
      </tr>
      <tr>
          <td>Components</td>
          <td>元件數量（1 vs N）</td>
          <td>同 component 數可有不同 topology</td>
      </tr>
      <tr>
          <td>Application change</td>
          <td>application code 改動量</td>
          <td>topology 變不必然 application 改</td>
      </tr>
      <tr>
          <td><strong>Data topology</strong></td>
          <td><strong>slot / shard / partition / region 分佈</strong></td>
          <td><strong>本卡新增的第 6 維</strong></td>
      </tr>
  </tbody>
</table>
<p><strong>Data topology 是 <em>資料分佈</em> 層級的概念</strong> — 跟資料結構（schema）、運維機制（operational）、抽象模型（paradigm）、組件數量（components）、application code 改動量（application change）並列為第 6 軸；topology 變動時其他 5 維可能完全不變、但 <em>資料在 cluster / partition / region 之間的擺放方式</em> 改變、需要獨立的結構處理。</p>
<p>擴 audit 到 6 維、新增 <a href="../content-structure-by-max-diff-dimension/">Type F「Topology re-layout」</a> 結構對映 <em>topology 高差異</em> 的 process content。</p>
<h2 id="topology-的-5-個-sub-dimension">Topology 的 5 個 sub-dimension</h2>
<p>不同 source/target 配對對 topology 的影響不同、用 5 sub-dimension 描述具體變化：</p>
<table>
  <thead>
      <tr>
          <th>Sub-dimension</th>
          <th>內容</th>
          <th>例</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Sharding strategy</td>
          <td>Slot / hash / range / consistent hash / key-based</td>
          <td>Redis cluster slot 重分配</td>
      </tr>
      <tr>
          <td>Partition strategy</td>
          <td>Declarative / range / list / hash / sub-partition</td>
          <td>PostgreSQL monthly → daily partition</td>
      </tr>
      <tr>
          <td>Replication topology</td>
          <td>Single primary / multi-master / star / hub-spoke / mesh</td>
          <td>Single primary → multi-master 切換、或加 logical replication subscriber</td>
      </tr>
      <tr>
          <td>Region distribution</td>
          <td>Single / multi-AZ / multi-region / global</td>
          <td>Cassandra single DC → multi-DC</td>
      </tr>
      <tr>
          <td>Co-location / locality</td>
          <td>Locality-aware queries / row-level region pinning</td>
          <td>CockroachDB region 強制 row 對應</td>
      </tr>
  </tbody>
</table>
<p>任一 sub-dimension 變動就構成 topology layout 變動；多個 sub-dimension 同時變更（如「sharding strategy + region distribution 同時改」）是 <em>complex topology migration</em>、結構複雜度高。</p>
<h2 id="為什麼-topology-不能塞進既有-5-維">為什麼 topology 不能塞進既有 5 維</h2>
<p>Reviewer 質疑：為什麼不直接歸進 operational 或 paradigm？三個拒絕理由：</p>
<ol>
<li><strong>Schema 不變但 topology 變</strong>：PostgreSQL <code>partition strategy</code> 改（monthly → daily）— schema 完全相同、partition boundary 重劃；歸 Schema 維度錯位</li>
<li><strong>Operational stack 不變但 topology 變</strong>：Redis cluster 加 node 重分 slot — Sentinel / monitoring / backup 不變、純粹是 slot mapping 重劃；歸 Operational 維度太寬</li>
<li><strong>Paradigm 不變但 topology 變</strong>：Cassandra 從 single DC 加到 multi-DC — 同 distributed DB paradigm、co-location / replication topology 變；歸 Paradigm 維度誤導</li>
<li><strong>Components 不變但 topology 變</strong>：Kafka topic re-partition（10 partitions → 100）— 同 1 個 cluster、partition count 變；歸 Components 維度錯位</li>
</ol>
<p>Topology 是 <em>獨立的問題軸</em>、5 維 audit 漏掉時會誤判結構。</p>
<h2 id="觸發-type-f-的情境">觸發 Type F 的情境</h2>
<table>
  <thead>
      <tr>
          <th>情境</th>
          <th>Topology 變化</th>
          <th>是否同 vendor</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Cluster re-sharding</td>
          <td>Slot / shard 重分配</td>
          <td>yes</td>
      </tr>
      <tr>
          <td>Partition redesign</td>
          <td>Partition boundary / strategy 重劃</td>
          <td>yes</td>
      </tr>
      <tr>
          <td>Single-region → multi-region</td>
          <td>Region distribution + replication topology 雙變</td>
          <td>多數 yes（同 vendor 加 region）</td>
      </tr>
      <tr>
          <td>Multi-master rollout</td>
          <td>Replication topology 從 single primary 變 multi-master</td>
          <td>yes</td>
      </tr>
      <tr>
          <td>DynamoDB GSI / global tables</td>
          <td>Sharding + replication 雙變</td>
          <td>yes</td>
      </tr>
      <tr>
          <td>Kafka topic re-partitioning</td>
          <td>Sharding strategy 變</td>
          <td>yes</td>
      </tr>
      <tr>
          <td>Cassandra keyspace re-balance</td>
          <td>Replication factor（sub-dim 3）+ token range（sub-dim 1）雙變</td>
          <td>yes</td>
      </tr>
      <tr>
          <td>MongoDB sharded cluster 加 shard</td>
          <td>Sharding 重分布</td>
          <td>yes</td>
      </tr>
  </tbody>
</table>
<p>多數 Type F 場景是 <em>同 vendor</em> — 跟 <a href="../content-structure-by-max-diff-dimension/">#127</a> Type A-E 預設「跨 vendor」對應、Type F 是 <em>同 vendor 內 topology 重劃</em>。</p>
<h2 id="6-維-audit-decision-ruleupdated">6 維 audit decision rule（updated）</h2>
<p>擴 audit 到 6 維後、type 對映規則更新：</p>
<table>
  <thead>
      <tr>
          <th>維度組合</th>
          <th>對映 type</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Schema = High（其他 Low）</td>
          <td>Type A phased rule translation</td>
      </tr>
      <tr>
          <td>全 Low</td>
          <td>Type B drop-in</td>
      </tr>
      <tr>
          <td>Operational = High（其他 Low）</td>
          <td>Type C operational redesign hybrid</td>
      </tr>
      <tr>
          <td>Components = High</td>
          <td>Type D parallel streams</td>
      </tr>
      <tr>
          <td>Paradigm = High</td>
          <td>Type E partial + 混合架構</td>
      </tr>
      <tr>
          <td><strong>Topology = High（其他 Low）</strong></td>
          <td><strong>Type F topology re-layout</strong>（本卡新增）</td>
      </tr>
      <tr>
          <td>多軸 High</td>
          <td>按 <a href="../content-structure-by-max-diff-dimension/">#127 多重歸類</a> 規則</td>
      </tr>
  </tbody>
</table>
<p>主導維度判讀的優先序也擴張：Schema &gt; Paradigm &gt; Operational &gt; Topology &gt; Components。Topology 在 schema / paradigm / operational 之後、components 之前 — 因為 topology 對讀者 conceptual impact 通常比 components 拆分大、但比 schema / paradigm 小。</p>
<h2 id="type-ftopology-re-layout結構-anatomy">Type F「Topology re-layout」結構 anatomy</h2>
<p>從 <a href="/blog/backend/02-cache-redis/vendors/redis/cluster-resharding/" data-link-title="Redis Cluster Re-sharding：source = target，但 topology 重劃的 5 段流程" data-link-desc="Redis cluster re-sharding 是 5 type migration 漏類實證 — source / target 同 cluster、無 schema / paradigm 差、但 16384 slot 重分配是核心；本文涵蓋 4 種 re-sharding driver、slot migration 機制、redis-cli --cluster rebalance / reshard 工具、5 個 production 踩雷（cluster busy / replica lag / client cache stale / cross-slot transaction / monitor gap）">Redis cluster re-sharding</a> 抽出的標準形態：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">1. 為什麼 re-layout（4-N 種 driver）
</span></span><span class="line"><span class="ln">2</span><span class="cl">2. 結構 differentiator（re-layout 不是 migration）
</span></span><span class="line"><span class="ln">3</span><span class="cl">3. Pre-layout analysis（current topology audit / hot key / slot 分佈）
</span></span><span class="line"><span class="ln">4</span><span class="cl">4. Re-layout 機制（slot migration / partition split / shard rebalance）
</span></span><span class="line"><span class="ln">5</span><span class="cl">5. Execution flow（per-step、含 rollback boundary）
</span></span><span class="line"><span class="ln">6</span><span class="cl">6. Production 故障演練
</span></span><span class="line"><span class="ln">7</span><span class="cl">7. Capacity / cost
</span></span><span class="line"><span class="ln">8</span><span class="cl">8. 整合 / 下一步</span></span></code></pre></div><p>7-9 章節、200-260 行。三個 <em>新元素</em> 是 Type F 的核心承擔：</p>
<ul>
<li><strong>Pre-layout analysis 段</strong>：在執行前列出當前 topology（slot 分佈 / hot key / replica lag / partition imbalance）、決定 <em>re-layout 的範圍跟順序</em>；缺這段、後續執行階段沒 baseline 可比、failure 偵測延遲</li>
<li><strong>Re-layout 機制段</strong>：解釋 vendor 的 <em>slot migration / partition split / shard rebalance</em> protocol —讀者要理解 vendor 內部機制才能預估 latency / locking / atomicity 邊界</li>
<li><strong>Execution flow per-step + rollback boundary</strong>：跟 Type A 的 phased 對照、Type F per-step 粒度更細（單 slot migration vs 整個 phase）、每 step 都要明示 <em>能否回退、回退時資料狀態</em></li>
</ul>
<p>跟 Type B 對照、Type F 多了「topology audit」段、Step-by-step 比 Type B 細（per-step 不是 per-cutover）；跟 Type A phased 對照、Type F 多數情境不需要 schema translation / parallel run / cleanup phase（source / target 同 cluster）；但 <em>multi-region rollout</em> 子情境例外、仍需 parallel run（兩 region 同跑後切流量）— 此時 Type F + Type A parallel run 段組合應用、見「多重歸類」規則。</p>
<p>注意 anatomy 列 8 row 是 <em>規範形態</em>、不是強制機械對映 — 實作上「結構 differentiator」+「pre-layout analysis」段可 inline 到開頭 audit 段（如 <a href="/blog/backend/02-cache-redis/vendors/redis/cluster-resharding/" data-link-title="Redis Cluster Re-sharding：source = target，但 topology 重劃的 5 段流程" data-link-desc="Redis cluster re-sharding 是 5 type migration 漏類實證 — source / target 同 cluster、無 schema / paradigm 差、但 16384 slot 重分配是核心；本文涵蓋 4 種 re-sharding driver、slot migration 機制、redis-cli --cluster rebalance / reshard 工具、5 個 production 踩雷（cluster busy / replica lag / client cache stale / cross-slot transaction / monitor gap）">Redis cluster re-sharding</a> 的「Source = Target，但 topology 重劃」段內聯處理）、實作 H2 數可能比 anatomy 列 row 少 1-2 個。</p>
<h2 id="production-反模式">Production 反模式</h2>
<table>
  <thead>
      <tr>
          <th>反模式</th>
          <th>後果</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>把 re-sharding 套 Type B drop-in</td>
          <td>漏掉 slot migration 機制段、cluster busy 跟 stale client cache 沒被處理</td>
      </tr>
      <tr>
          <td>把 multi-region rollout 套 Type C</td>
          <td>漏掉 locality-aware queries 跟 replication topology 設計</td>
      </tr>
      <tr>
          <td>Topology 變化只列在「容量」段</td>
          <td>讀者把 topology 當 capacity 子議題、忽略 <em>結構</em> 影響</td>
      </tr>
      <tr>
          <td>多 sub-dimension 同時變、只寫一個</td>
          <td>例：Cassandra 加 DC 同時改 replication factor、只寫前者</td>
      </tr>
      <tr>
          <td>Type F 套錯場景（topology 沒變的 migration）</td>
          <td>強迫 phased per-step、phase 空白</td>
      </tr>
  </tbody>
</table>
<h2 id="跟其他抽象層原則的關係">跟其他抽象層原則的關係</h2>
<table>
  <thead>
      <tr>
          <th>原則</th>
          <th>關係</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td><a href="../content-structure-by-max-diff-dimension/">#127 Process content 結構由最大差異維度決定</a></td>
          <td>父卡 — 本卡擴 #127 的 audit 框架從 5 維到 6 維、新增 Type F；#127 的 5 type 仍適用、本卡加第 6 type</td>
      </tr>
      <tr>
          <td><a href="../collapse-is-implicit-default/">#125 Collapse 是隱形預設</a></td>
          <td>同骨 — 5 維 audit 漏 topology 是「結構分類 collapse 掉 topology 軸」、是 #125 在 audit dimension surface 的子實例</td>
      </tr>
      <tr>
          <td><a href="../standard-driven-vs-case-driven-domain-judgment/">#118 Standard-driven vs case-driven domain judgment</a></td>
          <td>Sibling — 兩卡都是 <em>寫作前的 domain audit</em>、#118 判 case-driven vs standard-driven、本卡判 topology 是否需要 Type F</td>
      </tr>
      <tr>
          <td><a href="../cadence-homogenization-in-batch-writing/">#122 Cadence 同質化是模板的隱形維度</a></td>
          <td>同骨 — 模板有「內容欄位 / cadence」兩維度（#122）vs audit 有「6 維 / topology」兩 layer；都是「初始框架漏軸、用實證浮現補位」</td>
      </tr>
  </tbody>
</table>
<h2 id="判讀徵兆">判讀徵兆</h2>
<table>
  <thead>
      <tr>
          <th>訊號</th>
          <th>該做的事</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>寫到一半發現 5 維 audit 都 Low、但內容跟 Type B drop-in 不一樣</td>
          <td>Topology 可能是漏掉的維度、補 6 維 audit</td>
      </tr>
      <tr>
          <td>「容量規劃」段比實作段還複雜</td>
          <td>Topology 變動被誤歸 capacity、應該獨立段</td>
      </tr>
      <tr>
          <td>Sharding / partition / region 任一變動</td>
          <td>跑 topology audit、評估是否 Type F</td>
      </tr>
      <tr>
          <td>同 vendor 內升級 / re-layout</td>
          <td>大概率不是 5 type、檢查 topology 是否變</td>
      </tr>
      <tr>
          <td>Type B 結構寫不下實際內容</td>
          <td>可能是 Type F 而非 Type B</td>
      </tr>
      <tr>
          <td>多個 sub-dimension 同時變</td>
          <td>Complex topology migration、結構複雜度 +1 階</td>
      </tr>
  </tbody>
</table>
<p><strong>核心</strong>：5 維 audit 漏 topology 是初始框架的盲點；topology 是 <em>資料分佈</em> 而非 <em>資料結構 / 元件 / 抽象</em>、需要獨立 audit 軸。Type F「Topology re-layout」對映 topology = High 的 process content、跟 Type A-E 並列；多軸 High 配對按 <a href="../content-structure-by-max-diff-dimension/">#127</a> 多重歸類規則處理。</p>
<hr>
<h2 id="self-aware-limitation本卡的-6-個未解結構性質疑">Self-aware limitation：本卡的 6 個未解結構性質疑</h2>
<p>第二輪 4-reviewer audit 揭露 6 項結構性 issue、本卡選擇 <em>meta-acknowledgment</em>（記錄）而非 <em>substantive restructure</em>（重寫）— 跟 <a href="../content-structure-by-max-diff-dimension/">#127 self-aware limitation</a> spirit 一致：</p>
<ol>
<li><strong>6 維仍可能漏類</strong>：reviewer 提 identity / authorization / consistency / transactional / data residency 三軸候選；本卡確認 <em>6 維是 current best understanding、不是窮盡</em>；下一輪 batch 跑前優先驗證這些候選軸是否真的獨立</li>
<li><strong>Type F 跟 Type B 結構重疊度高</strong>：anatomy 8 row 中 6 row 跟 Type B 對齊、實質差異在「pre-layout analysis + re-layout 機制」兩段；可能下次 evolution 是 <em>Type B 的 variant</em> 而非並列 type；保留現狀因為「同 cluster」邊界對讀者區分有用</li>
<li><strong>「不需要 parallel run」claim 部分不成立</strong>：multi-region rollout 子情境仍需 parallel run（兩 region 同跑然後切流量）— anatomy 已加註此例外、跟「多重歸類」規則組合應用</li>
<li><strong>主導維度優先序是 audience-dependent heuristic</strong>：DBA 視角 Topology 可能 &gt; Operational、application developer 視角 Schema &gt; Paradigm；當前 <code>Schema &gt; Paradigm &gt; Operational &gt; Topology &gt; Components</code> 預設是「跨 audience 平均」、非 universal；reviewer 識別此 stipulation 性質</li>
<li><strong>「topology 不能塞進既有 5 維」拒絕理由的窄定義依賴</strong>：4 個拒絕點都靠 narrow 既有 5 維定義成立；換個合理定義（如「component = 任何 cluster-internal primitive、包含 partition」）topology 跟 components 邊界會 collapse；保留現狀因為當前定義對寫作判讀有用</li>
<li><strong>既有 5 篇 playbook 沒 retroactive audit</strong>：6 維框架 retroactively 對既有 Type A-E 文章未重審；Splunk → Elastic / Datadog → Grafana / Postgres → Aurora 按 6 維可能變 multi-axis；這是已知 <em>silent grandfathering</em>、不是清白「擴張」</li>
</ol>
<p>下一輪 batch trigger：</p>
<ul>
<li>寫 1-2 篇 Type F dogfood 驗證 anatomy 通用性（Cassandra re-balance / PG partition redesign 是候選）</li>
<li>若浮現 <em>Type F 跟 Type B 結構真同構</em>、考慮降級為 variant</li>
<li>若浮現 <em>identity / consistency / residency 真的獨立軸</em>、再擴 audit 到 7 維</li>
<li>既有 5 篇 retroactive audit 在累積到 10+ migration playbook 後做、單獨成 retrospective report</li>
</ul>
<h3 id="update2026-05-19-第三輪-migration-batch-後4-條-tripwire-全驗證">Update（2026-05-19 第三輪 migration batch 後）：4 條 tripwire 全驗證</h3>
<p>第三輪 migration batch（5 篇）執行了上述 4 條 trigger、各自結果：</p>
<table>
  <thead>
      <tr>
          <th>Tripwire 預測</th>
          <th>第三輪結果</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Type F dogfood × 2 驗證 anatomy 通用性</td>
          <td><strong>完成</strong>：<a href="/blog/backend/01-database/vendors/postgresql/partition-redesign/" data-link-title="PostgreSQL Partition Redesign：當 monthly partition 越跑越慢" data-link-desc="PostgreSQL partition redesign 是 Type F「topology re-layout」第 2 個 dogfood — 從 monthly partition 改 daily / 從 range 改 list / 從單軸改 sub-partition；6 維 audit 皆 Low &#43; topology 軸 High；涵蓋 partition 不平衡偵測、ATTACH/DETACH 線上重劃、5 個 production 踩雷、跟 partition_pruning &#43; autovacuum 整合">PG partition redesign</a> + <a href="/blog/backend/01-database/vendors/mongodb/shard-expansion-multi-dc/" data-link-title="MongoDB Shard Expansion &#43; Multi-DC：Type F「不需要 parallel run」的 multi-region 例外" data-link-desc="MongoDB sharded cluster 加 shard &#43; 跨 DC expansion 是 Type F「topology re-layout」第 3 個 dogfood — 同時改 sharding &#43; replication topology &#43; region distribution；驗證 [#128](/report/data-topology-as-audit-dimension/) self-aware limitation 第 3 點「Type F 不需要 parallel run」claim 的例外（multi-region rollout 必須 parallel run &#43; 切流量）；涵蓋 chunk migration / replica set add member / cross-DC routing">MongoDB shard+multi-DC</a>；anatomy 在 PG / MongoDB 上仍適用、跟 Redis re-sharding 對齊</td>
      </tr>
      <tr>
          <td>Type F vs Type B 結構同構驗證</td>
          <td><strong>部分浮現</strong>：PG partition / Redis re-sharding 不需 parallel run、MongoDB multi-DC 需要；建議 Type F 拆 <em>F-cluster</em>（單 cluster 內、不需 parallel run）+ <em>F-multi-region</em>（跨 region、需 parallel run）兩 sub-type、未來累積更多 case 後 commit</td>
      </tr>
      <tr>
          <td>Identity / consistency / residency 三軸候選驗證</td>
          <td><strong>三軸各 1 case 驗證、工作量分佈支持獨立軸</strong>：<a href="/blog/backend/07-security-data-protection/vendors/hashicorp-vault/migrate-to-aws-secrets-manager/" data-link-title="Vault → AWS Secrets Manager：「secret」不是「secret」、identity model 才是核心差異" data-link-desc="Vault → AWS Secrets Manager migration 表面是 secret store 替換、實際核心是 identity model 對位（Vault token &#43; policy vs AWS IAM &#43; resource policy）；驗證 [#128](/report/data-topology-as-audit-dimension/) self-aware limitation 提出的 identity axis 候選 — identity 是否獨立 audit 軸；5 個 production 踩雷（IAM principal 對位 / dynamic credential 對等失敗 / lease lifecycle 模型不同 / audit log 結構差 / 計費模型反轉）">Vault → AWS Secrets Manager</a>（identity、45% 工作量）/ <a href="/blog/backend/01-database/vendors/dynamodb/consistency-model-optimization/" data-link-title="DynamoDB Strongly Consistent → Eventually Consistent：same protocol, different contract" data-link-desc="DynamoDB consistency model 從 strongly consistent read 改 eventually consistent read 是 50% cost 優化但風險集中在 application contract — 同 vendor / 同 protocol / 同 table / 不同 read consistency；驗證 [#128](/report/data-topology-as-audit-dimension/) self-aware limitation 提出的 consistency axis 候選；涵蓋 read pattern audit / 5 個 production 踩雷">DynamoDB consistency</a>（consistency、85% 工作量）/ <a href="/blog/backend/01-database/vendors/postgresql/multi-region-gdpr-rollout/" data-link-title="PostgreSQL Multi-Region GDPR Rollout：政策驅動的 migration 屬本 methodology 嗎" data-link-desc="PostgreSQL 單 region → multi-region 同時滿足 GDPR EU residency 是 *政策驅動* 兼 *topology 變動* 兼 *operational redesign* 的多軸 migration；驗證 [#128](/report/data-topology-as-audit-dimension/) self-aware limitation 提出的 residency axis 候選 — residency 是 driver 還是獨立 audit 軸；涵蓋 logical replication 配 GDPR / 5 個 production 踩雷 / cross-region cost">PG GDPR multi-region</a>（residency、40% 工作量）；累積到 3-5 case / 軸後 commit 升 7-9 維 audit</td>
      </tr>
      <tr>
          <td>既有 5 篇 retroactive audit</td>
          <td>暫不執行、累積到 10+ migration playbook 後再做（當前共 10 篇 migration、剛達 trigger threshold、留下輪 retrospective 處理）</td>
      </tr>
  </tbody>
</table>
<p>3 軸候選驗證 detail：</p>
<ul>
<li><strong>Identity axis</strong>：Vault → AWS Secrets Manager 45% 工作量在 identity model 對位（Vault token vs IAM principal）、不歸 schema / operational / application change；驗證 identity 可獨立發生 + 帶獨立工作量</li>
<li><strong>Consistency axis</strong>：DynamoDB strong → eventual 85% 工作量在 per-call-site contract review、不歸 paradigm / application change；驗證 consistency 可獨立發生 + 帶獨立工作量</li>
<li><strong>Residency axis</strong>：GDPR multi-region 40% 工作量在 compliance（DPIA / evidence collection / DPO sign-off）、reverse-constrain topology + operational + application；驗證 residency 不只是 driver、是 cross-cutting constraint</li>
</ul>
<p>新浮現議題（不在原 tripwire 內）：</p>
<ul>
<li><strong>Residency 是 cross-cutting constraint vs 獨立軸</strong>：reviewer 把 residency 歸為 driver、實證上是 <em>cross-cutting constraint</em> — 反向約束其他維度 + 帶獨立合規工作量；可能需要 <em>constraint layer</em> 概念跟 axis 並列</li>
<li><strong>Type F sub-type 浮現</strong>：multi-region rollout 跟 cluster re-sharding 是不同 sub-type；前者需 parallel run、後者不需；anatomy 在 sub-type 之間有差異</li>
</ul>
]]></content:encoded></item><item><title>Sibling Coverage Asymmetry Blindspot：Priority 評估漏掉的「對稱性維度」</title><link>https://tarrragon.github.io/blog/report/sibling-coverage-asymmetry-blindspot-in-priority/</link><pubDate>Tue, 19 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/report/sibling-coverage-asymmetry-blindspot-in-priority/</guid><description>&lt;h2 id="核心priority-評估的-sibling-對稱性盲點">核心：Priority 評估的 sibling 對稱性盲點&lt;/h2>
&lt;p>當批量 A 跟批量 B 是 &lt;em>sibling&lt;/em>（同類 vendor / 同類角色 / 應有對等 coverage）、但 A 後寫卻超過 B、心智模型容易 collapse 到「A 是 reference template / B 是 baseline」的角色分配、忽略 &lt;em>B 才該 ≥ A coverage 的對稱性 priority&lt;/em>。Priority 列表往往跳過 B、列其他「新領域擴張」選項。&lt;/p>
&lt;p>問題不在 &lt;em>推某個 vendor&lt;/em>、在 &lt;em>priority 評估維度漏掉 sibling symmetry&lt;/em>。&lt;/p>
&lt;h2 id="casemysql-18-篇-vs-pg-11-篇後的-priority-列表">Case：MySQL 18 篇 vs PG 11 篇後的 priority 列表&lt;/h2>
&lt;p>時間線：&lt;/p>
&lt;ol>
&lt;li>PG 11 篇先寫完（autovacuum-tuning / declarative-partitioning / patroni-ha / pgbouncer-config / pitr-wal-archiving / logical-replication-debezium + 5 migration playbook）&lt;/li>
&lt;li>MySQL 從 0 開始、user 要求「第一個示範服務、儘量都寫」、寫到 17 篇 deep article + migration playbook + 既有 migrate-to-postgresql = 18 篇 / 5715 行&lt;/li>
&lt;li>推薦下一步 priority 時、列「DynamoDB / Aurora / SQLite / MongoDB / CockroachDB / Spanner / Cosmos DB」、PG &lt;strong>不在列表&lt;/strong>&lt;/li>
&lt;li>User 問：「為什麼這裡列的選項沒有 PG？我們做完了嗎？」&lt;/li>
&lt;/ol>
&lt;p>實際盤點：&lt;/p>
&lt;ul>
&lt;li>PG 11 篇 vs MySQL 18 篇、PG 缺 &lt;strong>7 個 MySQL sibling deep article&lt;/strong>（replication-topology / online-schema-change-tools / query-optimization / lock-contention / vitess-sharding 對應 Citus / group-replication 對應 BDR / modern-sql-features 反向視角）&lt;/li>
&lt;li>PG 還缺 &lt;strong>4 個 PG-only 議題&lt;/strong>（JSONB deep dive / Extension ecosystem / Full-text search / Replication slot management）&lt;/li>
&lt;/ul>
&lt;p>User 直覺 catch 到 &lt;em>coverage asymmetry&lt;/em>、但我 priority 列表沒提供這個視角。&lt;/p>
&lt;h2 id="機制為什麼會忽略">機制：為什麼會忽略&lt;/h2>
&lt;p>至少 5 個 priority bias 共同貢獻：&lt;/p>
&lt;h3 id="1-先存在就-mature隱性假設">1. 「先存在就 mature」隱性假設&lt;/h3>
&lt;p>PG 11 篇先存在 → 直覺映射「PG 已 mature」。沒做 &lt;em>cross-sectional 對比&lt;/em>：&lt;/p>
&lt;ul>
&lt;li>PG 11 篇 vs MySQL 18 篇、絕對量比較&lt;/li>
&lt;li>議題覆蓋對應：MySQL 有哪些 deep article、PG 對應的是否都有&lt;/li>
&lt;/ul>
&lt;p>「11 篇」這個絕對數字 &lt;em>看起來合理&lt;/em>、但跟 MySQL 18 篇對比後 &lt;em>結構性不足&lt;/em>。心智模型把「合理」當成「mature」、跳過了相對性 audit。&lt;/p></description><content:encoded><![CDATA[<h2 id="核心priority-評估的-sibling-對稱性盲點">核心：Priority 評估的 sibling 對稱性盲點</h2>
<p>當批量 A 跟批量 B 是 <em>sibling</em>（同類 vendor / 同類角色 / 應有對等 coverage）、但 A 後寫卻超過 B、心智模型容易 collapse 到「A 是 reference template / B 是 baseline」的角色分配、忽略 <em>B 才該 ≥ A coverage 的對稱性 priority</em>。Priority 列表往往跳過 B、列其他「新領域擴張」選項。</p>
<p>問題不在 <em>推某個 vendor</em>、在 <em>priority 評估維度漏掉 sibling symmetry</em>。</p>
<h2 id="casemysql-18-篇-vs-pg-11-篇後的-priority-列表">Case：MySQL 18 篇 vs PG 11 篇後的 priority 列表</h2>
<p>時間線：</p>
<ol>
<li>PG 11 篇先寫完（autovacuum-tuning / declarative-partitioning / patroni-ha / pgbouncer-config / pitr-wal-archiving / logical-replication-debezium + 5 migration playbook）</li>
<li>MySQL 從 0 開始、user 要求「第一個示範服務、儘量都寫」、寫到 17 篇 deep article + migration playbook + 既有 migrate-to-postgresql = 18 篇 / 5715 行</li>
<li>推薦下一步 priority 時、列「DynamoDB / Aurora / SQLite / MongoDB / CockroachDB / Spanner / Cosmos DB」、PG <strong>不在列表</strong></li>
<li>User 問：「為什麼這裡列的選項沒有 PG？我們做完了嗎？」</li>
</ol>
<p>實際盤點：</p>
<ul>
<li>PG 11 篇 vs MySQL 18 篇、PG 缺 <strong>7 個 MySQL sibling deep article</strong>（replication-topology / online-schema-change-tools / query-optimization / lock-contention / vitess-sharding 對應 Citus / group-replication 對應 BDR / modern-sql-features 反向視角）</li>
<li>PG 還缺 <strong>4 個 PG-only 議題</strong>（JSONB deep dive / Extension ecosystem / Full-text search / Replication slot management）</li>
</ul>
<p>User 直覺 catch 到 <em>coverage asymmetry</em>、但我 priority 列表沒提供這個視角。</p>
<h2 id="機制為什麼會忽略">機制：為什麼會忽略</h2>
<p>至少 5 個 priority bias 共同貢獻：</p>
<h3 id="1-先存在就-mature隱性假設">1. 「先存在就 mature」隱性假設</h3>
<p>PG 11 篇先存在 → 直覺映射「PG 已 mature」。沒做 <em>cross-sectional 對比</em>：</p>
<ul>
<li>PG 11 篇 vs MySQL 18 篇、絕對量比較</li>
<li>議題覆蓋對應：MySQL 有哪些 deep article、PG 對應的是否都有</li>
</ul>
<p>「11 篇」這個絕對數字 <em>看起來合理</em>、但跟 MySQL 18 篇對比後 <em>結構性不足</em>。心智模型把「合理」當成「mature」、跳過了相對性 audit。</p>
<h3 id="2-新領域擴張優於既有領域對齊的-progress-bias">2. 「新領域擴張」優於「既有領域對齊」的 progress bias</h3>
<p>Priority 列表時、DynamoDB / Aurora / SQLite 等 vendor <em>看起來進度感強</em> — 從 0 推到 N、新領域擴張。PG 補齊看起來 <em>重複勞動</em> — 從 11 推到 18、改善舊領域。</p>
<p>實際上：</p>
<ul>
<li>新領域擴張 <em>增加 surface area</em>、但不改善既有結構</li>
<li>既有領域對齊 <em>修補 baseline</em>、是 reference template 成立的前提</li>
</ul>
<p>當 baseline 跟 reference template 不對稱時、後者作為 <em>示範服務</em> 的價值打折扣 — 「MySQL 怎麼寫 vendor article」沒法 fully 套到 PG、因為 PG 本身不對稱。</p>
<h3 id="3-priority-評估維度漏-sibling-symmetry">3. Priority 評估維度漏 sibling symmetry</h3>
<p>我用的 priority 評估維度：</p>
<ul>
<li>T1 vs T2 vendor 分類</li>
<li>領域重要度</li>
<li>已有量</li>
<li>新領域 vs 既有領域</li>
</ul>
<p><strong>漏掉的維度</strong>：</p>
<ul>
<li>Sibling vendor 對稱性（A 跟 B 同類、A 寫完後 B coverage 是否對齊）</li>
<li>Reference template 跟 baseline 的關係（後寫的 reference template 應 ≤ baseline）</li>
</ul>
<p>「Sibling 對稱性」這個維度不在預設 priority 評估清單、就被自動忽略。</p>
<h3 id="4-reference-template-vs-baseline-角色混淆">4. Reference template vs Baseline 角色混淆</h3>
<p>寫 vendor article 時、<em>哪個是 baseline、哪個是 reference template</em> 的心智模型可能反轉：</p>
<ul>
<li>直覺：「先寫的 = baseline、後寫的 = reference / extension」</li>
<li>真實：「baseline 應 ≥ reference template coverage、不該倒過來」</li>
</ul>
<p>MySQL 18 篇是 <em>user-driven 要求</em> — user 明說「第一個示範服務、儘量都寫」。所以 MySQL 寫得多不是錯。但 <em>PG 沒對齊到同水準</em> 才是漏掉的紀律。</p>
<p>當 MySQL 寫到 reference template 規模、PG 還在 11 篇、心智模型容易 collapse 到「MySQL 是新 baseline、PG 是 legacy partial」、其實是 <em>baseline 應該升級到 reference template 水準</em>。</p>
<h3 id="5-sequential-vs-cross-sectional-coverage-評估">5. Sequential vs cross-sectional coverage 評估</h3>
<p>寫作過程是 sequential —寫 MySQL 17 篇是一段時間、寫完看 git diff stat 確認進度、然後 priority 下一步。<strong>Coverage 評估是 point-in-time 的</strong>：</p>
<ul>
<li>Point-in-time（sequential）：「我這 batch 寫了多少」</li>
<li>Cross-sectional（symmetric）：「我寫的這個跟 sibling 是否對齊」</li>
</ul>
<p>寫 MySQL 第 17 篇時 self-cross-check：「PG 對應有沒有？」是 cross-sectional 行為、不是預設行為。</p>
<p>Priority 列表階段沒回頭跑 cross-sectional audit、就把 PG 排除。</p>
<h2 id="修法">修法</h2>
<h3 id="1-priority-candidate-list-必須跑-sibling-symmetry-audit">1. Priority candidate list 必須跑 sibling symmetry audit</h3>
<p>提 priority 列表時、強制 cross-check：</p>
<ul>
<li>列出該批量影響的 <em>sibling vendor / sibling role</em></li>
<li>對比每個 sibling 的 coverage（篇數 + 議題覆蓋 mapping）</li>
<li>若有 asymmetry、把「補齊 sibling」加進 priority 列表 <em>跟新領域並列</em></li>
</ul>
<h3 id="2-vendors_index內容覆蓋進度表加對稱性視角">2. Vendors/_index「內容覆蓋進度」表加對稱性視角</h3>
<p>當前內容覆蓋進度只列「已寫 / 未寫」、不列 <em>sibling 之間相對進度</em>。改善：</p>
<ul>
<li>加 <em>「跟 sibling 對應」欄</em>：每個 article 標 sibling vendor 是否有對應</li>
<li>加 <em>總計篇數 + sibling 對比</em> 欄：直觀看到 asymmetry</li>
</ul>
<h3 id="3-先-mature-baseline再擴張紀律">3. 「先 mature baseline、再擴張」紀律</h3>
<p>寫 vendor batch 時、紀律：</p>
<ul>
<li>確認 <em>baseline vendor 對齊到 reference template 水準</em>、再推下一個 vendor</li>
<li>例外：user 明確要求先擴張某 vendor 時、加註 <em>baseline 待對齊</em> 為 known limitation</li>
</ul>
<h3 id="4-audit-dimension-list-加-coverage-symmetry">4. Audit dimension list 加 <em>Coverage symmetry</em></h3>
<p>跟 <a href="../data-topology-as-audit-dimension/">Data Topology as Audit Dimension</a> 同型 —audit 維度可擴張。把 <em>sibling coverage symmetry</em> 加進 priority audit 維度：</p>
<ul>
<li>既有維度：T1 / 領域 / 已有量 / 新 vs 既有</li>
<li>新增維度：<strong>sibling 對稱性</strong>（A 跟 B 同類時、coverage 對齊度）</li>
</ul>
<h2 id="跟既有原則的關係">跟既有原則的關係</h2>
<ul>
<li><a href="../data-topology-as-audit-dimension/">Data Topology as Audit Dimension</a>：本卡是 <em>priority 評估維度漏一個</em>、同型但不同 axis</li>
<li><a href="../collapse-is-implicit-default/">Collapse is Implicit Default</a>：priority 評估 collapse 到「新領域擴張」維度、是其變體</li>
<li><a href="../multi-pass-review-frame-granularity-blindspot/">Multi-Pass Review Frame Granularity Blindspot</a>：multi-pass review 漏 catch 的同型、但本卡是 <em>priority assessment 漏 catch</em>、不是 <em>review 漏 catch</em></li>
</ul>
<h2 id="反向驗證">反向驗證</h2>
<p>不該誤用本卡：</p>
<ul>
<li><em>Sibling vendor 對稱性</em> 不等於 <em>每個 vendor 都該寫到同篇數</em>。MySQL 18 篇對 PG 合理（兩大 SQL OLTP baseline），但 SQLite / DynamoDB / Spanner 各 18 篇不合理（領域窄 / niche audience）</li>
<li>對稱性 audit 是 <em>對 baseline / reference template 雙方適用</em>、不是擴張到所有 sibling</li>
<li>真正 niche vendor（如 Spanner / Cosmos DB 對小團隊）可以 <em>明確 backlog 標記 minimum coverage</em>、不必對齊 baseline</li>
</ul>
<h2 id="觸發再評估">觸發再評估</h2>
<p>未來累積到以下情境、本卡應重新 review：</p>
<ul>
<li>寫第二個 baseline pair（02 cache Redis vs Memcached / 03 queue Kafka vs NATS 等）時、是否同樣踩 asymmetry blindspot</li>
<li>多 reviewer audit 是否能 catch coverage asymmetry（4-reviewer 沒設計這軸、之後 batch 可加 reviewer E <em>coverage symmetry</em>）</li>
<li>Sibling 對稱性 audit 進工具化（vendors/_index 自動產 asymmetry warning）後是否解決</li>
</ul>
]]></content:encoded></item></channel></rss>