---
title: "SRBC Core Patch v0.7：Closure DAG、Incremental Reopen 與 Root Content Integrity"
version: "v0.7"
date: "2026-09-23"
status: "Round 07 closure-graph patch candidate"
---

# SRBC Core Patch v0.7

Round 07 將 source、query、completion family、semantic digest、evidence digest、certificate 與 dependency 真正接成 closure DAG，並對局部 mutation 執行 reopen routing。

本輪直接發現兩個 v0.6.1 artifact gap：

1. derivational dependency 雖然已經有 digest pin，但仍指向舊 v0.6 core digest，而不是 parent 的新 `semantic_digest`；
2. certificate 只有 source/query/family ID，沒有 canonical content digest。

所以：

$$
\boxed{
\text{version label}
\neq
\text{content identity}.
}
$$

---

# 1. Root Content Integrity

正式 runtime 不得只保存：

```yaml
source:
  id: SOURCE-v1
```

而必須至少：

```yaml
source:
  id: SOURCE-v1
  content_digest: ...
query:
  id: Q-v1
  content_digest: ...
completion_family:
  id: F-v1
  content_digest: ...
```

否則同一 ID 被靜默覆寫時，closure graph 無法知道 root 已變。

Round 07 因 Round-06 artifact 沒保存 canonical root bytes，只能暫時使用：

```text
id_surrogate_round07_not_content_hash
```

來測 routing。

它不是 production content integrity。

---

# 2. Dependency Pin 必須指向 Parent Semantic Digest

derivational edge：

$$
C_p
\rightarrow
C_c
$$

應保存：

```yaml
dependencies:
  - claim_id: PARENT
    mode: derivational
    parent_semantic_digest: ...
```

而不是舊的 generic core digest。

因為 child 證明真正依賴的是 parent claim 的 semantic identity，而不是：

- rendering；
- stress-run 次數；
- unrelated evidence metadata。

Round 07 遷移後：

$$
\boxed{
4/4
}
$$

derivational pins 與 parent semantic digest 對齊。

---

# 3. Closure Graph

第一代 typed graph 節點：

$$
V
=
V_S
\cup
V_Q
\cup
V_F
\cup
V_{SD}
\cup
V_{ED}
\cup
V_C
\cup
V_N.
$$

其中：

- $V_S$：source；
- $V_Q$：query；
- $V_F$：completion family；
- $V_{SD}$：semantic digest；
- $V_{ED}$：evidence digest；
- $V_C$：certificate；
- $V_N$：query-neutral nuisance / rendering metadata。

---

# 4. Propagating edges

## 4.1 Root semantic edge

$$
S,Q,F
\rightarrow
SD(C).
$$

source / query / family 改變，certificate 的 semantic identity 必須重算。

## 4.2 Semantic identity edge

$$
SD(C)
\rightarrow
C.
$$

semantic digest 改變，certificate 需要 semantic reissue / revalidation。

## 4.3 Evidence identity edge

$$
ED(C)
\rightarrow
C.
$$

evidence digest 改變，只要求該 certificate 的 evidence freshness 更新。

## 4.4 Derivational dependency

$$
SD(C_p)
\rightarrow
ED(C_c).
$$

parent semantic claim 改變，child proof evidence stale。

---

# 5. Non-propagating edges

## 5.1 Contextual reference

$$
SD(C_p)
\dashrightarrow
ED(C_c)
$$

只作 provenance reference，不自動傳遞 proof staleness。

## 5.2 Nuisance

render label、UI metadata 等：

$$
N(C)
\dashrightarrow
C
$$

不應觸發 semantic / proof reopen。

---

# 6. Incremental Reopen

給定 mutated node：

$$
v,
$$

定義 affected subgraph：

$$
\operatorname{Aff}(v)
=
\operatorname{Reach}^{+}_{E_{\mathrm{prop}}}(v)
\cap
V_C.
$$

其中只沿：

$$
E_{\mathrm{prop}}
$$

傳播。

因此：

$$
\boxed{
\text{reopen exactly the reachable certificate set}.
}
$$

不是：

$$
\boxed{
\text{recompute all}.
}
$$

也不是：

