Make five manifests the milestone changed pass the indexer's judge: an event in one place, one form per state, a digest of a text field, trusted and runtime config values (issue 1966)
messenger's refusal took its declaration of operator-channel out of the judged catalogue, so claude-code's use of it was refused too. distribution's two remaining refusals (its program builds beside the artifact store it provides, and its only health check is its own tool) are a design question left to the lead. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
@@ -62,14 +62,12 @@
|
||||
"mesh-delivery-view.delivered",
|
||||
"node-engine.manifest-reads-changed"
|
||||
],
|
||||
"emits": [
|
||||
"old-name-closed",
|
||||
"direct-writes-closed"
|
||||
],
|
||||
"config": {
|
||||
"callers": {
|
||||
"type": "string",
|
||||
"trusted": true,
|
||||
"runtime": true,
|
||||
"default": "",
|
||||
"description": "per verb, the modules that may call it (JSON object of verb to modules; operator for the operator's session); empty is design 51's list"
|
||||
}
|
||||
},
|
||||
@@ -120,6 +118,10 @@
|
||||
"storage": "stream",
|
||||
"template": "events",
|
||||
"options": {
|
||||
"events": [
|
||||
"old-name-closed",
|
||||
"direct-writes-closed"
|
||||
],
|
||||
"max-age-days": 7,
|
||||
"max-mib": 16
|
||||
}
|
||||
|
||||
@@ -468,11 +468,16 @@ func TestToolsAreTheOnesTheReadmeNamesAndSayWhatTheyDo(t *testing.T) {
|
||||
t.Errorf("the seat tools are %v", names)
|
||||
}
|
||||
req, _ := json.Marshal(m.Requires)
|
||||
for _, want := range []string{`"name":"incoming"`, `"name":"transfers"`, `"name":"findings"`, `"name":"idle","options":{"key-ttl":true}`} {
|
||||
for _, want := range []string{`"name":"incoming"`, `"name":"transfers"`, `"name":"idle","options":{"key-ttl":true}`} {
|
||||
if !strings.Contains(string(req), want) {
|
||||
t.Errorf("the manifest does not require %s (%s)", want, req)
|
||||
}
|
||||
}
|
||||
// findings is one local name in one form (novox/hq ADR 0595 §11): the old section state, which the TypeScript bundle
|
||||
// announces readable for the condition keeper (kept.ts), never also under requires.
|
||||
if strings.Contains(string(req), `"name":"findings"`) {
|
||||
t.Errorf("findings is required as well as kept in state: %s", req)
|
||||
}
|
||||
// transfers keeps for good: a lifetime of its own would drop a transfer's key and leave its chunks in incoming.
|
||||
if strings.Contains(string(req), `"name":"transfers","options"`) {
|
||||
t.Errorf("transfers has options (a lifetime): %s", req)
|
||||
|
||||
@@ -26,11 +26,6 @@
|
||||
"options": {
|
||||
"key-ttl": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "findings",
|
||||
"storage": "key-value",
|
||||
"template": "state"
|
||||
}
|
||||
],
|
||||
"contributes": {
|
||||
@@ -230,6 +225,7 @@
|
||||
"callers": {
|
||||
"type": "string",
|
||||
"trusted": true,
|
||||
"runtime": true,
|
||||
"default": "",
|
||||
"description": "per verb of the two package seats, the callers that may call it (JSON object of verb to callers; * every proved caller, operator the operator's session); empty is design 51's list: publish and publish-part mesh-build-go and mesh-build-node, remove mesh-delivery-builder, versions anyone"
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@@ -53,11 +54,9 @@ func TestEveryStateAndActHasItsTool(t *testing.T) {
|
||||
if dm, err := catalogue.Decode(raw); err != nil {
|
||||
t.Errorf("the manifest does not decode: %v", err)
|
||||
} else {
|
||||
emits := strings.Join(dm.Emits, ",")
|
||||
for _, e := range []string{ConfigChanged, EventRenamed, EventRetiring, EventRetired} {
|
||||
if !strings.Contains(emits, e) {
|
||||
t.Errorf("the manifest does not declare the event %s", e)
|
||||
}
|
||||
// An event goes to one place (novox/hq ADR 0363 §2): config-changed to EVENTS, the rename window's to the stream.
|
||||
if !slices.Equal(dm.Emits, []string{ConfigChanged}) {
|
||||
t.Errorf("emits %v, want only %s: the stream carries the others", dm.Emits, ConfigChanged)
|
||||
}
|
||||
if len(dm.Streams) != 1 || dm.Streams[0].Name != StreamName || dm.Streams[0].Days() != 7 || !dm.Streams[0].Carries(EventRenamed) ||
|
||||
!dm.Streams[0].Carries(EventRetiring) || !dm.Streams[0].Carries(EventRetired) || dm.Streams[0].Carries(ConfigChanged) {
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
}
|
||||
],
|
||||
"emits": [
|
||||
"config-changed",
|
||||
"renamed",
|
||||
"retiring",
|
||||
"retired"
|
||||
"config-changed"
|
||||
],
|
||||
"uses": [
|
||||
"operator-channel"
|
||||
|
||||
@@ -148,7 +148,7 @@ func (f *fakeLedger) apply(r buscalls.ApplyRequest) (buscalls.Applied, error) {
|
||||
continue
|
||||
}
|
||||
okType := map[string]func(any) bool{
|
||||
"string": func(v any) bool { _, ok := v.(string); return ok }, "integer": func(v any) bool { _, ok := v.(float64); return ok },
|
||||
"string": func(v any) bool { _, ok := v.(string); return ok }, "text": func(v any) bool { _, ok := v.(string); return ok }, "integer": func(v any) bool { _, ok := v.(float64); return ok },
|
||||
"object": func(v any) bool { _, ok := v.(map[string]any); return ok },
|
||||
}[field.Type]
|
||||
if okType != nil && !okType(v) {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"version": {"type": "object"},
|
||||
"pending-sections": {"type": "object"},
|
||||
"title": {"type": "string"},
|
||||
"text": {"type": "string"},
|
||||
"text": {"type": "text"},
|
||||
"digest": {"type": "string", "digest-of": "text"},
|
||||
"why": {"type": "string"},
|
||||
"reason": {"type": "string"}
|
||||
@@ -49,7 +49,7 @@
|
||||
"version": {"type": "object"},
|
||||
"pending-sections": {"type": "object"},
|
||||
"title": {"type": "string"},
|
||||
"text": {"type": "string"},
|
||||
"text": {"type": "text"},
|
||||
"digest": {"type": "string", "digest-of": "text"},
|
||||
"why": {"type": "string"},
|
||||
"reason": {"type": "string"}
|
||||
@@ -242,6 +242,7 @@
|
||||
"config": {
|
||||
"readers": {
|
||||
"type": "object",
|
||||
"trusted": true,
|
||||
"description": "The modules heard on the reviews of records (the stream of each part's verdict), by name, each with why; empty grants none. Set only at the controller's terminal or on the operator's Approve.",
|
||||
"default": {}
|
||||
},
|
||||
|
||||
@@ -95,7 +95,7 @@ func TestItDeclaresTheSeatsOfAnAskAndHoldsTheOperatorChannel(t *testing.T) { //
|
||||
}
|
||||
// It performs nothing: the verbs it calls read the open conditions, whether root is free, and which issues
|
||||
// track which conditions.
|
||||
if !reflect.DeepEqual(m.Emits, []string{"refused", "offered", "closed"}) || !reflect.DeepEqual(m.Invokes, []string{
|
||||
if !reflect.DeepEqual(m.Emits, []string{"refused"}) /* offered and closed go to the stream asks only (ADR 0363 §2) */ || !reflect.DeepEqual(m.Invokes, []string{
|
||||
"seat:mesh-conditions.conditions", "seat:" + EngineSeat + ".root-free", TrackingVerb}) {
|
||||
t.Fatalf("emits %v invokes %v", m.Emits, m.Invokes)
|
||||
}
|
||||
|
||||
@@ -86,9 +86,7 @@
|
||||
"intake.standing"
|
||||
],
|
||||
"emits": [
|
||||
"refused",
|
||||
"offered",
|
||||
"closed"
|
||||
"refused"
|
||||
],
|
||||
"streams": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user