終點不等於歷史 v0.2
非交換計算序列、型別化事件依賴與可追溯全域演化
Endpoint Is Not History: Noncommutative Computational Sequences, Typed Event Dependencies, and Traceable Global Evolution
- 系列:Global Computation Methodology Series
- 文件編號:Paper-06
- 版本:v0.2
- 日期:2026-08-24
- 作者:Neo.K
- 協作:Aletheia / GPT
- 狀態:第二輪正式核心論文
- Canonical anchors:Series-00 v0.2、Paper-01 v0.2、Paper-02 v0.2、Paper-03 v0.2、Paper-04 v0.2、Paper-05 v0.2
- 編碼:UTF-8 Markdown
- 數學 delimiter:僅使用
$...$與$$...$$
摘要
Global Computation Methodology(GCM)在前五篇正式論文中,已依序建立 World-relative globality、heterogeneous composition、versioned computational configuration space、typed routing / authority / commit semantics、World–Runtime–Observer separation,以及 finite active realization / unbounded extensibility。當這些元素都允許動態切換、並行、失敗、回復、封存、重啟與 Foundation revision 時,最後一個不可迴避的問題是:若兩條執行最後抵達相同 World state,它們是否可以被視為同一件事?
本文的基本答案是否定的:
以及:
本文將第一輪以 sequence / receipt DAG 表達的歷史模型升級成 typed provenance structure。令 為 history / provenance revision,其中 只是歷史儲存層的 revision identifier,不等同 World commit index、physical time、Runtime schedule 或 causal order。本文明確區分:
一個 append-only log 可以提供 serialization order,但 serialization 不應被偷換成因果全序;一個 checkpoint 可以保存某個時刻的 state,但不能自動回答「為什麼來到這裡」;一個 hash 可以驗證 artifact identity / integrity,但不能取代 causal semantics;一個 rollback 或 compensation 可以恢復某些 state invariant,也不等於「那件事從未發生」。
本文引入 typed event / receipt、typed relation edges、history branch、Foundation lineage、proposal / commit / rollback / compensation separation、replay grade、semantic history quotient、context-dependent independence、retention obligation、counterfactual branch 與 history compression soundness。對 semantics profile ,只有在明確證明:
時,Runtime 才可以在該 semantics 下將兩條 history quotient;endpoint hash equality 本身不足以證明此事。本文同時指出,Mazurkiewicz trace theory、partial-order reduction、Lamport happens-before、vector time、distributed snapshot、database provenance、W3C PROV、Sagas、event sourcing 與 checkpoint/replay 已分別提供成熟先例。GCM 不宣稱發明 partial order、provenance、event log、rollback 或 replay;本文的研究主張,是把這些機制置入同一個 World-relative、typed、authority-aware、Foundation-versioned Runtime methodology,並明確規定何種歷史差異可安全壓縮、何種差異必須被保留。
關鍵詞
Global Computation Methodology;history;provenance;partial order;noncommutativity;causality;receipt DAG;event sourcing;checkpoint;replay;rollback;compensation;trace equivalence;partial-order reduction;Foundation lineage;counterfactual history;history compression
1. 問題設定:現在一樣,不代表過去一樣
對一個最簡單的 deterministic transition system,可以寫:
如果系統只需要從目前 state 繼續計算,保存 往往足夠。然而 GCM 的 Runtime 還需要回答更多問題:
- 哪個 operation 產生目前版本?
- 哪個 domain / configuration / executor 被選中?
- 哪個 representation bridge 被使用?
- 哪些 invariants 被驗證?
- 哪個 caller 具有哪一種 authority?
- 哪次 local execution 成功但 global commit 被拒絕?
- 哪次 retry、rollback、compensation 或 reactivation 發生?
- 哪個 Observer query 觸發了 computation,但沒有修改 World?
- 哪個 Foundation version 定義了當時的合法性?
- 哪條 causal chain 使某個 event 必須先於另一個 event?
因此當前 World state 只是整個 Runtime 歷史的一種壓縮結果,而不是整個過程本身。
令一條 execution history 為:
若從初始狀態 出發:
一般而言:
也就是同一 endpoint 可以由多條不同 history 到達。
2. 本文不主張什麼
本文不主張:
- partial order、logical clock 或 vector clock 由 GCM 首創;
- provenance data model 由 GCM 首創;
- event sourcing、checkpoint、snapshot、replay 或 append-only log 由 GCM 首創;
- rollback、compensation 或 Saga pattern 由 GCM 首創;
- Mazurkiewicz trace、POR 或 DPOR 由 GCM 首創;
- 所有不同 schedule 都必須永久保存;
- 所有 schedule difference 都具有語義差異;
- 所有 history 都必須是單一全序 log;
- hash 等於 history semantics;
- endpoint equality 永遠不足以做任何 deduplication;
- history 必須永久保留所有原始 payload;
- replay 一定可以 exact 重現外部世界;
- rollback 等於把已發生事件從 provenance 中刪除;
- Foundation revision 可以由普通 Runtime event 自動觸發;
- model checking 的 history equivalence 與 Runtime audit equivalence 必然相同。
本文只主張:
在 GCM Runtime 中,state、execution、causality、commit、observation、lifecycle、Foundation revision 與 provenance 必須 typed separation;任何 history quotient / compression 都必須相對明確 semantics 或 retention obligation 證明安全,而不能因 endpoint 相同就無條件合併。
3. 相關研究與定位
3.1 Lamport happens-before:因果不等於牆上時鐘
Lamport 在 1978 年以 happens-before relation 形式化 distributed events 的 partial ordering,並說明 logical clock 可以提供與 causal order 相容的 timestamp。[1]
這直接支持本文的一個基礎限制:
除非額外條件成立。
GCM 不重新發明 happens-before,而是把 causal relation 放入更大的 typed history structure,與 execution、commit、Observer、Foundation lineage 等 relation 並存。
3.2 Vector time 與 global-state reasoning
Fidge 與 Mattern 的 vector-time 工作,使 message-passing computation 的 partial order 可以被更精細地表示;Chandy–Lamport distributed snapshot 則證明 distributed computation 可以在沒有單一全域實體時鐘的情況下定義有意義的 global state / consistent cut。[2,3,4]
因此 GCM 不宣稱「distributed history 不需要 global clock」是新發現。GCM 的問題是:在 heterogeneous World Runtime 中,哪些 clock/order 對象屬於 World、Runtime、Observer、commit、history 或 Foundation,並要求它們不可互相偷換。
3.3 Trace theory 與 partial-order reduction
Mazurkiewicz trace theory以 independence relation 將可交換的 concurrent actions quotient 成 equivalence classes;partial-order reduction 與 dynamic partial-order reduction 進一步在 model checking 中避免探索大量等價 interleavings。[5,6,7]
這與本文的 history compression 有直接啟發:
但 Runtime history 與 model checking 的目標不同。Model checking 可能只需要保留足以驗證 property 的 representative executions;Runtime provenance 可能同時服務 audit、replay、rollback、debugging、learning、governance 與 legal/operational traceability。因此 independence relation 與 quotient semantics 不能直接照搬。
3.4 Provenance 已有成熟資料模型
Buneman、Khanna 與 Tan 對 database provenance 的 why / where distinction,是資料來源與推導研究的重要經典工作。[8] W3C PROV family 進一步建立 domain-agnostic provenance model / ontology,包含 entity、activity、agent、derivation 與 bundle 等概念,用於跨 heterogeneous systems 交換 provenance。[9]
GCM 不把 provenance 當成新資料模型。本文關心的是:GCM 的 route、proposal、verification、commit、Observer、lifecycle 與 Foundation event 應如何映射到 typed provenance,並如何與 canonical World version 一起形成 Runtime 可追溯性。
3.5 Sagas、rollback 與 compensation
Garcia-Molina 與 Salem 的 Sagas 對 long-lived transactions 建立了拆分 transaction 與 compensation 的經典方法。[10]
這提醒 GCM:
尚未 commit 的 proposal 可以被 discard / rollback;已經 commit 且產生外部 side effect 的操作,往往只能以新的 compensating operation 建立後續 commit,而不能假裝原 event 從未發生。
3.6 Event sourcing 與 replay
Event sourcing 長期使用「保存 state-changing events,再由事件重建 state」的架構模式;實務研究亦指出 event schema evolution、projection rebuild 與 privacy 是重要挑戰。[11,12]
2026 年 agent-runtime 工作亦開始把 append-only event log、deterministic projection、fork、replay 與 end-to-end lineage 直接用於 agentic systems。[13,14]
因此本文不宣稱「agent / runtime 應該有 event log」是首創。GCM 更保守:history 可以是 canonical source,也可以只是 World state 的 provenance companion;這取決於 Runtime contract。GCM 不要求所有實作採 event-sourced architecture。
3.7 Transaction reenactment 與 post-mortem provenance
Database transaction reenactment 研究已處理 transaction replay、concurrent effects 與 provenance,用於 post-mortem debugging 與 what-if analysis。[15]
GCM 的 replay semantics 因此不應只寫成「重新跑一次」。它必須記錄 deterministic prerequisites、external inputs、Foundation / model / bridge version、randomness、clock / order assumptions 與 side-effect policy。
4. 從 00–05 匯入的 canonical state-plane
本文沿用 GCM v0.2 expanded core:
其中:
- :World primitive / ontological target;
- :canonical committed World-state presentation;
- :Runtime control state;
- :Observer state;
- :Foundation version;
- :history / provenance structure。
本文保留:
History 不被加入 World primitive 本身;它是 Runtime 用來保存、重建或證明「World 如何演化」的 provenance structure。
5. 四種 index 不得重新合併
Paper-04 已拆開單一 。Paper-06 延續此規則:
因此:
表示它們的語義角色不可偷換;並不要求四者數值永遠不同。
特別地:
也不自動等於:
6. World version 不必假定全域線性
在最簡單的 single-head Runtime 中,可以有:
但若 Runtime 支援 fork、speculative branch、counterfactual branch 或 merge,World version 本身更合理地表示為 graph:
每個 committed version node:
具有 stable identifier; 可以視為 single-head presentation 中的 shorthand,而不是宣稱所有 branches 共享一個宇宙級 total order。
因此:
7. History 的 canonical typed structure
令:
其中:
- :typed event / receipt nodes;
- :typed relation arcs;
- :event type;
- :relation type;
- :proposal / committed / rejected / speculative 等狀態;
- :World、Runtime、Observer、Foundation、model / schema 等版本錨點;
- :必要 payload、digest、external pointer 或 encrypted reference。
這個 structure 不要求所有資料都 inline 保存,也不要求所有 relation 都映射成一條 sequence。
8. Event type 不只等於 World mutation
建議至少區分:
不是所有 event 都修改 。
例如 pure observation 可以:
但仍建立 observer history,因為它可能對後續 decision、audit 或 causal explanation 有意義。
9. Typed relation 不等於一條 DAG edge
對 events ,edge 必須帶 relation type:
其中:
而 可以包含:
這避免把所有 dependency 都縮成一種無類型 arrow。
10. 六種 order 的正式分離
本文至少區分:
一般而言:
某些實作中它們可能部分重合,但不能默認同一。
11. Log order 只是 serialization
若 storage 寫成:
這只證明:
在 log 中有 serialization relation。
它不自動證明:
因此:
這是 GCM history type-safety 的最低要求之一。
12. State Equality 不推出 History Equality
令兩條 history:
如果:
仍可能:
例如:
與 no-op 可以有相同 endpoint,但第一條 path 曾經產生兩個 event。
因此:
13. 非交換性只是最顯眼的 history sensitivity
若:
order 顯然可以改變 endpoint。
例如:
則:
此時 sequence order 必須保留。
但 GCM 更強的主張是:即使 algebraically commute,也不代表 history 可以被刪除。
14. 交換仍可能不等價
即使:
history 仍可能因下列因素不同:
- authority chain;
- external side effect;
- cost / energy / latency;
- resource contention;
- observer-visible intermediate state;
- retry / failure;
- legal / audit obligation;
- model / Foundation version;
- provenance responsibility;
- irreversible external action。
因此:
15. Context-dependent independence
令 candidate events 為 ,context 為:
定義:
表示在 context 與 semantics profile 下, 可被安全視為 independent。
GCM 不把 independence 固定成「不同 thread」或「不同 domain」;它可能依:
- shared World state;
- resource;
- Observer;
- authority;
- Foundation constraint;
- external side effect;
- retained semantics;
- lifecycle / archive dependency;
而改變。
16. Strong Independence Obligation
對 ,若要允許相鄰交換:
至少應檢查下列義務:
- 在相關 precondition 下皆可合法啟用;
- 與 都 admissible;
- 兩種順序都不造成 authority escalation;
- 指定 World semantics 下 endpoint 保持等價;
- 目標 Observer / audit semantics 保持等價;
- 不破壞 required causal / Foundation / provenance edge;
- 不遺漏不可逆 external side effect;
- resource / cost 若屬 的 retained semantics,亦需保持等價。
因此:
17. Dependence Relation
定義:
若:
則它們的相關 order / relation 必須在目標 history semantics 中被保留。
這不表示 Runtime 一定要保存完整 serialized sequence;保存足夠 dependency structure 即可。
18. History equivalence 必須相對 semantics
不能只問:
兩條歷史是否絕對相同?
更合理的問題是:
其中:
是一個 semantics profile,而不是單一固定標準。
不同系統可以選擇不同 profile;但 profile 必須 explicit。
19. 一般 History Quotient
令:
為 history 在 semantics profile 下必須保留的可觀察資訊。
定義:
則 quotient class:
可以作為某種 compression / canonicalization 的目標。
但:
不必等於:
因此不存在不經假設即可安全使用的 universal history quotient。
20. Endpoint quotient 是最粗的一種
若只關心 endpoint:
這可以用於某些 memoization、state-space reduction 或 purely extensional task。
但只要系統還關心 retry、cost、audit、authorization、side effect、replay、causality 或 Foundation lineage,endpoint quotient 就可能過粗。
因此:
21. Observer-dependent history equivalence
給 Observer contract ,可以定義:
當且僅當兩條 history 對該 Observer 所要求的 projection / interaction semantics 等價。
但:
不推出:
這也說明 Paper-04 的 Observer separation 會直接影響 Paper-06 的 independence relation。
22. Predictive equivalence 不等於 audit equivalence
Runtime 可以將歷史壓成 summary:
如果:
則 對某個 prediction task 可以是 sufficient summary。
但:
同一 summary 可能足以 routing,卻不足以回答 authority、責任、retry 或 external side effect 的歷史問題。
23. History-aware Runtime 不必每次掃描完整歷史
History 可以影響未來 routing:
例如:
- 避免剛失敗的 accelerator;
- 降低 configuration thrashing;
- 根據過去 bridge approximation error;
- 根據 latency / energy history;
- 根據 failure rate;
- 根據 provenance trust。
但這不要求每次 routing 都 full scan ; 可以是 task-specific history state variable。
24. Markovization 是壓縮,不是歷史消失
對 path-dependent process:
可以引入:
並寫成:
若 足夠,可能得到 Markov-like transition。
但這只是將 relevant history 壓進 extended state:
25. Receipt 的最低 canonical fields
GCM Reference Runtime 的 event receipt 建議至少具有:
欄位可以是 null / omitted when inapplicable,但不能因此把語義角色合併。
26. Payload 可以外置,但 anchor 不可丟失
為了降低 storage / privacy cost,receipt 不必 inline 保留所有 input / output bits。
可保存:
或:
但至少要能知道:
- reference 指向什麼語義角色;
- 哪個 version / schema 解讀它;
- 是否 exact / approximate / unavailable;
- 為何被 redacted / expired;
- 哪些 replay / audit obligation 因此失效。
27. Proposal history 與 committed history 分層
Paper-03 已定義 executor 先產生 proposal,而不是直接修改 World。
因此至少分:
一個 local execution 可以成功並建立 receipt,但後續:
此時:
如果把 history 只綁在 上,這種 rejected-but-executed path 就會消失。
28. Reject、Abort 與 Rollback 不同
建議區分:
- :proposal 未通過某個 gate;
- :執行 branch 被終止;
- :將尚未形成或尚可原子撤銷的 tentative effect 恢復;
- :對已經 commit / 外部生效的操作,以新的 forward operation 做補償。
因此:
29. Rollback 不刪除已發生 event
若 tentative execution:
後來 rollback:
history 應至少保留:
或等價 typed relation。
即使 World 回到原 endpoint:
仍然:
30. Compensation 是新的歷史,不是歷史抹除
對已 commit operation ,若後續以 補償:
即使 compensation 後 state 與先前某版本等價:
也不能把:
視為 empty history。
此原則與 Sagas / compensating transaction 的一般精神一致。[10]
31. Retry 是 reliability history
考慮:
attempt 1 -> timeout
attempt 2 -> checksum mismatch
attempt 3 -> success
與:
attempt 1 -> success
若只看 endpoint,兩者可能相同。
但 failure-rate、routing policy、resource reliability、security anomaly 與 future model selection 都可能需要區分。
因此:
32. Speculative / Counterfactual branch 必須與 committed history 分離
AI planning、solver search 或 speculative execution 可能生成:
這些不能直接進 committed World lineage。
至少需要:
若某 speculative branch 被選為 commit basis,應建立 explicit derivation / commit edge,而不是重寫它的過去狀態。
33. Fork 與 Merge history
若從 World version 分出:
則建立:
若後續 merge:
則 merge 本身必須具有 receipt,記錄:
- merge parents;
- conflict resolution;
- reconciliation policy;
- verifier;
- Foundation / schema compatibility;
- information loss / approximation;
- authority。
因此 merge result 不應只被當成「新 state」而丟失 lineage。
34. Foundation history 與 Runtime history 必須分開
普通 Runtime event 在 fixed Foundation 下運作:
Foundation revision 必須走:
因此 history 至少分:
它們可以透過 typed anchor 關聯,但不能合併成「普通操作序列」。
35. Foundation migration / fork / reject 必須可追溯
若 建立於:
而新 Foundation:
與舊 state 不完全相容,Runtime 只能明示選擇:
或:
任何一條 path 都必須保留 lineage。
因此:
36. Observer history 與 World history 分層
Paper-04 已允許 pure observation:
同時:
或:
因此定義:
若 Observer event 只改 zoom / focus / query:
但若它後續導致 authorized command:
則 causal relation 可以跨兩個 history layer。
37. Lifecycle history 是 Paper-05 的正式接口
Paper-05 已定義 active / dormant / archive / restore / reactivate lifecycle。
因此:
至少應保存重要 lifecycle receipts,例如:
- activation reason;
- dormancy mode;
- archive anchor;
- restore source;
- catch-up range;
- validation result;
- approximation certificate;
- pin authority;
- resource cost。
這些 event 可能不修改 World primitive,但會影響 Runtime recoverability 與 performance history。
38. Configuration-switch history
Paper-02 / 03 允許 configuration switching。
若:
即使 的 semantic endpoint 等價,仍可能產生:
- bridge cost;
- approximation;
- solver error;
- model version change;
- resource migration;
- reason / policy;
- fallback path。
因此 configuration switch 應建立 typed receipt。
39. Snapshot / Checkpoint 不等於 History
一個 checkpoint:
可以保存某個可恢復 state anchor。
Chandy–Lamport distributed snapshot 已證明 distributed systems 中 consistent global snapshot 可以在 asynchronous computation 中被定義與取得。[4]
但:
它回答「某個一致切面長什麼樣」,不自動回答完整 causal / authorization / retry / compensation lineage。
40. Checkpoint + Delta Replay
實務上不必每個 commit 都保存完整 World copy。
可採:
若 replay prerequisites 成立:
此式是 Runtime recovery strategy,不是宣稱 history 是唯一 World ontology。
41. Replay 必須有 grade
本文建議:
Exact
所有必要外部 input、executor / model / bridge / Foundation version、random seed、order constraint 與 state dependency 都可重建,且 side effects 在 replay sandbox 中可精確重現。
DeterministicInternal
Runtime 內部 state transition 可重建,但外部世界 side effect 不重演。
SemanticEquivalent
允許 implementation / version 差異,但目標 semantics profile 下結果等價。
Approximate
只保證 error / fidelity contract。
NonReplayable
缺少必要 source、外部事件不可取回、version incompatibility 或 irreversible effect 無法再現。
因此:
42. Exact replay 的最低 prerequisites
Exact replay 至少需要視系統情況保存:
- input / external-event provenance;
- World checkpoint anchor;
- Foundation / schema version;
- computational configuration version;
- executor / solver implementation version;
- model version;
- bridge version;
- randomness / seed / nondeterministic choices;
- relevant scheduling / causal constraints;
- external side-effect isolation / idempotency strategy;
- archive / lifecycle dependencies;
- required credentials / authority context 的可驗證替代證據。
缺少這些資訊時,只能降級 replay grade,而不能假稱 exact。
43. Event Sourcing 是一種 strategy,不是 GCM 公理
某些 Runtime 可以選擇:
再把:
視為 history projection。
另一些 Runtime 可以選擇:
而:
是 provenance companion。
GCM 接受兩者,前提是 invariants、replay claim、retention policy 與 lineage semantics 明確。
因此:
44. History closure
即使 World state space 有限:
history space 仍可無界。
只要存在 loop:
history length 可以任意增長。
因此:
這也解釋 Paper-05 為何指出 bounded active memory 不推出 bounded history storage。
45. Schedule Explosion
對 個可排序 events,naive 全排列最壞可達:
但 Runtime 實際需要保存的不是「所有可能 schedule」,而是:
- actual execution;
- necessary dependency structure;
- selected speculative / counterfactual branches;
- required equivalence metadata;
- audit / replay / governance obligations。
因此:
46. Partial-order compression
若 在 context 下 independent:
則 sequence:
與:
可在指定 下進入同一 trace-like equivalence class。
Runtime 可保存 dependency partial order:
而不是每個 total-order permutation。
但 dependence / independence 的證明本身應可版本化,因為 Foundation、Observer 或 retained semantics 改變後,舊 quotient 可能不再有效。
47. Compression Soundness
令 compression operator:
若:
必然推出:
則稱 對 sound。
即:
如果反向不成立,compression 可能不是 maximal,但仍可以安全。
48. Compression completeness 不是必要條件
若:
但:
代表 Runtime 保存了更多資訊,但不一定錯。
真正危險的是 unsound merge:
卻:
因此初期 Reference Runtime 應優先保守 soundness,而不是追求最小 history size。
49. Hash 只能做 identity / integrity anchor
令:
這可以協助:
- integrity;
- dedup candidate discovery;
- content addressing;
- Merkle lineage;
- tamper detection。
但:
hash 不會告訴 Runtime 哪些 event independent、誰擁有 authority、哪個 event compensates 哪一個 event。
50. Merkle DAG 也不是語義本身
Merkle DAG 可以高效表示 immutable content / ancestry,但 cryptographic parent edge 不一定等於:
因此:
GCM 可以使用 hash / Merkle 技術,但 relation type 必須另外保存。
51. Retention obligation
不是所有歷史都需要永久保存同等 fidelity。
令:
Retention policy 應依 obligation 決定:
- raw payload;
- digest only;
- summarized receipt;
- external archive;
- encrypted retention;
- expired / redacted marker。
因此:
52. Minimum Sufficient History 是相對問題
對 inquiry set:
若 compressed history 滿足:
則可稱 對 是 sufficient。
但 inquiry set 改變後,原 compression 可能不再 sufficient。
因此 history retention policy 本身應 versioned / auditable。
53. Privacy 與 provenance 的張力
History 越詳細,越可能暴露:
- user input;
- model prompt;
- credentials / capability context;
- private data path;
- internal business logic;
- third-party identifiers。
因此 GCM 不要求把 sensitive payload 直接寫進不可變 log。
可以使用:
- data minimization;
- access control;
- encryption;
- content indirection;
- cryptographic erasure;
- redaction marker;
- retention tier;
- provenance without raw payload。
但任何刪除 / redaction 都必須同步降低 replay / audit claim,不能一邊刪掉必要證據,一邊繼續宣稱 exact replay。
54. History policy 本身也要有 provenance
若 Runtime 將某段 history:
進行 compression / deletion / archival,應建立 policy receipt,記錄:
- policy version;
- scope;
- operator / authority;
- retained semantics;
- lost semantics;
- storage destination;
- verification;
- effective time / revision。
因此:
55. Branch-aware counterfactual reasoning
AI planner 可能問:
如果當時選另一個 route,會怎樣?
這時建立:
而不是修改:
Counterfactual branch 應保存:
- base version;
- changed assumption;
- simulated route;
- model / Foundation version;
- replay grade;
- whether external side effects disabled。
因此:
56. History-aware learning 不取得 commit authority
AI / learned router 可以從 history 學習:
但:
以及:
這延續 Paper-03 的 authority non-escalation principle。
57. Canonical history consistency checks
Reference Runtime 至少應檢查:
- 所有 relation endpoint 都存在;
- relation type 合法;
- commit receipt 有合法 parent / predecessor;
- Foundation version 可解析;
- rollback / compensation target 存在;
- Observer-only event 未偽裝成 World commit;
- proposal / rejected branch 未偽裝成 committed lineage;
- replay claim 與 retained prerequisites 相容;
- history compression 具有 semantics profile;
- receipt payload digest / locator 若宣稱可用,必須可驗證或標記 unavailable。
58. Receipt DAG 可以是多層 graph,而不是單層 DAG
若所有 edge 都是 strict causal precedence,通常可以形成 DAG。
但完整 provenance structure 可能同時包含:
- causal DAG;
- World version DAG;
- Foundation lineage DAG;
- storage graph;
- semantic relation graph。
部分 semantic edge 可能不是 ordering relation。
因此更精確的說法是:
而不是宣稱所有關係都必須塞進一個單一 DAG。
59. Causal subgraph
定義:
若:
則 的成立依賴 的相關 effect / information / authority / trigger。
若:
只表示目前沒有 causal precedence 證據;是否可 history quotient 還需檢查 。
因此:
60. Commit subgraph
對 committed World versions:
每個 commit edge 應可對應到 commit receipt:
如果 branch merge:
則 可以有多 parent anchor。
這比把所有 World versions 強迫塞進單一 numeric order 更一般。
61. Observer subgraph
Observer history 可寫:
若 Observer event 只改 presentation:
但 可以與後續 command 有 causal edge。
這讓系統可以回答:
某次 World-changing action 是否源自先前某個 observation / query?
而不必把 observation 自己誤標成 World mutation。
62. Lifecycle subgraph
Paper-05 的 archive / restore / activate history 可形成:
例如:
這條 lineage 對 debug reactivation failure、cost accounting 與 audit 很重要,但不應和 World commit order混為一談。
63. Foundation subgraph
Foundation lineage:
其中:
必須由 explicit revision receipt 支援。
如果 schema migration 產生:
則 migration receipt 同時 anchor 到:
64. Global history 不要求 flatten 所有 sub-world
若 parent World 包含 recursive sub-worlds:
每個 sub-world 可保有 local history:
parent 只需保存:
與必要 summary / boundary receipts。
因此:
這延續 Paper-05 的 bounded active realization。
65. History storage 可以 out-of-core
History / archive size 可以持續增長,因此 不要求完全 resident in memory。
可使用:
- hot recent receipts;
- indexed summaries;
- checkpoint segments;
- external object store;
- append-only segment;
- content-addressed archive;
- compressed dependency graph。
但 index / query path 不能每次 full scan entire history,否則 Paper-05 的 support-local cost discipline 會被 history layer 破壞。
66. Bounded active memory 不推出 bounded history cost
即使:
如果每次 commit 都:
則 cost 仍可隨 history length 增長。
因此:
History index / summary / partition strategy 應成為 TW-02 Runtime Architecture 的一級模組。
67. History cost decomposition
可將 history-related cost 粗分:
GCM 不宣稱存在普遍最小化所有維度的單一 objective;不同 Runtime 可以設 hard constraints 與 optimization preferences。
68. Endpoint closure 與 history closure 的形式命題
若 finite state system 存在可重複 loop :
則對任意 ,存在 history:
即使所有 endpoint 相同:
若 semantics profile 保留 loop count / cost / audit,則:
因此有限 state closure 不能推出 history closure。
69. Loop quotient 依 semantics 決定
若只關心 endpoint,可以把:
壓成:
如果連 都不重要,甚至可進一步 quotient。
但若每輪具有不同:
或不同 external side effects,則單一 不足。
因此 compression schema 必須由 指定。
70. History reconstruction 不等於 causality discovery
從 log replay 可以重建某些 state,但:
如果 log 只保存 total serialization,可能丟失原本 concurrent relation;反之,一個 causal graph 也未必包含所有 replay 所需的 nondeterministic choice。
因此 replay metadata 與 causal metadata 應分開建模。
71. History query classes
Reference Runtime 至少應支援幾類 query:
State lineage query
哪些 commit 形成目前 ?
Causal query
哪個 event 導致 ?
Authority query
哪個 actor / delegation 允許這個 commit?
Replay query
從哪個 checkpoint 可以重建?Replay grade 是什麼?
Rollback / compensation query
哪個 event 被回退或補償?
Foundation query
這個 World version 建立在哪個 Foundation 下?
Lifecycle query
這個 domain 何時 archive / restore?
Observer query
哪個 observation 促成後續 action?
這些 query 的最低 history requirement 不相同。
72. Provenance graph 與 W3C PROV 的可映射性
GCM event / receipt 可以選擇映射到一般 provenance vocabulary:
- event execution 對應 activity;
- World / artifact / checkpoint 對應 entity;
- actor / agent 對應 agent;
- derivedFrom / generatedBy / attributedTo 可映射既有 provenance relation。
但 GCM 不要求所有 Runtime 直接使用 RDF / OWL。
本文只要求:
而不是創造一個不可互通的封閉格式。
73. Provenance-of-provenance
如果 history 本身被:
- compressed;
- migrated;
- redacted;
- reindexed;
- exported;
- verified;
這些操作也需要 lineage。
因此 provenance store 可以有 meta-provenance:
但 Reference Runtime 不需要遞歸無限展開;它可以用 stable policy receipt + versioned metadata 收斂。
74. Semantics profile 也必須 versioned
若 history quotient 使用:
未來變更為:
舊 compression 不一定仍充分。
因此:
這可以避免未來因 audit requirement 增加,卻發現過去已在較粗 quotient 下不可逆丟失必要資訊。
75. Compression 前應先定 retention frontier
對 old history segment:
Runtime 在壓縮前至少要確定:
- 哪些 open transactions 仍引用它?
- 哪些 rollback window 尚未關閉?
- 哪些 audit / legal / operational obligation 尚有效?
- 哪些 active branch 仍依賴它?
- 哪些 archived state 需要它 replay?
- 哪些 model / router summary 尚未 checkpoint?
只有超過 retention frontier 的 segment 才可進更強 compression / external archive。
76. History compaction 不應破壞 live dependency
若 event 仍依賴 old event :
即使 payload 被壓縮,仍需保留可證明的 anchor / summary,使 dependency 不變成 dangling semantic edge。
因此:
77. History retention 與 active support 是兩個維度
Paper-05 已固定:
因此一個 old receipt 可以:
但:
這使 audit retention 不必強迫 expensive active memory 常駐。
78. History security boundary
History store 可能包含比 current state 更敏感的資訊,因此 authority model 要延伸到:
並保持:
也就是能看目前 World projection,不代表能查看完整歷史。
79. History tamper model
Runtime 可以使用 hash chain / signature / Merkle anchor 增強 integrity,但必須明示 threat model。
最低可檢查:
- receipt content integrity;
- parent anchor integrity;
- version monotonicity / branch consistency;
- unauthorized rewrite;
- missing segment marker;
- signature / verifier identity。
但 cryptographic integrity 不自動證明 semantic truth;錯誤 input 也可以被正確 hash。
因此:
80. History truth claim 必須分級
可區分:
一個 receipt 被記錄,只代表 Runtime 有這筆紀錄;它是否經 verifier、外部證據或 replay 支持,是另外的 evidence level。
這延續時空控制系列中的:
81. 最小 History Runtime Pipeline
Reference Runtime 可以採:
Operation Request
↓
Route Receipt
↓
Execution Receipt(s)
↓
Proposal Graph
↓
Reconciliation Receipt
↓
Verification Receipt
↓
Commit / Reject / Rollback Receipt
↓
Typed Relation Update
↓
History Index / Summary Update
↓
Checkpoint / Compression / Archive Policy
Observer、lifecycle 與 Foundation events 走各自 typed path,再用 relation edge 與共同 anchor 關聯。
82. Minimal algorithm sketch
handle_event(event):
ctx = resolve_context(event)
auth = check_history_authority(event, ctx)
require(auth.ok)
receipt = make_typed_receipt(event, ctx)
relations = infer_required_relations(receipt, ctx)
verify_relation_constraints(relations)
append_receipt(receipt)
append_relations(relations)
update_history_indexes(receipt, relations)
if receipt.status == COMMITTED:
anchor_world_version(receipt)
update_history_summary(receipt)
maybe_checkpoint()
maybe_compact_only_if_sound()
此 pseudo-code 不指定 storage backend,也不宣稱 relation inference 可完全自動化。
83. History quotient algorithm sketch
can_quotient(h1, h2, semantics_profile):
obligations = load_semantics(semantics_profile)
evidence = compare_history_semantics(h1, h2, obligations)
if evidence.proves_equivalence:
return ALLOW_WITH_CERTIFICATE
if evidence.proves_difference:
return REJECT
return DEFER
Reference Runtime 應偏向:
84. History Compression Certificate
若 Runtime quotient / compact history segment,建議產生:
這使未來可以回答:
這段歷史為什麼被壓縮成這樣?當時保證保留什麼?
85. History-aware global coherence
Paper-01 的 global coherence 原本主要判斷 candidate World state 是否可 commit。
Paper-06 加入 history obligation 後,可擴張為:
也就是某個 World commit 即使 state invariants 通過,若 required receipt / provenance 完全缺失,仍可被 Runtime policy 判為不可接受。
是否把這項設為 hard commit gate,由 Foundation / deployment policy 決定。
86. 形式命題一:State Equality Does Not Entail History Equality
存在:
使:
因此:
這是本文最基本命題。
87. 形式命題二:Endpoint Closure Does Not Entail History Closure
若 finite state graph 存在 cycle,則 state set 可有限,但 execution histories 仍可因 cycle count 無界增長。
因此:
88. 形式命題三:Commutativity Is Not Sufficient for History Equivalence
存在 使:
但因 audit / side effect / authority / cost semantics:
因此 algebraic commutativity 不是 history quotient 的充分條件。
89. 形式命題四:Log Order Does Not Entail Causal Order
若 concurrent events 經 storage serialization 形成:
但兩者沒有 causal dependence:
則 log order 不能被解讀為 causal fact。
90. 形式命題五:Rollback Does Not Erase Provenance
若 event 已實際執行且後續 rollback :
即使 endpoint 恢復:
history 仍包含:
因此 rollback 不等於歷史抹除。
91. 形式命題六:Compression Soundness Is Semantics-relative
存在 ,使 compression 對 sound,但對 不 sound。
例如 endpoint-only compression 可能對:
安全,但對:
不安全。
因此:
92. 形式命題七:Exact Replay Requires More Than State Snapshot
若 replay 依賴 nondeterministic choice ,但 snapshot 未保存 :
的唯一重建 path。
因此 exact replay 必須保存足夠 event / nondeterminism / version metadata。
93. 形式命題八:Bounded Active Memory Does Not Bound History
即使對所有 Runtime revision:
若每次 commit 都新增 retained receipt,則:
仍可能成立。
因此 Paper-05 的 active support bound 與 Paper-06 的 retention policy 是不同問題。
94. Canonical Invariants Registry — Paper-06
I-06-01 State / History Separation
I-06-02 Endpoint / History Closure Separation
I-06-03 Typed Order Separation
I-06-04 Proposal / Commit History Separation
I-06-05 Rollback Persistence
I-06-06 Compensation Persistence
I-06-07 Hash / Semantics Separation
I-06-08 Snapshot / History Separation
I-06-09 Replay Honesty
Replay grade 必須與可用 prerequisites 一致,不得將 approximate / semantic replay 宣稱為 exact replay。
I-06-10 Foundation Lineage
任何 Foundation revision 都必須 explicit、versioned、auditable。
I-06-11 Observer / World History Separation
Pure observation 不得被記成 World mutation receipt。
I-06-12 Lifecycle / World History Separation
Archive / restore / activation event 不得因不修改 World primitive 就被無條件丟失。
I-06-13 Contextual Independence
History independence 必須相對 context / semantics profile;不得只以 thread / domain identity 判定。
I-06-14 Compression Soundness
任何 quotient / compression 都必須聲明其 semantics profile 與 preservation obligation。
I-06-15 Unknown Equivalence Safety
I-06-16 Counterfactual Separation
Speculative / counterfactual branch 不得污染 committed provenance。
I-06-17 History Authority
World read authority 不自動包含 history read / redact / export authority。
I-06-18 History Transformation Provenance
History compression / deletion / migration 本身必須留下 policy lineage。
I-06-19 Integrity / Truth Separation
I-06-20 Bounded Activity / History Separation
95. Reference Runtime MVP experiments
Experiment 06-A — Same Endpoint / Different History
建立兩條 sequence 抵達相同 ,確認 endpoint dedup 不會自動合併 receipts。
Experiment 06-B — Noncommutative Order
使用:
驗證 / 的 endpoint 與 history 都不同。
Experiment 06-C — Commutative but Audit-distinct
建立兩個 endpoint-commutative operations,但設定不同 authority / cost metadata,確認 audit profile 下不可 quotient。
Experiment 06-D — Context-dependent Independence
先讓兩個 events 無 Observer dependency,再加入 Observer-visible intermediate read,確認 independence relation 改變。
Experiment 06-E — Log Order / Causal Order Separation
平行執行兩個 independent events,storage 故意 serial append,確認 causal graph 不新增假 edge。
Experiment 06-F — Retry History
比較一次成功與兩次失敗後成功;endpoint 相同,但 reliability history 不同。
Experiment 06-G — Rollback vs Compensation
測試 uncommitted rollback 與 committed compensation,確認 relation type 不同且 prior receipt 保留。
Experiment 06-H — Checkpoint Replay
以 checkpoint + delta 重建 World,驗證 hash / invariant / version anchor。
Experiment 06-I — Replay Grade Downgrade
故意移除 random seed 或 model version,確認 Runtime 從 Exact 降級為 SemanticEquivalent / NonReplayable,而非假稱 exact。
Experiment 06-J — Foundation Revision Lineage
執行:
並測 migration / fork / reject 三種 path 的 history anchor。
Experiment 06-K — Observer Causal Trigger
Observer query 不改 World;之後由 authorized command 修改 World,建立 observer-to-world causal edge。
Experiment 06-L — Lifecycle Provenance
執行 archive → restore → reactivate,確認 lifecycle receipt 與 World commit history 可分層查詢。
Experiment 06-M — Semantic Compression
同一 history 分別以 Endpoint profile 與 Audit profile 壓縮,確認兩者 quotient granularity 不同。
Experiment 06-N — History Growth Independence
固定 active support 大小,持續產生 commit receipts,確認 active memory bounded 但 history size 增長;再加入 partitioned index,測 query cost 是否避免 full scan。
Experiment 06-O — Counterfactual Isolation
建立 speculative / counterfactual branches,確認未 commit branch 不會出現在 canonical World lineage,但仍可被 debug / learning query 存取。
96. MVP 最低 History API
建議最低 API:
append_receipt(receipt) -> history_anchor
link_events(src, relation_type, dst) -> relation_receipt
query_lineage(world_version) -> lineage_view
query_causes(event_id) -> causal_view
query_authority(event_id) -> authority_view
query_foundation_lineage(version) -> foundation_view
checkpoint(world_version, policy) -> checkpoint_receipt
replay(checkpoint_id, target, mode) -> replay_receipt
rollback(proposal_or_tentative_id) -> rollback_receipt
compensate(commit_id, operation) -> compensation_proposal
fork(base_version, purpose) -> branch_id
merge(branches, contract) -> merge_proposal
compress_history(range, semantics_profile) -> compression_certificate
archive_history(range, policy) -> archive_receipt
這些 API 只是 Reference Runtime 的最小工程映射,不是 GCM 的唯一實作方式。
97. 與 TW-01 的接口
TW-01|GCM Canonical Specification & Formal Contract 應從本文匯入:
- event type registry;
- relation type registry;
- history status registry;
- semantics profile schema;
- replay grade;
- compression certificate;
- Foundation / World / Observer / lifecycle history boundary;
- history authority classes。
98. 與 TW-02 的接口
TW-02|GCM Reference Runtime Architecture 應實作:
History / Provenance Store
History Index
Causal Graph Index
World Version Graph
Foundation Lineage Registry
Checkpoint Manager
Replay Engine
Compression / Retention Manager
History Authority Gate
Integrity / Digest Service
External Archive Adapter
並與 Paper-03 Commit Engine、Paper-04 Projection Service、Paper-05 Active Support Manager 互連。
99. 與 TW-03 的接口
TW-03|GCM Conformance & Verification Specification 至少應測:
100. Open Problems
- Context-dependent independence 的 proof obligation 如何高效自動化?
- 多 Observer 下,如何計算最小 observable-history quotient?
- 不同 Foundation version 的 history 如何做 cross-version causal query?
- branch / merge world version graph 何時需要 CRDT / distributed merge semantics?
- exact replay 在 AI model nondeterminism、remote service 與 hardware nondeterminism 下的最低條件是什麼?
- provenance retention 如何同時滿足 privacy minimization 與 audit obligation?
- history compression certificate 如何做 machine-checkable proof?
- history index 如何維持 support-local cost,而不隨長期 lineage 線性退化?
- counterfactual branch 是否需要與 committed history 採不同 storage trust model?
- Foundation revision 是否需要獨立 human / multi-party governance quorum?
- history-aware routing 如何避免「因過去偏差而固化未來路徑」?
- distributed sub-world 的 local histories 何時需要被提升為 parent-world causal edge?
- cryptographic transparency log 與 semantic provenance graph 應如何最小耦合?
- history redaction 後,哪些 replay / proof claims 必須自動降級?
- 長期 AI Runtime 是否需要 provenance-of-model-update 與 provenance-of-memory-update 的獨立 edge types?
101. 第一輪 v0.1 → v0.2 的主要升級
第一輪以:
與 Receipt DAG 作為主要直覺。
第二輪正式升級為:
主要差異包括:
- 不再同時表示 World、Runtime、Observer、history;
- History 不再只是一條 sequence;
- Relation edge typed;
- proposal / commit / rollback / compensation 分離;
- Observer history 與 World history 分離;
- lifecycle history 正式接入 Paper-05;
- Foundation lineage 成為一級 history object;
- exact / approximate replay 分級;
- quotient 必須 semantics-relative;
- compression / deletion 本身具有 provenance;
- hash / Merkle 只做 integrity / identity,不做 causal semantics;
- branch / merge / counterfactual history 被正式型別化。
102. 六篇正式論文的閉合
至此,GCM 六篇正式核心論文形成:
Paper-01
回答:
什麼是 World-relative globally coherent heterogeneous computation?
Paper-02
回答:
computational configuration 如何形成可定址、可擴張 basis?
Paper-03
回答:
candidate 如何經 Reachability、Admissibility、Authority、Execution、Reconciliation 與 Commit?
Paper-04
回答:
computation、observation、materialization、resolution、clock/order 如何分離?
Paper-05
回答:
有限 Runtime 如何維持可能無界擴張的 World,而不要求 full active realization?
Paper-06
回答:
當 Runtime 真正演化後,哪些過程必須被保存?何時 history 可以 quotient?如何 replay、rollback、compress、retain 並保留 provenance?
因此六篇共同形成:
103. 最終定義:可追溯全域演化
本文將 Traceable Global Evolution 定義為:
在指定 World boundary 與 Foundation version 下,Global Runtime 不只維持目前可提交的 canonical World state,也維持或可重建足以區分目標 semantics 中重要 execution histories 的 typed provenance structure,使 noncommutative order、causal dependency、authority、configuration switching、failure、rollback / compensation、Observer trigger、lifecycle transition 與 Foundation revision 不會因 endpoint state 相同而被無條件消失;同時允許在明確 equivalence / retention contract 下對 independent、redundant 或過期歷史進行安全 quotient、checkpoint、compression 與 archive。
形式上:
共同構成 GCM 可追溯 Runtime 對「現在」的最低描述。
這不表示 history quotient 永遠只有一個; 必須 explicit、versioned。
104. 結論
終點狀態是一種壓縮。
歷史則保存「如何到達」。
在簡單系統中,endpoint 可能足以繼續運行;但在 heterogeneous、concurrent、authority-sensitive、可 rollback、可 Foundation revision、可 archive / restore、可由 Observer 觸發行動的 Global Runtime 中,把 endpoint equality 當成 process equality 會丟失真正重要的資訊。
因此本文固定:
與:
但本文同樣拒絕另一個極端:GCM 不要求永久保存所有 permutation、所有 payload 或所有 counterfactual branch。真正可擴張的 history 方法是:
如此一來,GCM 才能同時避免兩種失敗:
與:
六篇正式理論到此形成第一個完整閉合:Global Computation 不只是一個「如何算」的方法論,也是一個「如何證明自己算過什麼、為何能 commit、如何回復、如何保留差異、何時可以安全忘記」的方法論。
參考文獻
- Lamport, L. (1978). Time, Clocks, and the Ordering of Events in a Distributed System. Communications of the ACM, 21(7), 558–565. DOI: 10.1145/359545.359563.
- Fidge, C. J. (1988). Timestamps in Message-Passing Systems That Preserve the Partial Ordering. Proceedings of the 11th Australian Computer Science Conference, 56–66.
- Mattern, F. (1989). Virtual Time and Global States of Distributed Systems. Proceedings of the Workshop on Parallel and Distributed Algorithms, 215–226.
- Chandy, K. M., & Lamport, L. (1985). Distributed Snapshots: Determining Global States of Distributed Systems. ACM Transactions on Computer Systems, 3(1), 63–75. DOI: 10.1145/214451.214456.
- Aalbersberg, I. J., & Rozenberg, G. (1988). Theory of Traces. Theoretical Computer Science, 60(1), 1–82. DOI: 10.1016/0304-3975(88)90051-5; see also Mazurkiewicz trace theory and Diekert & Rozenberg (eds.), The Book of Traces (1995).
- Godefroid, P., Peled, D., & Staskauskas, M. (1996). Using Partial-Order Methods in the Formal Validation of Industrial Concurrent Programs. IEEE Transactions on Software Engineering, 22(7), 496–507.
- Flanagan, C., & Godefroid, P. (2005). Dynamic Partial-Order Reduction for Model Checking Software. POPL 2005, 110–121. DOI: 10.1145/1040305.1040315.
- Buneman, P., Khanna, S., & Tan, W.-C. (2001). Why and Where: A Characterization of Data Provenance. ICDT 2001.
- W3C Provenance Working Group (2013). PROV-DM: The PROV Data Model; PROV-O: The PROV Ontology; PROV-CONSTRAINTS. W3C Recommendations.
- Garcia-Molina, H., & Salem, K. (1987). Sagas. Proceedings of ACM SIGMOD 1987. DOI: 10.1145/38713.38742.
- Fowler, M. (2005). Event Sourcing. Enterprise Application Architecture pattern notes.
- Overeem, M., Spoor, M., Jansen, S., & Brinkkemper, S. (2021). An Empirical Characterization of Event Sourced Systems and Their Schema Evolution — Lessons from Industry. Journal of Systems and Software, 178, 110970. DOI: 10.1016/j.jss.2021.110970.
- Nakajima, Y. (2026). The Log is the Agent: Event-Sourced Reactive Graphs for Auditable, Forkable Agentic Systems. arXiv:2605.21997.
- dos Santos Filho, E. B. (2026). ESAA: Event Sourcing for Autonomous Agents in LLM-Based Software Engineering. arXiv:2602.23193.
- Niu, X., Arab, B. S., Lee, S., Feng, S., Zou, X., Gawlick, D., Krishnaswamy, V., Liu, Z. H., & Glavic, B. (2017). Debugging Transactions and Tracking their Provenance with Reenactment. arXiv:1707.09930.
Canonical publication note
本文為 Global Computation Methodology Series 的第六篇正式核心論文。Series-00 為總綱與 canonical architecture anchor;Paper-01 至 Paper-06 為正式理論主體。下一階段不新增 Paper-07,而進入既定三份技術白皮書與 GCM Reference Runtime MVP。