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
| File | Lines | Declarations | What it is for |
|---|---|---|---|
| compaction.go | 139 | 8 | SegmentStore is what the compaction pass needs from the database. |
| driver.go | 355 | 11 | Driver runs the backlog without anybody asking it to. |
| formation.go | 377 | 12 | Carries the package documentation. |
| health.go | 17 | 1 | The driver installs reporting before it starts. |
| notifications.go | 119 | 8 | Notifications is the pass that tells a project its memory moved, and the loop that keeps trying. |
| projectrebuild.go | 68 | 4 | RunPage is restartable from its durable pending offset. |
| rebuild.go | 66 | 5 | Rebuild prepares all output while the old facts remain available. |
| subjects.go | 194 | 9 | SubjectStore 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.