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
| File | Lines | Declarations | What it is for |
|---|---|---|---|
| artifactcontent.go | 32 | 2 | ArtifactContent uses one wire representation: a canonical base64 JSON string. |
| artifactpolicy.go | 52 | 4 | ConfigureLimits requires an operator connection. |
| artifactstore.go | 355 | 22 | Put stores opaque bytes under one owner. |
| auditstore.go | 423 | 15 | AuditStore appends to the ledger. |
| chunkrecovery.go | 157 | 6 | Source offsets are monotonic within the project. |
| citationstore.go | 236 | 10 | Citation is the currently retained record and one page of exact supporting sources. |
| communitystore.go | 541 | 25 | ProjectionCommunityReport is the projection kind a report registers as. |
| connectionslots.go | 49 | 2 | ErrNoConnectionSlots is the substrate having no session left to give. |
| embeddingbuild.go | 441 | 9 | EmbeddingBatch is supplied by the worker after checking the configured model identity. |
| embeddingcatchup.go | 72 | 1 | CatchUpPage advances only the explicitly selected active model. |
| embeddinggeneration.go | 257 | 12 | Start captures a finite log boundary and allocates a dimension-specific index. |
| embeddingsearch.go | 133 | 5 | Search returns message evidence, not asserted facts. |
| embeddingtypes.go | 101 | 12 | EndpointHash identifies the configured embedding endpoint without publishing its URL or key. |
| entityembedding.go | 734 | 29 | Carries the package documentation. |
| entityinspection.go | 116 | 8 | Entity inspection exposes identity behind a record endpoint. |
| entitynames.go | 135 | 5 | The source and entity are already locked by resolution. |
| entitypurge.go | 196 | 3 | EntityPurge is what a purge did, or what it would have done. |
| entityrecovery.go | 73 | 2 | Identity must agree with the receipt's endpoint, not just occupy the same UUID. |
| erasurestore.go | 572 | 26 | Eraser deletes everything derived from a data subject's observations — or from a named set of source observations — and counts what survived. |
| exportstore.go | 240 | 8 | Exporter answers "what do you hold about me". |
| extractionpin.go | 64 | 6 | PinExtraction prevents a restart with another model from silently mixing partial outcomes. |
| factgeneration.go | 294 | 9 | GenerationResult records what committed, not the current number of surviving rows after erasure. |
| factreceipt.go | 223 | 8 | RecoveryPage is a live UUID page. |
| factstore.go | 460 | 22 | FactStore resolves entities and asserts facts with their evidence. |
| factsupportrecovery.go | 132 | 2 | Repair support only after ordinary missing-fact recovery declined the row. |
| feedbackstore.go | 373 | 16 | What a caller may hold open at once, and how much of it they may send. |
| formationrecovery.go | 119 | 5 | ParkedMetadata intentionally cannot carry provider errors, subjects or conversation text. |
| generationgovernance.go | 84 | 4 | At most two associations per record are enforced by the disposition index. |
| generationrecovery.go | 37 | 1 | A lost projection is still recoverable knowledge. |
| generationreplay.go | 104 | 3 | A published generation is an accepted outcome, not permission to ask the model again. |
| generationsnapshot.go | 117 | 11 | GenerationSnapshot is held only during one bounded model attempt. |
| generationvalidity.go | 45 | 2 | Reconcile only unpublished facts from this transaction's generation. |
| messagewindow.go | 115 | 9 | Message reads an authoritative message reference independently of any extracted fact or vector generation. |
| notificationstore.go | 279 | 16 | Errors a caller can act on. |
| observationretry.go | 148 | 5 | AppendIdempotent returns the original receipt for the same logical write. |
| observationstore.go | 590 | 34 | ObservationStore appends turns to the log. |
| ontology.go | 102 | 3 | LoadOntology reads a tenant's relation vocabulary. |
| operationalhealth.go | 124 | 7 | FormationHealthMaxAge allows one five-minute turn attempt plus scheduling overhead. |
| projectstore.go | 173 | 11 | ProjectStore reads what a project is and what it keeps. |
| rebuildjob.go | 312 | 23 | The connection holds only a session lock while the model runs, never an open transaction. |
| rebuildstaleness.go | 165 | 5 | Stale is what a rebuild left behind. |
| recallstore.go | 384 | 10 | RecallStore reads the anchors a question names and the facts about them. |
| recordassertion.go | 206 | 6 | An assertion is application-authored input, not an inference proposal. |
| recordcorrection.go | 157 | 7 | Correct preserves subject and relation. |
| recordretraction.go | 295 | 17 | The source message and structural identity define the instruction. |
| recordstore.go | 235 | 16 | RecordStore provides bounded inspection of retained facts. |
| refusalstore.go | 65 | 5 | RefusalStore reads what extraction refused, as counts. |
| rejectedidentity.go | 25 | 1 | Exact diagnostic text is identity: different rejected interpretations remain inspectable, while replay of the same proposal cannot inflate the corpus. |
| reportembedding.go | 728 | 29 | Carries the package documentation. |
| retentionstore.go | 178 | 4 | Retention is erasure with a clock instead of a request. |
| schema.go | 46 | 5 | Carries the package documentation. |
| segmentstore.go | 253 | 14 | ProjectionSegment is the projection kind a segment registers as. |
| speaker.go | 74 | 2 | The model supplies reference words, never the key. |
| subjectretention.go | 45 | 1 | Expired identity bookkeeping remains useful while any attributed source survives. |
| subjectstore.go | 266 | 21 | SubjectStore holds optional identity bookkeeping. |
291 tests hold this package's behaviour; the list is named for what each one proves.