Harden paged chat history loading
Close the per-thread history loading gate before launching requests, make live/history part reconciliation linear, and reject duplicate history envelope fields. Complete task-owned history paging work remains preserved in the preceding recovery commit. Checked packaged templates and packaged authoring skill references: neither needs an update; docs/notes/large-chat-history.md records the stale shared documentation.
This commit is contained in:
@@ -138,7 +138,8 @@ func TestHistoryLegacyLargeToolAndNonJSON(t *testing.T) {
|
||||
func TestHistoryRejectsMalformedIncludingDiscardedDetail(t *testing.T) {
|
||||
for _, raw := range []string{
|
||||
`null`, `{"data":null}`, `{"data":{}}`, `{"data":[],"cursor":{"next":42}}`,
|
||||
`{"data":[]} {}`, `{"data":[}`, `{"data":[],}`, `{"data":[],"x":01}`,
|
||||
`{"data":[],"data":[]}`, `{"data":[],"cursor":{"next":"one"},"cursor":{"next":"two"}}`,
|
||||
`{"data":[]} {}`, `{"data":[}`, `{"data":[],}`, `{"data":[],"x":01}`, `{"data":[],"x":1,"x":2}`,
|
||||
`{"data":[],"state":{"text":"` + strings.Repeat("x", 1<<20) + `\q"}}`,
|
||||
`{"data":[],"state":{"text":"` + strings.Repeat("x", 1<<20) + `\u12G4"}}`,
|
||||
`{"data":[],"state":{"text":"` + strings.Repeat("x", 1<<20),
|
||||
|
||||
Reference in New Issue
Block a user