Module source_observation

Module source_observation 

Source
Expand description

Process-local source observation for long-lived verified index reads.

StructsΒ§

ObservationState πŸ”’
Mutable verified-epoch state serialized for one source binding.
SourceBinding πŸ”’
Exact root/database/config identity used to isolate one observer.
SourceObservationEntry πŸ”’
Concrete watcher and state for one exact source binding.
SourceObservationRegistry πŸ”’
Bounded process-local registry shared by every clone of one MCP server.
VerifiedReadOutcome πŸ”’
Accepted owned result plus its epoch stamp and measured freshness work.
VerifiedReadStamp πŸ”’
Exact process-local evidence attached to one accepted SQLite read snapshot.
VerifiedReadWork πŸ”’
Measured freshness work consumed before one result was accepted.
VerifiedSourceEpoch πŸ”’
One successfully verified source epoch retained only by this process.

ConstantsΒ§

MAX_POLICY_INPUT_BYTES πŸ”’
Maximum bytes read from any one external source-selection policy input.
SOURCE_OBSERVATION_CAPACITY πŸ”’
Maximum independent project bindings observed by one MCP process.
SOURCE_OBSERVATION_QUEUE_CAPACITY πŸ”’
Maximum unprocessed native watcher events retained per project.
VERIFIED_READ_ATTEMPTS πŸ”’
Fixed attempts used to reconcile an edit that overlaps a query or verification.

FunctionsΒ§

absolute_path_from πŸ”’
Resolve a possibly relative path against the canonical source root.
hash_field πŸ”’
Append one domain-separated field to a policy witness.
hash_policy_file πŸ”’
Hash one bounded policy file with cancellation checks between chunks.
is_database_runtime_path πŸ”’
Return whether a path is the database or one of its runtime sidecar files.
lock_error πŸ”’
Build a root-scoped diagnostic for poisoned observer state.
observer_error πŸ”’
Convert watcher startup failure into a root-scoped observer diagnostic.
observer_event_changes πŸ”’
Classify source events without letting this binding’s own SQLite files self-invalidate it.
process_nonce πŸ”’
Generate one process identity, with a deterministic local entropy fallback.
read_policy_chunk πŸ”’
Read one policy chunk while retaining the file path in any I/O error.
same_native_path πŸ”’
Compare normalized native paths using platform case semantics.
source_policy_paths πŸ”’
Collect every scanner policy input whose state contributes to source selection.
source_policy_witness πŸ”’
Hash the bounded external inputs that may change the scanner’s source selection.
watcher_callback πŸ”’
Convert native watcher callbacks into bounded ingress and continuity state.