deepseek-harness/packages/core/session/tests
Hypatia May f66015455e test(session): cover the request/context fold and its turn enclosure
Adds direct coverage for `Session.requestContext()`: undefined before any
record, folding a seeded log on first read (the watermark starts at 0 with the
seed already in the log, so a first read must consume all of it), incremental
advance across appends, a batch appended between two reads, and the frozen
return that keeps a reader from desyncing later dedup comparisons.

The turn-enclosure assertion goes in the invariant spec rather than beside the
fold tests, because enclosure is enforced by the opt-in invariant companion
plugin and not by `append` itself. Asserting it on a bare Session would have
been a test that passes for the wrong reason.
2026-07-30 15:08:54 +08:00
..
chunk-rows.spec.ts refactor: migrate linting to Oxlint 2026-07-29 14:32:11 +08:00
derived-cache.spec.ts refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
fork.spec.ts Merge remote-tracking branch 'origin/master' into xtr/identified-immutable-messages 2026-07-28 15:45:53 +08:00
gen-persistence-catalog.spec.ts docs: expand session persistence event catalog 2026-07-18 15:11:51 +08:00
invariant.spec.ts test(session): cover the request/context fold and its turn enclosure 2026-07-30 15:08:54 +08:00
json.spec.ts fix(schema): align projected and enforced declarations 2026-07-23 01:05:41 +08:00
properties.spec.ts refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
repair.spec.ts refactor: identify and freeze messages at creation 2026-07-28 13:55:59 +08:00
request-header.spec.ts test(session): cover the request/context fold and its turn enclosure 2026-07-30 15:08:54 +08:00
scoped.spec.ts refactor(core): simplify scoped agent lifecycles 2026-07-12 22:36:04 +08:00
session.spec.ts fix: enforce message snapshot invariants 2026-07-28 15:33:00 +08:00
surface.spec.ts fix: preserve message occurrence contracts 2026-07-28 14:44:15 +08:00