§717 (2): the assigner's asks and wants are views of the seat mesh-wants
The seat mesh-wants' definition gains the state asks (template state, history 5, view), its key forms the seven kinds' keys as the assigner's asks package writes them (hold, restore, backup, record, outside, revert, assignments) and its value the ask as the assigner composes it; its wants gains view. The assigner's first-view tool asks replaces assigner_read_asks, its callers the teller and the status view; the status view joins the callers of wants and assignments. The teller follows the asks by seat:mesh-wants.views.asks and invokes nothing of the assigner's. The status view's part waits on a question (its tools ask assigner_read_wants). Builds: design 47 G §717, A-299 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -109,7 +109,7 @@ func fullConf(dir string) string {
|
||||
teller = append(teller, keepsOf(bucketsOf(tellerModule).marks)...)
|
||||
// The assigner's asks and the view's answers, each by its read tool and its views family (ADR 0615, DLV-M3; A-175), and the
|
||||
// teller's own first-views and findings; the buckets themselves are no longer the teller's to read.
|
||||
teller = append(append(append(teller, viewstest.Grants(assignerModule, assignerModule+".assigner_read_asks", tellerConsumer)...), viewstest.Grants(viewModule, viewModule+"."+viewstate.ViewAnswersReadTool, tellerConsumer)...), keepsOf(bucketsOf(tellerModule).firstViews)...)
|
||||
teller = append(append(append(teller, viewstest.Grants(assignerModule, assignerModule+"."+assignerAsksState, tellerConsumer)...), viewstest.Grants(viewModule, viewModule+"."+viewstate.ViewAnswersReadTool, tellerConsumer)...), keepsOf(bucketsOf(tellerModule).firstViews)...)
|
||||
teller = append(teller, keepsOf(bucketsOf(tellerModule).findings)...)
|
||||
view := append(append(readOf(tellerAnswers), readOf(assignerAsks)...), keepsOf(viewAnswers)...)
|
||||
assigner := keepsOf(assignerAsks)
|
||||
@@ -192,7 +192,7 @@ func startFull(t *testing.T) *fullBed {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// The assigner as the owner of its asks: its read tool and its views family (ADR 0615).
|
||||
viewstest.Serve(t, ctx, js, ctl, assignerModule, "asks", assignerModule+".assigner_read_asks", tellerConsumer)
|
||||
viewstest.Serve(t, ctx, js, ctl, assignerModule, "asks", assignerModule+"."+assignerAsksState, tellerConsumer)
|
||||
// The view as the owner of its answers, as the teller follows them (A-175, A-178).
|
||||
viewstest.Serve(t, ctx, js, ctl, viewModule, viewstate.ViewAnswersState, viewModule+"."+viewstate.ViewAnswersReadTool, tellerConsumer)
|
||||
return &fullBed{srv: srv, ctl: ctl, js: js, ctx: ctx}
|
||||
|
||||
@@ -122,7 +122,7 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
}
|
||||
defer writer.Close()
|
||||
reader.Findings = func() views.WireWriter { return writer }
|
||||
asks, err := reader.Follow(assignerModule, assignerAsksState, assignerModule+".assigner_read_asks")
|
||||
asks, err := reader.Follow(assignerModule, assignerAsksState, assignerModule+"."+assignerAsksState)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -174,5 +174,5 @@ func run(ctx context.Context, getenv func(string) string, logOut io.Writer) erro
|
||||
}
|
||||
}
|
||||
|
||||
// assignerAsksState is the assigner's state of its asks (assignerAsksBucket).
|
||||
// assignerAsksState is the seat mesh-wants' state asks, which the assigner keeps, and its first-view tool's name (design 47 G §717).
|
||||
const assignerAsksState = "asks"
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-view/viewstate"
|
||||
@@ -36,6 +37,10 @@ func TestTheNamesAreTheManifests(t *testing.T) {
|
||||
if len(m.Reads) != 0 {
|
||||
t.Errorf("the teller reads no other module's state, its manifest's reads are %v", m.Reads)
|
||||
}
|
||||
// Design 47 G §717: the assigner's asks are the seat mesh-wants' view, followed in seat form; no invoke names its tool.
|
||||
if want := "seat:mesh-wants.views." + assignerAsksState; !slices.Contains(m.Consumes, want) || slices.ContainsFunc(m.Invokes, func(e string) bool { return strings.HasPrefix(e, assignerModule+".") }) {
|
||||
t.Errorf("the teller follows %s and invokes nothing of the assigner's, its manifest's consumes are %v and invokes %v", want, m.Consumes, m.Invokes)
|
||||
}
|
||||
if want := viewModule + "." + viewstate.ViewAnswersReadTool; !slices.Contains(m.Invokes, want) {
|
||||
t.Errorf("the teller follows the view's answers by %s, its manifest's invokes are %v", want, m.Invokes)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user