deepseek-harness/docs
kingwl 7ef21239ca feat(session): opt-in packed chunk rows in the JSONL log
Providers stream token-sized deltas, so a session log stores hundreds of
near-identical assistant/chunk lines whose JSON envelopes dwarf their
payloads (~56x measured on a real DeepSeek session, 73% of file bytes).

Add a lossless storage codec to dsh-session: packChunkRuns() folds each
run of >=3 consecutive same-block delta chunks into one storage row --
text-chunks / reasoning-chunks / tool-call-chunks, bare slash-less tags
like the header line's 'session' so rows cannot be confused with session
events -- and decodeStorageRecord() expands rows back to the exact
original events (seq0/time0 + dt gap array reconstruct every member's
seq/time; tool-call rows carry the run-constant id/name). The encoder
whitelists exact shapes and stores anything unrecognized verbatim; the
decoder validates row-tagged values and fails loud on malformation.

The JSONL backend gains a packChunks config (default false). Writing
packs only when enabled -- default-off output stays byte-identical to
the previous layout, so snapshot goldens are untouched. Reading is
layout-blind: scanLog always decodes rows and now checks seq contiguity
with a cursor instead of the line index, so packed, unpacked, and mixed
files all load identically. Fixture readers (llm-replay parseSessionLog,
acp-snapshot normalizeSessionLog) share the codec; the normalizer zeroes
a row's time0/dt exactly like an event's time. The two demo bundles
plumb packChunks from cordis.yml to the backend.

Measured on a real coding session: 105 KB -> 42 KB (-60%), 475 lines ->
74, with reasoning/tool-call heavy sessions saving the most. Covered by
example + fast-check round-trip codec tests, backend packed/mixed/torn-
tail specs, and an end-to-end demo run loading a packed log through a
default-config backend.
2026-07-15 21:26:36 +08:00
..
cookbook fix: satisfy doc gates after the examples/ relocation 2026-07-15 16:46:05 +08:00
cordis-catalog feat(session): opt-in packed chunk rows in the JSONL log 2026-07-15 21:26:36 +08:00
core-data-structures feat(session): opt-in packed chunk rows in the JSONL log 2026-07-15 21:26:36 +08:00
i18n fix(i18n): refine Chinese prose and prompt validation 2026-07-15 20:39:24 +08:00
postmortem fix(snapshot): register filesystem tools through explicit overlay 2026-07-14 21:25:58 +08:00
rfc fix(i18n): refine Chinese prose and prompt validation 2026-07-15 20:39:24 +08:00
agent-lifecycle.md docs: align the agent-scope contracts 2026-07-11 22:55:40 +08:00
AGENTS.md docs: align prose with runtime contracts 2026-07-14 16:21:41 +08:00
architecture.md refactor: relocate demo app bundles to packages/examples/*-demo 2026-07-15 16:46:05 +08:00
capability-seams.md refactor: relocate demo app bundles to packages/examples/*-demo 2026-07-15 16:46:05 +08:00
config-catalog.md feat(session): opt-in packed chunk rows in the JSONL log 2026-07-15 21:26:36 +08:00
cordis-primer.md fix(snapshot): register filesystem tools through explicit overlay 2026-07-14 21:25:58 +08:00
defensive-patterns.md docs(AGENTS): rewrite the root standing orders to the 1,500-word budget 2026-07-04 14:22:47 +08:00
development.i18n.yaml fix(i18n): make translation contracts executable 2026-07-14 23:09:01 +08:00
development.md fix(i18n): make translation contracts executable 2026-07-14 23:09:01 +08:00
development.zh.md fix(i18n): make translation contracts executable 2026-07-14 23:09:01 +08:00
event-producer-consumer.md feat(session): opt-in packed chunk rows in the JSONL log 2026-07-15 21:26:36 +08:00
glossary.md docs(rfc): align scoped runtime contracts 2026-07-12 22:49:46 +08:00
graph-atlas.md chore: register the cordis group across repo gates and docs 2026-07-09 13:57:03 +08:00
module-graph.md refactor: relocate demo app bundles to packages/examples/*-demo 2026-07-15 16:46:05 +08:00
persistence-catalog.md Merge remote-tracking branch 'origin/master' into codex/trim-ai-prose 2026-07-14 14:37:16 +08:00
testing.md fix: default time context to system zone 2026-07-14 21:45:54 +08:00
tool-catalog.md refactor(core): remove owner-final assembly machinery 2026-07-13 13:09:41 +08:00
tool-execution-pipeline.md docs: rebalance prose cleanup and add trimming skill 2026-07-13 23:27:00 +08:00