Source Revision Query Capable
Opt-in capability for asking which propositions were read from a source, and from which revision of that source.
These finders live outside PropositionStore and PropositionRepository deliberately. Answering them takes provenance, and plenty of backends store evidence without projecting it on an ordinary context read. A shared default body written over such a read would return an empty list on those backends, and an empty list already has a meaning here: nothing in this context cites that source. A store that cannot look would then be indistinguishable from one that looked and found nothing.
Implementing this interface is the promise that the backend really can look. A caller holding a plain PropositionRepository asks for the capability with an as? test and handles its absence as its own case:
val revisionQueries = repository as? SourceRevisionQueryCapable
?: error("this backend cannot answer source-revision queries")Each finder is a pair: a typed entry point taking a ContextId, and a plain-String variant that carries the work. The typed one forwards to the String one, matching findByContextId -> findByContextIdValue on PropositionStore. Implementations live on the String variant, because ContextId is a value class: the typed method's JVM name is mangled and a Java backend cannot override it, so an implementation placed there would be invisible to Java callers. The String variant has an ordinary JVM signature and sits on the path of every typed call.
A store whose reads already carry every provenance entry can pick up all three String variants from ProvenanceScanningSourceRevisionQueries.
Inheritors
Properties
Whether this particular instance can actually answer these queries. Implementing the interface is a type-level promise; this is the runtime truth. A decorator that forwards to a backend it only discovers at construction time reports here whether the backend it got can answer. Callers check this before trusting an empty result.
Functions
findBySourceKey by plain context-id string — the implementation point, and what Java callers use.
findBySourceRevision by plain context-id string — the implementation point, and what Java callers use.
findRevisionlessBySourceLocator by plain context-id string — the implementation point, and what Java callers use.