mesh/merge-gate pass: builds mesh-knowledge → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
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
The mesh proves which machine called, not which agent on it (hq issue 365), so a review verb could not tell a reviewer from the author. Each version proposed is now judged by claude-code.claude_code_judge in a separate call that sees only the record, the records it links and the rules: approve accepts (or asks the operator for a needs-operator record), changes keeps it proposed with the findings for its author, and a judgement that cannot be had or read leaves it proposed, says so, and never counts as approval.
41 lines
1.4 KiB
Go
41 lines
1.4 KiB
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
// Who may write (the review of mesh-catalog#206): a proposal is revised only by its author, proven; a number
|
|
// reserved by a proven caller is proposed only by that caller. A record with a version whose writer was never
|
|
// proven is never reviewed (review_test.go).
|
|
|
|
func TestARevisionIsTakenOnlyFromTheRecordsAuthor(t *testing.T) {
|
|
w := imported(t, newMemStore())
|
|
n := proposed(t, w, "author@g14", false)
|
|
p := valid(n)
|
|
p.Sections[2].Text = "Merges land a little sooner."
|
|
if _, err := w.k.Propose("other@novox", p); err == nil || !strings.Contains(err.Error(), "only its author") {
|
|
t.Fatalf("a revision by someone else: %v", err)
|
|
}
|
|
if _, err := w.k.Propose(Unproven, p); err == nil || !strings.Contains(err.Error(), "only its author") {
|
|
t.Fatalf("a revision by an unproven caller: %v", err)
|
|
}
|
|
if mustGet(t, w.k.Store, Key{KindDecision, n}).Versions != 2 {
|
|
t.Fatal("a refused revision wrote a version")
|
|
}
|
|
if _, err := w.k.Propose("author@g14", p); err != nil {
|
|
t.Fatalf("the author's revision: %v", err)
|
|
}
|
|
}
|
|
|
|
func TestAReservedNumberIsProposedOnlyByWhoReservedIt(t *testing.T) {
|
|
w := imported(t, newMemStore())
|
|
n := w.reserved(t, "author@g14")
|
|
if _, err := w.k.Propose("other@novox", valid(n)); err == nil || !strings.Contains(err.Error(), "reserved by author@g14") {
|
|
t.Fatalf("a proposal under another's number: %v", err)
|
|
}
|
|
if _, err := w.k.Propose("author@g14", valid(n)); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|