G findings: distribution and gitea's package registry write through the held writer, so a restart neither drops nor rewrites their findings

Their in-memory open sets go.

Builds: design 47 G A-32, A-29, A-37
This commit is contained in:
2026-11-11 22:11:12 +01:00
parent 8255640d00
commit 18fd2a32bf
5 changed files with 8 additions and 54 deletions
@@ -507,8 +507,8 @@ var findings = &holder.Findings{Logf: logf}
func main() {
// The tools bundle's findings go through the module's writer (design 47 G §689, A-16); it owns the transfers' kinds, the
// program's writer the driver's.
w, err := views.NewStdioWriter(views.WriterConfig[meshconditions.Finding, meshconditions.FindingCleared, meshconditions.FindingsStated, meshconditions.FindingsAskedEvent]{
Asked: meshconditions.SubjectFindingsAsked, Module: holder.Self, State: stdio.State("findings"), Kinds: holder.TransferFindingKinds, Observe: findings.Observed, Logf: logf})
w, err := views.NewStdioHeldWriter(views.WriterConfig[meshconditions.Finding, meshconditions.FindingCleared, meshconditions.FindingsStated, meshconditions.FindingsAskedEvent]{
Asked: meshconditions.SubjectFindingsAsked, Module: holder.Self, State: stdio.State("findings"), Kinds: holder.TransferFindingKinds, Logf: logf})
if err != nil {
logf("%v", err)
os.Exit(1)
@@ -67,9 +67,9 @@ func run(ctx context.Context, getenv func(string) string) error {
// The program's findings go through the module's writer (design 47 G §689); it owns the driver's kinds, the tools
// bundle's writer the transfers'.
findings := &holder.Findings{Logf: logger.Printf}
w, err := views.NewWriter(views.WriterConfig[meshconditions.Finding, meshconditions.FindingCleared, meshconditions.FindingsStated, meshconditions.FindingsAskedEvent]{
w, err := views.NewHeldWriter(views.WriterConfig[meshconditions.Finding, meshconditions.FindingCleared, meshconditions.FindingsStated, meshconditions.FindingsAskedEvent]{
Asked: meshconditions.SubjectFindingsAsked, Module: holder.Self, Node: cred.Node, State: calls.State("findings"), Kinds: holder.DriverFindingKinds,
JS: js, Conn: conn, Observe: findings.Observed, Logf: logger.Printf})
JS: js, Conn: conn, Logf: logger.Printf})
if err != nil {
return err
}