Tighten who writes and reviews a record, date the rules, bound history (review of #206)
mesh/merge-gate pass: builds new: modules/mesh-knowledge, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compo…
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request

A revision came from anyone and a review was refused only to the first author,
so a co-writer could approve, and a record proposed before callers are proven
would later be reviewable by its own unproven author. Now a revision is taken
only from the proven author, a reserved number only from whoever reserved it,
and a review is refused from any writer of any version or for any record with
an unproven writer. The rules held records from no date, so a correction to an
older record was refused by rules hq never held it to; each dated rule now holds
from hq's own start date, and a new record cannot be dated before its
reservation. history and the question to ask are bounded like the other answers.
This commit is contained in:
2026-10-11 05:10:02 +02:00
parent ba7b455719
commit 10ab959d0f
10 changed files with 382 additions and 33 deletions
@@ -103,8 +103,10 @@ func serve(k *KB, status string) {
}
}
// callerOf is who called, as the runtime proves it. The runtime does not hand a module its caller yet (hq issue
// 365), so it is Unproven; it is never read from the call's arguments, so no caller can name another.
// callerOf is who called, as the runtime proves it: the one place the caller is read, so the change that brings it
// is this one function. The runtime does not hand a module its caller yet (hq issue 365): the SDK's tool call carries
// a name and arguments only, so the SDK must first pass the runtime's proven caller to a tool. Until it does, every
// caller is Unproven. It is never read from the call's arguments, so no caller can name another.
func callerOf(map[string]any) string { return Unproven }
// hear subscribes to the router's word on this module's asks, asked again until the runtime takes it.
@@ -638,7 +640,8 @@ func Tools(k *KB, caller func(map[string]any) string) []stdio.Tool {
"it is in force, what changed or superseded it, or that it is only drafted and not the record's word; each record says " +
"what changed it since and how to read its reasoning. One call, within a bound it states (4 KiB unless asked for more), " +
"saying what it cut.",
Input: schema([]string{"question"}, map[string]any{"question": text("the question, in plain words"), "bound": boundArg()}),
Input: schema([]string{"question"}, map[string]any{"question": map[string]any{"type": "string", "maxLength": MostQuestion,
"description": "the question, in plain words, at most 500 characters"}, "bound": boundArg()}),
Run: func(m map[string]any) (any, error) {
a, err := readArgs("ask", m, "question", "bound")
if err != nil {
@@ -736,11 +739,12 @@ func Tools(k *KB, caller func(map[string]any) string) []stdio.Tool {
}},
{Name: Seat + ".history",
Description: "A record's versions, every one kept: who made it, when, why, and whether it was a progressive insight; with " +
"from and to, the difference between those two versions, line by line.",
"from and to, the difference between those two versions, line by line. Within a bound it states, 4 KiB unless asked for " +
"more, saying what it cut.",
Input: schema([]string{"number"}, map[string]any{"kind": kindArg(), "number": integer("the record's number"),
"from": integer("the earlier version to compare"), "to": integer("the later version to compare")}),
"from": integer("the earlier version to compare"), "to": integer("the later version to compare"), "bound": boundArg()}),
Run: func(m map[string]any) (any, error) {
a, err := readArgs("history", m, "kind", "number", "from", "to")
a, err := readArgs("history", m, "kind", "number", "from", "to", "bound")
if err != nil {
return nil, err
}
@@ -756,7 +760,11 @@ func Tools(k *KB, caller func(map[string]any) string) []stdio.Tool {
if err != nil {
return nil, err
}
return k.History(key, from, to)
b, err := a.num("bound", false)
if err != nil {
return nil, err
}
return k.History(key, from, to, b)
}},
{Name: Seat + ".reserve",
Description: "Reserve the next decision or research number for a record you are about to propose, from the issue " +