internal/infra/pg/generationgovernance.go
internal/infra/pg · 84 lines · 4 declarations · source
Declarations
type GenerationLink
type GenerationLink struct {
ID string `json:"generation_id"`
ExtractorVersion string `json:"extractor_version"`
AppliedAt time.Time `json:"applied_at"`
}
func generationLinksTx
func generationLinksTx(ctx context.Context, tx pgx.Tx, schema Schema, scope, id string) (*GenerationLink, *GenerationLink, error)
At most two associations per record are enforced by the disposition index. Citation inspection can explain both how this version arose and why it stopped appearing in current recall.
func eraseGenerationMetadataTx
func eraseGenerationMetadataTx(ctx context.Context, tx pgx.Tx, schema Schema, scope, owned string, owner any, out *domain.Erasure) error
Delete and count before fact receipts cascade associations. The source pointer's deferred FK remains satisfied when erasure removes the source's extraction pin later in the transaction.
func refuseCorrectedGenerationSlotTx
func refuseCorrectedGenerationSlotTx(ctx context.Context, tx pgx.Tx, schema Schema, scope, source, owner string, claim domain.Claim, leftSpeaker bool) error
A human correction governs its source-message subject/relation slot during reinterpretation. Merely changing the proposed object must not step around a human's corrected value. Ordinary withdrawals keep their structural-claim scope; independent later sources remain independent.