$$
\boxed{
\text{check only direct users}.
}
$$

---

# 7. Reopen State

受影響 certificate 應再依入口 edge 分型。

## Root / semantic change

直接 certificate：

$$
F_C=\operatorname{SEMANTIC\_REISSUE}.
$$

其 derivational descendants：

$$
E_C=\operatorname{DEPENDENCY\_STALE}.
$$

## Evidence-only change

$$
F_C=\operatorname{EVIDENCE\_REISSUE}.
$$

預設不向 children 傳播，除非 child 明確 pins parent evidence digest。

---

# 8. Dependency Graph Well-Foundedness

第一代 SRBC proof dependency 預設必須 DAG。

也就是：

$$
\boxed{
\operatorname{Cycle}(G_{\mathrm{deriv}})
=
\varnothing.
}
$$

Round 07 人工注入：

$$
MH\text{-}C2
\rightarrow
MH\text{-}C1
$$

與既有：

$$
MH\text{-}C1
\rightarrow
MH\text{-}C2
$$

形成 cycle，cycle detector 正確拒絕。

若未來需要 mutually recursive / fixed-point certificate，必須使用新的 explicit certificate type，不得偷偷塞進 ordinary derivational DAG。

---

# 9. Graph / Registry Consistency

runtime 必須雙向檢查：

1. certificate registry 中每一 derivational dependency，都必須有 graph edge；
2. graph 中每一 derivational edge，都必須有 certificate registry 宣告。

因此：

- 刪掉真 edge；
- 加入 spurious edge；
- 把 contextual edge 誤標成 derivational；

都應觸發：

$$
\operatorname{GRAPH\_SCHEMA\_MISMATCH}.
$$

---

# 10. Minimal Reopen 原理

Round 07 支持：

$$
\boxed{
\text{Minimal Reopen}
=
\text{typed reachability over propagating dependency edges}.
}
$$

這個 minimal 指的是：

> 在目前聲明的 graph semantics 下，不漏掉 derivational descendants，同時不重算 disconnected certificates。

它不是「宇宙中絕對最小」。

如果 graph 本身漏 edge，仍會 under-invalidate。

所以 closure graph completeness 也是 verification object。

---

# 11. Over-invalidation 與 Under-invalidation

## Global rebuild

安全但昂貴：

$$
\operatorname{Aff}_{\mathrm{global}}(v)
=
V_C.
$$

## Direct-only

便宜但可能漏 descendant：

$$
\operatorname{Aff}_{\mathrm{direct}}(v)
\subset
\operatorname{Aff}(v).
$$

Round 07 已實測兩種 failure mode。

---

# 12. Reopen Reason Routing

不同 root mutation 應帶 typed reason：

```yaml
source:
  reopen_reason: source_scope_change
query:
  reopen_reason: query_change
completion_family:
  reopen_reason: completion_family_change
semantic_digest:
  reopen_reason: semantic_reissue
evidence_digest:
  reopen_reason: evidence_reissue
nuisance:
  reopen_reason: none
```

讓後續 runtime 可依原因決定：

- full recompute；
- proof-only recompute；
- semantic reissue；
- metadata refresh；
- no-op。

---

# 13. Root Digest Coverage 是 Closure Gate

QRSRC v0.7 新增：

```yaml
root_integrity:
  source_content_digest: required
  query_content_digest: required
  completion_family_content_digest: required
```

只要其中之一缺失：

$$
F_C
\neq
\operatorname{CURRENT\_CONTENT\_VERIFIED}.
$$

可以研究用，但不能宣稱 production-grade incremental freshness。

---

# 14. 新原理

## 原理一

$$
\boxed{
\text{ID equality}
\not\Rightarrow
\text{artifact equality}.
}
$$

## 原理二

$$
\boxed{
\text{Derivational dependencies pin parent semantic identity by default}.
}
$$

## 原理三

$$
\boxed{
\text{Evidence-only mutation does not propagate through semantic-only dependencies}.
}
$$

## 原理四

$$
\boxed{
\text{Incremental reopen is a typed graph reachability problem}.
}
$$

## 原理五

$$
\boxed{
\text{Closure graph completeness itself requires certification}.
}
$$
