---
title: "历史用快照序列和路径表达"
---

> Documentation Index
> Fetch the complete documentation index at: https://koine.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# 历史用快照序列和路径表达

## 背景

单一世界快照无法反推历史：很多不同的过去可以产生同一个现在。Koine 已有 `time`、`path`、`diff`，但没有一等历史。需要决定历史真值来自哪里。

## 选项

- Snapshot-only：只保留当前世界，历史靠显式时间关系。
- Snapshot-sequence：保留快照/path 序列，历史是序列的投影。
- Event-first：事件日志是真值，快照是投影。
- Hybrid：快照 + 路径/事件日志。

## 决定

先做 **snapshot-sequence + path**：

- 世界仍是快照；历史由 path/step 序列和每步 diff 表达。
- 被观察的历史事实可以用时间关系记录，并派生为只读 relation。
- 拒绝/重试等运行时事件由 trace 记录，不强行塞进 world。
- event-first 暂不引入。

## 理由

- 与当前“世界是快照”的语义兼容，改动比 event-first 小。
- path 已经是压缩的快照序列；确定性回放可以重建中间世界。
- 单一快照 + 时间戳不能表达历史；快照序列可以。
- 事件日志更适合跨对象/拒绝/因果，可以后置为运行时 trace。

## 后果

- 需要一等 path/trace，而不只是临时回放。
- 同一 `time` 内多个 step 需要 step index 或逻辑顺序。
- 历史事实需要 derived relation 才能进入 view/diff。
- 运行时必须保留 trace；模型层时间关系仍负责可审计的持久事实。
- event-first / OCEL 式事件日志仍是未来选项。

## 相关

- [关系语义与历史分析](https://koine.systems/notes/relation-semantics/)
- [逻辑时钟与顺序原型](https://koine.systems/notes/logical-clock-prototype/)
- [语言决策清单](https://koine.systems/notes/pending-decisions/)

Source: https://koine.systems/notes/decisions/0015-history-as-snapshot-sequence/index.mdx
