Skip to main content

internal/infra/pg

github.com/ensera-ai/taisce/internal/infra/pg · 55 files · 11932 lines · 291 tests · source

Entity embeddings are candidate indexes over retained identities and their verbatim evidence. They never merge entities: a candidate still resolves through the exact entity ID chosen by the caller. Aggregate provenance is registered to every contributing observation so any source loss removes the vector and forces a rebuild from what survived.

Where it sits

Imports: internal/community, internal/compaction, internal/domain, internal/report, internal/semantic

Imported by: cmd/taisce, internal/api, internal/entitycandidate, internal/formation, internal/migrate, internal/passage, internal/reportcandidate

Files

FileLinesDeclarationsWhat it is for
artifactcontent.go322ArtifactContent uses one wire representation: a canonical base64 JSON string.
artifactpolicy.go524ConfigureLimits requires an operator connection.
artifactstore.go35522Put stores opaque bytes under one owner.
auditstore.go42315AuditStore appends to the ledger.
chunkrecovery.go1576Source offsets are monotonic within the project.
citationstore.go23610Citation is the currently retained record and one page of exact supporting sources.
communitystore.go54125ProjectionCommunityReport is the projection kind a report registers as.
connectionslots.go492ErrNoConnectionSlots is the substrate having no session left to give.
embeddingbuild.go4419EmbeddingBatch is supplied by the worker after checking the configured model identity.
embeddingcatchup.go721CatchUpPage advances only the explicitly selected active model.
embeddinggeneration.go25712Start captures a finite log boundary and allocates a dimension-specific index.
embeddingsearch.go1335Search returns message evidence, not asserted facts.
embeddingtypes.go10112EndpointHash identifies the configured embedding endpoint without publishing its URL or key.
entityembedding.go73429Carries the package documentation.
entityinspection.go1168Entity inspection exposes identity behind a record endpoint.
entitynames.go1355The source and entity are already locked by resolution.
entitypurge.go1963EntityPurge is what a purge did, or what it would have done.
entityrecovery.go732Identity must agree with the receipt's endpoint, not just occupy the same UUID.
erasurestore.go57226Eraser deletes everything derived from a data subject's observations — or from a named set of source observations — and counts what survived.
exportstore.go2408Exporter answers "what do you hold about me".
extractionpin.go646PinExtraction prevents a restart with another model from silently mixing partial outcomes.
factgeneration.go2949GenerationResult records what committed, not the current number of surviving rows after erasure.
factreceipt.go2238RecoveryPage is a live UUID page.
factstore.go46022FactStore resolves entities and asserts facts with their evidence.
factsupportrecovery.go1322Repair support only after ordinary missing-fact recovery declined the row.
feedbackstore.go37316What a caller may hold open at once, and how much of it they may send.
formationrecovery.go1195ParkedMetadata intentionally cannot carry provider errors, subjects or conversation text.
generationgovernance.go844At most two associations per record are enforced by the disposition index.
generationrecovery.go371A lost projection is still recoverable knowledge.
generationreplay.go1043A published generation is an accepted outcome, not permission to ask the model again.
generationsnapshot.go11711GenerationSnapshot is held only during one bounded model attempt.
generationvalidity.go452Reconcile only unpublished facts from this transaction's generation.
messagewindow.go1159Message reads an authoritative message reference independently of any extracted fact or vector generation.
notificationstore.go27916Errors a caller can act on.
observationretry.go1485AppendIdempotent returns the original receipt for the same logical write.
observationstore.go59034ObservationStore appends turns to the log.
ontology.go1023LoadOntology reads a tenant's relation vocabulary.
operationalhealth.go1247FormationHealthMaxAge allows one five-minute turn attempt plus scheduling overhead.
projectstore.go17311ProjectStore reads what a project is and what it keeps.
rebuildjob.go31223The connection holds only a session lock while the model runs, never an open transaction.
rebuildstaleness.go1655Stale is what a rebuild left behind.
recallstore.go38410RecallStore reads the anchors a question names and the facts about them.
recordassertion.go2066An assertion is application-authored input, not an inference proposal.
recordcorrection.go1577Correct preserves subject and relation.
recordretraction.go29517The source message and structural identity define the instruction.
recordstore.go23516RecordStore provides bounded inspection of retained facts.
refusalstore.go655RefusalStore reads what extraction refused, as counts.
rejectedidentity.go251Exact diagnostic text is identity: different rejected interpretations remain inspectable, while replay of the same proposal cannot inflate the corpus.
reportembedding.go72829Carries the package documentation.
retentionstore.go1784Retention is erasure with a clock instead of a request.
schema.go465Carries the package documentation.
segmentstore.go25314ProjectionSegment is the projection kind a segment registers as.
speaker.go742The model supplies reference words, never the key.
subjectretention.go451Expired identity bookkeeping remains useful while any attributed source survives.
subjectstore.go26621SubjectStore holds optional identity bookkeeping.

291 tests hold this package's behaviour; the list is named for what each one proves.