mesh-issues: record who acted as the caller the runtime proves (hq issue 365)

The tool runner now takes a call's caller from the subject it arrived on and
hands it to the module through the SDK (stdio.CallerOf); the tracker records
that bus user on what each verb writes instead of unproven. Never from the
arguments, which still refuse any caller, and unproven where the runtime proves
none. Needs mesh-sdk's go/caller.go (pinned at its branch head until merged).
This commit is contained in:
2026-10-11 11:22:41 +02:00
parent 9355efa00b
commit 66068febb0
10 changed files with 208 additions and 35 deletions
+7 -6
View File
@@ -55,11 +55,12 @@ func oneOf(field, v string, allowed []string) (string, error) {
return "", fmt.Errorf("%s %q is not one of %s", field, v, strings.Join(allowed, ", "))
}
// Unproven is who acted, as recorded, while the runtime does not tell a module who called it: a tool call
// reaches a bundle as a name and arguments only (mesh-sdk Tool.Run), and the tool runner is not told who
// called it either (hq issue 340). The caller is never taken from an argument, so this is recorded rather
// than a name anybody could type (novox/hq ADR 0275 §5).
const Unproven = "unproven"
// Unproven is who acted, as recorded, where the runtime proves no caller: a call on the subject that names none,
// a runtime from before hq issue 365, or a public method called at the terminal. Otherwise who acted is the bus
// user the runtime took from the subject the call arrived on (stdio.CallerOf). The caller is never taken from an
// argument, so neither is a name anybody could type (novox/hq ADR 0275 §5). Mesh-sdk says the same word
// (stdio.Unproven).
const Unproven = stdio.Unproven
// Issue is one issue as the tracker keeps it.
type Issue struct {
@@ -122,7 +123,7 @@ const ImportedBy = "import"
// Import is how an issue, or its status, came from hq.
type Import struct {
At time.Time `json:"at"`
// By is who ran the import, as the runtime proves it (Unproven until it does).
// By is who ran the import, as the runtime proves it (Unproven where it proves none).
By string `json:"by"`
Commit string `json:"commit"`
// From is the document read, empty for a status filled without one.