Skip to main content

internal/formation

github.com/ensera-ai/taisce/internal/formation · 8 files · 1335 lines · 61 tests · source

Package formation turns a stored turn into the facts it supports.

Storing and forming are separate moments, and the separation is not an implementation detail. Forming means asking a model what each message asserts, which takes seconds per message — so holding a caller through it would make an agent's turn block on its own memory write, and the product would be slower than having no memory at all.

What that costs is that a turn is briefly stored and not yet recalled. That is why there are two watermarks: "we have your turn" is what an append confirms, and "your turn is in memory" is the question a recall actually depends on.

Where it sits

Imports: internal/community, internal/compaction, internal/domain, internal/extract, internal/infra/pg, internal/notify, internal/report

Imported by: cmd/taisce

Files

FileLinesDeclarationsWhat it is for
compaction.go1398SegmentStore is what the compaction pass needs from the database.
driver.go35511Driver runs the backlog without anybody asking it to.
formation.go37712Carries the package documentation.
health.go171The driver installs reporting before it starts.
notifications.go1198Notifications is the pass that tells a project its memory moved, and the loop that keeps trying.
projectrebuild.go684RunPage is restartable from its durable pending offset.
rebuild.go665Rebuild prepares all output while the old facts remain available.
subjects.go1949SubjectStore is what the subject pass needs from the database.

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