Skip to main content

Module session_readset

Module session_readset 

Source
Expand description

Session read set: which files a LeanCTX session actually read, relative to one project root.

This is the observed_reads pillar of the ECCP change envelope (docs/contracts/change-envelope-v1.md): only LeanCTX knows what an agent read while it produced a change. lean-ctx session readset --json prints SessionReadSet; scripts/eccp-envelope write --observed-reads-from-session records it.

The source is the persisted session (files_touched). A session keeps a bounded number of files; when older entries were evicted the read set is marked complete: false, so a consumer never mistakes a truncated set for the whole one.

Structs§

ReadEntry
One file the session read, merged across the selected sessions.
SessionReadSet
The read set of one or more sessions of a project.

Enums§

ReadSetError
Errors of load.

Constants§

SCHEMA
Schema id of the JSON printed by lean-ctx session readset --json.

Functions§

from_sessions
The read set of sessions relative to root. Pure: no disk access beyond canonicalizing root.
load
Loads the sessions (the latest one for root when ids is empty) and returns their read set relative to root.