fix: reject legacy header deltas on append

This commit is contained in:
Tianyi Cui
2026-07-14 14:04:29 +08:00
parent 49e45ff184
commit 539850578a
5 changed files with 16 additions and 8 deletions

View File

@@ -245,7 +245,7 @@ list(): Session[]
fork(source: SessionForkSource, boundary?: number, childSessionId?: SessionId): Session
```
Source: [`packages/core/session/src/index.ts:604`](../../packages/core/session/src/index.ts)
Source: [`packages/core/session/src/index.ts:607`](../../packages/core/session/src/index.ts)
## `ctx.skills` — `SkillService`

View File

@@ -10,7 +10,7 @@ The session log maintains two representations that cost more machinery than thei
The request-header subsystem implements a custom system/tool delta codec and transmission-decision layer even though its contract says deltas are an encoding optimization, not a reconstructability requirement. Retaining the initial/resume full snapshot at each loop-instance boundary, then writing a canonical full `request/header` whenever that instance's assembled header changes, preserves replay while deleting `SystemDelta`, `ToolsDelta`, round-trip fallback, and the durable `request/header-delta` variant. Codec-only vocabulary disappears with the codec, not because its individual arms were invalid.
This proposal deliberately retains append and replacement `sourceEventSeqs`, crash-repair provenance, and all `SessionStartSource` variants: implemented RFCs give those fields an audit/interception role that zero current readers does not overturn.
The implementation retains append and replacement `sourceEventSeqs`, crash-repair provenance, and all `SessionStartSource` variants because those fields have an audit/interception role that zero current readers does not overturn.
## Decision