Name no node: the forge owner in claude-code's, mesh-config's, mesh-issues's, messenger's and records's test data becomes acme (issue 1838)
This commit is contained in:
@@ -251,7 +251,7 @@ func TestTheSessionsGitIsPointedAtTheFileUnderTheOperatorsOwnEnvironment(t *test
|
||||
|
||||
func TestForgeCredentialLinesAreReadStrictly(t *testing.T) {
|
||||
for _, bad := range []string{"", "\n", "token", "https://git.example.test", "https://agent-anchor@git.example.test",
|
||||
"https://agent-anchor:t@git.example.test/novox/hq.git", "ssh://agent-anchor:t@git.example.test",
|
||||
"https://agent-anchor:t@git.example.test/acme/hq.git", "ssh://agent-anchor:t@git.example.test",
|
||||
"https://agent-anchor:t@git.example.test\nnot a line"} {
|
||||
if _, err := ForgeCredentialLines(bad); err == nil {
|
||||
t.Errorf("%q was taken", bad)
|
||||
|
||||
@@ -131,13 +131,13 @@ func TestWhatIsNotAWorkAroundPasses(t *testing.T) {
|
||||
g := guard()
|
||||
for _, command := range []string{
|
||||
"git push -u origin feat/x",
|
||||
"git clone ssh://git@git.anchor.internal:222/novox/hq.git",
|
||||
"git fetch ssh://git@git.anchor.internal:222/novox/hq.git main",
|
||||
"git clone ssh://git@git.anchor.internal:222/acme/hq.git",
|
||||
"git fetch ssh://git@git.anchor.internal:222/acme/hq.git main",
|
||||
`GIT_SSH_COMMAND="ssh -i ~/.ssh/forge -o IdentitiesOnly=yes" git push origin HEAD`,
|
||||
"git -c core.sshCommand='ssh -p 222' pull",
|
||||
"ssh -T git@git.anchor.internal -p 222",
|
||||
"ssh forge",
|
||||
"scp git@git.anchor.internal:novox/hq.git .",
|
||||
"scp git@git.anchor.internal:acme/hq.git .",
|
||||
"ssh github.com",
|
||||
"ssh -T git@github.com",
|
||||
"ssh user@203.0.113.7 uptime",
|
||||
|
||||
@@ -206,7 +206,7 @@ func holdsText(list []string, s string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
const project = "-home-op-projects-novox-hq"
|
||||
const project = "-home-op-projects-acme-hq"
|
||||
|
||||
func twoNodes(t *testing.T) (*memState, *clock, *memNode, *memNode) {
|
||||
state, c := newMemState(), &clock{now: time.Date(2026, 10, 13, 12, 0, 0, 0, time.UTC)}
|
||||
|
||||
@@ -26,7 +26,7 @@ func TestToolForgePullReadsTheCapturedAnswers(t *testing.T) {
|
||||
ok, _ := json.Marshal(map[string]any{"ok": true, "output": "", "answer": json.RawMessage(raw)})
|
||||
for name, answer := range map[string]json.RawMessage{"bare": raw, "content list": content, "ok answer": ok} {
|
||||
f := toolForge{ask: func(key string, body any) (json.RawMessage, error) { return answer, nil }}
|
||||
open, merged, head, err := f.Pull("novox", "mesh-catalog", tc.number)
|
||||
open, merged, head, err := f.Pull("acme", "mesh-catalog", tc.number)
|
||||
if err != nil || open != tc.open || merged != tc.merged || head != tc.head {
|
||||
t.Errorf("%s (%s): open %v merged %v head %q, err %v", tc.file, name, open, merged, head, err)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
|
||||
// Issue 1826 (novox/hq ADR 0502): a value held for the open pull request that introduces its key.
|
||||
|
||||
const thePull = "novox/mesh-catalog#434"
|
||||
const thePull = "acme/mesh-catalog#434"
|
||||
|
||||
// n8nPullDeclares is what the controller tells of the pull request: n8n gets a required number media-gid.
|
||||
func n8nPullDeclares() map[string]any {
|
||||
@@ -94,7 +94,7 @@ func TestAPullRequestsDeclarationsAreTakenFromTheControllerAlone(t *testing.T) {
|
||||
if len(a.Modules) != 1 || a.Modules[0] != "n8n" {
|
||||
t.Errorf("answered %+v", a)
|
||||
}
|
||||
e, _ := m.Get(PullsState, "novox.mesh-catalog.434")
|
||||
e, _ := m.Get(PullsState, "acme.mesh-catalog.434")
|
||||
var pd PullDecl
|
||||
if e == nil || json.Unmarshal(e.Value, &pd) != nil || pd.Head != "abc1234def" ||
|
||||
pd.Declares["n8n"]["media-gid"].Type != "number" || !pd.Declares["n8n"]["media-gid"].Required {
|
||||
@@ -143,7 +143,7 @@ func TestAProposalNamingAPullRequestIsJudgedAgainstItsDeclaration(t *testing.T)
|
||||
"a bad value": {func(c *Call) { c.Value = 0.0 }, "below the minimum"},
|
||||
"a wrong type": {func(c *Call) { c.Value = "2000" }, "is not a number"},
|
||||
"another node": {func(c *Call) { c.Node = "node-b" }, "is not assigned to node-b"},
|
||||
"another pull": {func(c *Call) { c.Pull = "novox/mesh-catalog#435" }, "holds no declaration for"},
|
||||
"another pull": {func(c *Call) { c.Pull = "acme/mesh-catalog#435" }, "holds no declaration for"},
|
||||
"a malformed pull": {func(c *Call) { c.Pull = "434" }, "owner/repository#number"},
|
||||
} {
|
||||
call := base
|
||||
@@ -232,7 +232,7 @@ func TestAHeldValueIsAskedAndKeptApartOnApprove(t *testing.T) {
|
||||
}
|
||||
// Another head, and another pull request, are not answered.
|
||||
got, _ = c.Do(Call{Action: "held", Caller: ControllerCaller,
|
||||
Pulls: []PullAt{{thePull, "ffff0000"}, {"novox/mesh-catalog#435", "abc"}}})
|
||||
Pulls: []PullAt{{thePull, "ffff0000"}, {"acme/mesh-catalog#435", "abc"}}})
|
||||
if ha = got.(*HeldAnswer); len(ha.Held) != 0 || len(ha.Skipped) != 1 || !strings.Contains(ha.Skipped[0].Why, "held at") {
|
||||
t.Errorf("held at another head answered %+v", ha)
|
||||
}
|
||||
@@ -312,14 +312,14 @@ func TestTheMergeAppliesAHeldValueAndItResolvesOnceTheTrunkDeclaresTheKey(t *tes
|
||||
tell(t, c, thePull, "abc1234def", n8nPullDeclares())
|
||||
holdIt(t, c, m, r)
|
||||
approved := func() string {
|
||||
raw, _ := m.Get(KeptState, "novox.mesh-catalog.434.node-a.n8n.media-gid")
|
||||
raw, _ := m.Get(KeptState, "acme.mesh-catalog.434.node-a.n8n.media-gid")
|
||||
var k KeptValue
|
||||
_ = json.Unmarshal(raw.Value, &k)
|
||||
return k.Approved
|
||||
}()
|
||||
m.events, m.handActs = nil, nil
|
||||
|
||||
said := c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: "abc1234def"}, true)
|
||||
said := c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: "abc1234def"}, true)
|
||||
if len(said) == 0 {
|
||||
t.Fatal("the merge said nothing")
|
||||
}
|
||||
@@ -356,7 +356,7 @@ func TestTheMergeAppliesAHeldValueAndItResolvesOnceTheTrunkDeclaresTheKey(t *tes
|
||||
}
|
||||
// A merge heard twice sets nothing twice.
|
||||
m.events = nil
|
||||
c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: "abc1234def"}, true)
|
||||
c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: "abc1234def"}, true)
|
||||
if len(m.events) != 0 {
|
||||
t.Errorf("a second merge raised %+v", m.events)
|
||||
}
|
||||
@@ -369,7 +369,7 @@ func TestAClosedPullRequestDropsItsHeldValuesAndSaysSo(t *testing.T) {
|
||||
holdIt(t, c, m, r)
|
||||
m.events = nil
|
||||
f.state[thePull] = [2]bool{false, false}
|
||||
said := c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434}, false)
|
||||
said := c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434}, false)
|
||||
if len(said) == 0 || !strings.Contains(strings.Join(said, "\n"), "closed unmerged: dropped, nothing was set") {
|
||||
t.Errorf("said %v", said)
|
||||
}
|
||||
@@ -392,7 +392,7 @@ func TestACloseEventForAMergedPullRequestIsItsMerge(t *testing.T) {
|
||||
holdIt(t, c, m, r)
|
||||
f.state[thePull] = [2]bool{false, true}
|
||||
f.head = "abc1234def"
|
||||
c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434}, false)
|
||||
c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434}, false)
|
||||
if v, set := storedValue(t, m, "module.node-a.n8n.media-gid"); !set || string(v.Value) != "2000" {
|
||||
t.Errorf("the merge of a pull request announced closed set %+v", v)
|
||||
}
|
||||
@@ -419,8 +419,8 @@ func TestTheLookAtTheForgeFindsAMissedMergeOrCloseAndLeavesAnOpenPullRequest(t *
|
||||
t.Errorf("a missed merge: %+v", v)
|
||||
}
|
||||
// A missed close.
|
||||
tell(t, c, "novox/mesh-catalog#440", "abc", n8nPullDeclares())
|
||||
f.state["novox/mesh-catalog#440"] = [2]bool{false, false}
|
||||
tell(t, c, "acme/mesh-catalog#440", "abc", n8nPullDeclares())
|
||||
f.state["acme/mesh-catalog#440"] = [2]bool{false, false}
|
||||
c.SweepPulls()
|
||||
if p, _ := m.Keys(PullsState); len(p) != 0 {
|
||||
t.Errorf("a missed close left %v", p)
|
||||
@@ -453,7 +453,7 @@ func TestTheMergeAppliesOnlyAValueHeldAtTheMergedHead(t *testing.T) {
|
||||
c, m, r, _ := aHoldingMesh(t)
|
||||
tell(t, c, thePull, "abc1234def", n8nPullDeclares())
|
||||
holdIt(t, c, m, r)
|
||||
said := c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: head}, true)
|
||||
said := c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: head}, true)
|
||||
if _, set := storedValue(t, m, "module.node-a.n8n.media-gid"); set || keptCount(m) != 0 ||
|
||||
!strings.Contains(strings.Join(said, "\n"), "dropped, nothing was set") {
|
||||
t.Errorf("%s: set=%v held=%d said %v", name, set, keptCount(m), said)
|
||||
@@ -470,7 +470,7 @@ func TestALaterHeadWithoutTheDeclarationLeavesNothingToApplyAtTheMerge(t *testin
|
||||
tell(t, c, thePull, "abc1234def", n8nPullDeclares())
|
||||
holdIt(t, c, m, r)
|
||||
tell(t, c, thePull, "bbbbbbbbbb", map[string]any{})
|
||||
c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: "bbbbbbbbbb"}, true)
|
||||
c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434, Merged: true, HeadSHA: "bbbbbbbbbb"}, true)
|
||||
if _, set := storedValue(t, m, "module.node-a.n8n.media-gid"); set {
|
||||
t.Error("a value held for a declaration the merged head lacks was set")
|
||||
}
|
||||
@@ -482,7 +482,7 @@ func TestACloseThatTheForgeCannotBeAskedAboutDropsNothing(t *testing.T) {
|
||||
tell(t, c, thePull, "abc1234def", n8nPullDeclares())
|
||||
holdIt(t, c, m, r)
|
||||
f.err = errors.New("the forge is down")
|
||||
c.HeardPull(PullEvent{Owner: "novox", Repo: "mesh-catalog", Number: 434}, false)
|
||||
c.HeardPull(PullEvent{Owner: "acme", Repo: "mesh-catalog", Number: 434}, false)
|
||||
if keptCount(m) != 1 {
|
||||
t.Fatal("a close the forge could not confirm dropped the value")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Captured answers of the gitea module's `gitea_get_pull_request`, taken 2026-10-22 by fix-1826-catalog@node-d with
|
||||
`mesh_call gitea.gitea_get_pull_request {"owner":"novox","repo":"mesh-catalog","number":N}` through the mesh MCP server.
|
||||
`mesh_call gitea.gitea_get_pull_request {"owner":"acme","repo":"mesh-catalog","number":N}` through the mesh MCP server.
|
||||
|
||||
- get_pull_request_closed_merged_435.json: pull request 435, closed and merged.
|
||||
- get_pull_request_open_434.json: pull request 434, open.
|
||||
|
||||
Vendored
+1
-1
@@ -4,7 +4,7 @@
|
||||
"body": "Part of design 47's milestone R4c-9 (ADR 0487): the image build module. A container image becomes one more artifact kind the builder builds through a build module, like Go and Node: mesh-build-image builds rootless with buildah, a candidate's check publishes nothing, a trunk build publishes exactly one digest and its build key names the reference. build-agent keeps building and delivering every image until R4g; nothing the operator sees changes. One delivery group on branch `feat/r4c9-image-build` in mesh-catalog and mesh-delivery. After the delivery the lead assigns buildah and mesh-build-image to node-d and node-a.\n\nReviewed-by: reviewer-r4c9@node-d at 7b5f7f84acb73aaf8189200548ff69fd9aac04b2",
|
||||
"head": "feat/r4c9-image-build",
|
||||
"head_sha": "7b5f7f84acb73aaf8189200548ff69fd9aac04b2",
|
||||
"html_url": "http://127.0.0.1:20000/novox/mesh-catalog/pulls/435",
|
||||
"html_url": "http://127.0.0.1:20000/acme/mesh-catalog/pulls/435",
|
||||
"merge_commit_sha": "5a6d082e8c55603e47f074deb96da80fc9240ab4",
|
||||
"merged": true,
|
||||
"merged_at": "2026-10-22T08:57:10Z",
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"body": "Part of design 47's milestone R4d: n8n and the bus run pinned upstream images (ADR 0480).\n\nReviewed-by: reviewer-r4d@node-d at c948f3a61c74257e6e3147effb396d9d6434f491\n",
|
||||
"head": "feat/r4d",
|
||||
"head_sha": "c948f3a61c74257e6e3147effb396d9d6434f491",
|
||||
"html_url": "http://127.0.0.1:20000/novox/mesh-catalog/pulls/434",
|
||||
"html_url": "http://127.0.0.1:20000/acme/mesh-catalog/pulls/434",
|
||||
"merged": false,
|
||||
"number": 434,
|
||||
"state": "open",
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
// as `mesh-controller.status` named it when the link was refused, the others as `mesh-controller.conditions`
|
||||
// answered on 2026-10-11.
|
||||
var realConditionKeys = []string{
|
||||
"delivery.novox/mesh-controller_d2e9dc61590f.stalled", // a delivery's id carries its repository, owner/name
|
||||
"delivery.acme/mesh-controller_d2e9dc61590f.stalled", // a delivery's id carries its repository, owner/name
|
||||
"machine.node-c.telegram.telegram-token.secret-given",
|
||||
"module.openrazer.node-d.relogin-needed",
|
||||
"mesh.hand-acts.plans_go.healer-wanted", // a space in the id, made `_` by the controller
|
||||
@@ -42,7 +42,7 @@ func TestAConditionLinkRefusesWhatTheControllerNeverRaises(t *testing.T) {
|
||||
"machine..secret-given", // an empty token
|
||||
"machine.node-c.secret given", // a space the controller makes `_`
|
||||
"machine.node-c:1.secret-given", // a colon the controller makes `_`
|
||||
"delivery.novox/mesh-controller@d2e9dc61590f.stalled", // `@` too
|
||||
"delivery.acme/mesh-controller@d2e9dc61590f.stalled", // `@` too
|
||||
"machine.*.silent", // a wildcard on the bus
|
||||
"machine.>", // a wildcard on the bus
|
||||
"machine.node-a.silent\nmore", // a second line
|
||||
@@ -57,11 +57,11 @@ func TestAConditionLinkRefusesWhatTheControllerNeverRaises(t *testing.T) {
|
||||
// A delivery link takes every id mesh-delivery gives (novox/hq issue 475): the ids are real, as
|
||||
// `mesh-delivery.deliveries` answered on 2026-10-11.
|
||||
var realDeliveryIDs = []string{
|
||||
"novox/mesh-controller@0f853e93fa11",
|
||||
"novox/mesh-catalog@7714f164c33f",
|
||||
"novox/hq@34bdb1a34f5a",
|
||||
"novox/mesh-media-catalog@dd3f0abb3f78",
|
||||
"novox/mesh-tools@82aefe1988c2",
|
||||
"acme/mesh-controller@0f853e93fa11",
|
||||
"acme/mesh-catalog@7714f164c33f",
|
||||
"acme/hq@34bdb1a34f5a",
|
||||
"acme/mesh-media-catalog@dd3f0abb3f78",
|
||||
"acme/mesh-tools@82aefe1988c2",
|
||||
}
|
||||
|
||||
func TestADeliveryLinkTakesEveryIdMeshDeliveryGives(t *testing.T) {
|
||||
@@ -74,15 +74,15 @@ func TestADeliveryLinkTakesEveryIdMeshDeliveryGives(t *testing.T) {
|
||||
}
|
||||
for _, id := range []string{
|
||||
"",
|
||||
"mesh-controller@0f853e93fa11", // no owner
|
||||
"novox/mesh-controller", // no commit
|
||||
"novox/mesh-controller@0f853e93fa11aa", // more than twelve characters of the commit
|
||||
"Novox/Mesh-Controller@0f853e93fa11", // mesh-delivery lower-cases the repository
|
||||
"novox/mesh-controller@0F853E93FA11", // a commit is lower-case hex
|
||||
"novox/mesh-controller@main", // a branch, not a commit
|
||||
"novox/mesh/controller@0f853e93fa11", // a repository is owner/name, no deeper
|
||||
"novox/mesh-controller_d2e9dc61590f", // a condition key's form of it, not the id
|
||||
"novox/mesh-controller@0f853e93fa11\nmore", // a second line
|
||||
"mesh-controller@0f853e93fa11", // no owner
|
||||
"acme/mesh-controller", // no commit
|
||||
"acme/mesh-controller@0f853e93fa11aa", // more than twelve characters of the commit
|
||||
"Novox/Mesh-Controller@0f853e93fa11", // mesh-delivery lower-cases the repository
|
||||
"acme/mesh-controller@0F853E93FA11", // a commit is lower-case hex
|
||||
"acme/mesh-controller@main", // a branch, not a commit
|
||||
"acme/mesh/controller@0f853e93fa11", // a repository is owner/name, no deeper
|
||||
"acme/mesh-controller_d2e9dc61590f", // a condition key's form of it, not the id
|
||||
"acme/mesh-controller@0f853e93fa11\nmore", // a second line
|
||||
} {
|
||||
if _, err := checkTarget(LinkDelivery, id); err == nil {
|
||||
t.Errorf("%q was taken as a delivery's id", id)
|
||||
|
||||
@@ -52,7 +52,7 @@ func transition(t *testing.T, h *harness, number int, to, why, mergedAs string,
|
||||
// transitionOn is a delivery's transition said under an event's name.
|
||||
func transitionOn(t *testing.T, h *harness, event string, number int, to, why, mergedAs string, at time.Time) {
|
||||
t.Helper()
|
||||
raw, _ := json.Marshal(map[string]any{"repository": "novox/mesh-catalog", "number": number, "to": to, "why": why,
|
||||
raw, _ := json.Marshal(map[string]any{"repository": "acme/mesh-catalog", "number": number, "to": to, "why": why,
|
||||
"merged_as": mergedAs, "at": at})
|
||||
if err := h.OnTransition(stdio.Envelope{Key: event, Body: raw}); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -38,7 +38,7 @@ func (c *fixClock) later(d time.Duration) time.Time { c.at = c.at.Add(d); return
|
||||
// delivery says one transition of a pull request as mesh-delivery says it, with what a fix's time is read by.
|
||||
func (c *fixClock) delivery(t *testing.T, number int, to, class string, opened, mergedAt *time.Time) {
|
||||
t.Helper()
|
||||
body := map[string]any{"repository": "novox/mesh-catalog", "number": number, "to": to, "at": c.at}
|
||||
body := map[string]any{"repository": "acme/mesh-catalog", "number": number, "to": to, "at": c.at}
|
||||
if mergedAt != nil {
|
||||
body["merged_as"] = "m" + strings.Repeat("a", 11)
|
||||
body["merged_at"] = *mergedAt
|
||||
|
||||
@@ -279,7 +279,7 @@ func writeEverything(t *testing.T, h *harness) []uint64 {
|
||||
if _, err := h.Set(SetAsk{Number: a, Severity: "major", Needs: "decision"}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := h.Move(MoveAsk{Number: a, Status: StatusFixing, By: "fix@node-b", FixedBy: []string{"novox/mesh-catalog#1"}}); err != nil {
|
||||
if _, err := h.Move(MoveAsk{Number: a, Status: StatusFixing, By: "fix@node-b", FixedBy: []string{"acme/mesh-catalog#1"}}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := h.Move(MoveAsk{Number: c, Status: StatusWontfix, Reason: "not ours"}); err != nil {
|
||||
|
||||
@@ -67,7 +67,7 @@ func TestTheFrontmatterOfRealReportsIsReadAsWritten(t *testing.T) {
|
||||
Number: 236, Status: StatusResolved, Opened: "2026-10-04",
|
||||
Title: "The catalogue check passes a manifest the host refuses",
|
||||
LocatedIn: []string{"mesh-controller cmd/mesh-controller (the merge gate)"},
|
||||
FixedBy: []string{"novox/mesh-controller PR #96 (bbd442c, the merge gate, ADR 0237)"},
|
||||
FixedBy: []string{"acme/mesh-controller PR #96 (bbd442c, the merge gate, ADR 0237)"},
|
||||
Replay: "R236",
|
||||
}},
|
||||
{"345-a-reminder-window-shows-transparent-and-empty", Report{
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
status: resolved
|
||||
opened: 2026-10-04
|
||||
located-in: [mesh-controller cmd/mesh-controller (the merge gate)]
|
||||
fixed-by: novox/mesh-controller PR #96 (bbd442c, the merge gate, ADR 0237)
|
||||
fixed-by: acme/mesh-controller PR #96 (bbd442c, the merge gate, ADR 0237)
|
||||
replay: R236
|
||||
amended-design:
|
||||
---
|
||||
|
||||
@@ -487,7 +487,7 @@ func TestLinksAreTypedAddedOnceAndRemoved(t *testing.T) {
|
||||
{Kind: LinkDecision, Target: "0275"},
|
||||
{Kind: LinkDesign, Target: "03-DESIGN/01-to-be/53-the-issue-tracker.md"},
|
||||
{Kind: LinkCondition, Target: "mesh.hand-acts.backup.healer-wanted"},
|
||||
{Kind: LinkDelivery, Target: "novox/mesh-controller@0f853e93fa11"},
|
||||
{Kind: LinkDelivery, Target: "acme/mesh-controller@0f853e93fa11"},
|
||||
}
|
||||
for _, l := range good {
|
||||
l.Number = a
|
||||
|
||||
@@ -465,14 +465,14 @@ func TestAnIssueIsReadyOnlyWhenWhatItDependsOnIsDelivered(t *testing.T) {
|
||||
}
|
||||
return Delivery{State: "ready"}, nil
|
||||
}
|
||||
resolve(t, h, dep, "novox/mesh-catalog#9", "a commit abc123")
|
||||
resolve(t, h, dep, "acme/mesh-catalog#9", "a commit abc123")
|
||||
if err := h.OnMoved(stdio.Envelope{Body: json.RawMessage(`{"number":365,"to":"resolved"}`)}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if asked != 1 || ready(h, w) {
|
||||
t.Fatalf("ready before its fix is delivered (asked %d)", asked)
|
||||
}
|
||||
tr := stdio.Envelope{Key: "mesh-delivery-gate.transition", Body: json.RawMessage(`{"repository":"novox/mesh-catalog","number":9,"to":"delivered"}`)}
|
||||
tr := stdio.Envelope{Key: "mesh-delivery-gate.transition", Body: json.RawMessage(`{"repository":"acme/mesh-catalog","number":9,"to":"delivered"}`)}
|
||||
for i := 0; i < 2; i++ {
|
||||
if err := h.OnTransition(tr); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -764,14 +764,14 @@ func TestReadyIsSaidOnceFollowsDuplicatesAndAskingFailsLoudly(t *testing.T) {
|
||||
_, _ = h.Link(LinkAsk{Number: w, Kind: LinkDependsOn, Target: keyOf(b)})
|
||||
h.Deliveries = func(string, string) (Delivery, error) { return Delivery{State: "published"}, nil }
|
||||
resolve(t, h, a, "Mesh-Catalog#9")
|
||||
resolve(t, h, b, "https://forge.example/novox/mesh-catalog/pulls/9")
|
||||
resolve(t, h, b, "https://forge.example/acme/mesh-catalog/pulls/9")
|
||||
if got := pullRequests(get(t, h, a)); !reflect.DeepEqual(got, []string{"mesh-catalog#9"}) {
|
||||
t.Fatalf("%v", got)
|
||||
}
|
||||
if got := pullRequests(get(t, h, b)); !reflect.DeepEqual(got, []string{"mesh-catalog#9"}) {
|
||||
t.Fatalf("%v", got)
|
||||
}
|
||||
tr := stdio.Envelope{Body: json.RawMessage(`{"repository":"novox/mesh-catalog","number":9,"to":"delivered"}`)}
|
||||
tr := stdio.Envelope{Body: json.RawMessage(`{"repository":"acme/mesh-catalog","number":9,"to":"delivered"}`)}
|
||||
if err := h.OnTransition(tr); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ func stand(h *Holder, c *clock) {
|
||||
|
||||
// bound is what an option of the held delivery's ask binds: the asker's act, digested.
|
||||
func bound(verb string) string {
|
||||
d, err := asks.ActDigest(asks.Act{"verb": "mesh-delivery." + verb, "id": "novox/hq@0555"})
|
||||
d, err := asks.ActDigest(asks.Act{"verb": "mesh-delivery." + verb, "id": "acme/hq@0555"})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -2028,7 +2028,7 @@
|
||||
"id": "mesh-catalog.f2b51686",
|
||||
"scope": "merge"
|
||||
},
|
||||
"summary": "novox/mesh-catalog merged into main (f2b51686) was never handed to the controller by the bus; acted on late by the catch-up"
|
||||
"summary": "acme/mesh-catalog merged into main (f2b51686) was never handed to the controller by the bus; acted on late by the catch-up"
|
||||
},
|
||||
{
|
||||
"at": "2026-10-06T08:45:20.201790819Z",
|
||||
@@ -2051,7 +2051,7 @@
|
||||
"id": "mesh-catalog.f2b51686",
|
||||
"scope": "merge"
|
||||
},
|
||||
"summary": "novox/mesh-catalog merged into main (f2b51686) was never handed to the controller by the bus; acted on late by the catch-up",
|
||||
"summary": "acme/mesh-catalog merged into main (f2b51686) was never handed to the controller by the bus; acted on late by the catch-up",
|
||||
"why": "S5 no longer observes it"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
// its message names that issue (novox/hq issue 475). The key is the real one `mesh-controller.status` named; the
|
||||
// event is decoded as the controller says it, so the key travels as it does on the bus.
|
||||
func TestADeliverysConditionWithASlashInItsKeyNamesTheIssueThatTracksIt(t *testing.T) {
|
||||
const key = "delivery.novox/mesh-controller_d2e9dc61590f.stalled"
|
||||
const key = "delivery.acme/mesh-controller_d2e9dc61590f.stalled"
|
||||
h, tg, _, c, _ := newHolder(t)
|
||||
h.Ask = func(address string, body any) (json.RawMessage, error) {
|
||||
if address != TrackingVerb {
|
||||
@@ -19,7 +19,7 @@ func TestADeliverysConditionWithASlashInItsKeyNamesTheIssueThatTracksIt(t *testi
|
||||
return json.RawMessage(`{"conditions":{"` + key + `":[{"number":475,"status":"open"}]}}`), nil
|
||||
}
|
||||
k, err := DecodeCondition(EventRaised, []byte(`{"key":"`+key+`","kind":"stalled","severity":"urgent",`+
|
||||
`"subject":{"scope":"delivery","id":"novox/mesh-controller_d2e9dc61590f"},`+
|
||||
`"subject":{"scope":"delivery","id":"acme/mesh-controller_d2e9dc61590f"},`+
|
||||
`"headline":"Delivery of mesh-controller stalled",`+
|
||||
`"explanation":"Needs you: let the walk go or drop it. The delivery of mesh-controller waits for a walk that never starts.",`+
|
||||
`"needs":"let the walk go or drop it.","summary":"the delivery of mesh-controller waits for its walk"}`))
|
||||
|
||||
@@ -29,11 +29,11 @@ type example struct {
|
||||
openFor time.Duration
|
||||
}
|
||||
|
||||
const waitingSummary = "the walk of novox/mesh-catalog a6385479 has waited 56m0s for mesh-delivery's word to start: " +
|
||||
const waitingSummary = "the walk of acme/mesh-catalog a6385479 has waited 56m0s for mesh-delivery's word to start: " +
|
||||
"`mesh-delivery.show` for the delivery that landed as a6385479 says why; `plans go " +
|
||||
"plan-1791454185265004861 --why …` starts it by hand"
|
||||
|
||||
const waitingBefore = "CLEARED after 26 min: the walk of novox/mesh-catalog a6385479 has waited 56m0s for " +
|
||||
const waitingBefore = "CLEARED after 26 min: the walk of acme/mesh-catalog a6385479 has waited 56m0s for " +
|
||||
"mesh-delivery's word to start: `mesh-delivery.show` for the delivery that landed as a6385479 says why; `plans go " +
|
||||
"plan-1791454185265004861 --why ...` starts it by hand\nabout: plan plan-1791454185265004861 (waiting)\n" +
|
||||
"since: 2026-10-08 10:40 UTC\nkey: plan.plan-1791454185265004861.waiting\nmore: conditions show " +
|
||||
@@ -123,14 +123,14 @@ var examples = []example{{
|
||||
resolved: "Resolved: no more hand repairs of push", popup: false, openFor: 3 * 24 * time.Hour,
|
||||
}, {
|
||||
name: "a delivery held",
|
||||
before: "WARNING: the delivery novox/hq@055550802096 has been held for 36h2m6s, past its bound of 24h0m0s (it " +
|
||||
before: "WARNING: the delivery acme/hq@055550802096 has been held for 36h2m6s, past its bound of 24h0m0s (it " +
|
||||
"waits for the operator): healer H2 may none: the state is the operator's — `mesh-delivery.show " +
|
||||
"novox/hq@055550802096`\nabout: delivery novox/hq@055550802096 (stalled)\nsince: 2026-10-07 00:38 UTC\n" +
|
||||
"key: delivery.novox/hq_055550802096.stalled\nmore: conditions show delivery.novox/hq_055550802096.stalled",
|
||||
key: "delivery.novox/hq_055550802096.stalled", kind: "stalled", severity: Warning,
|
||||
subject: map[string]string{"scope": "delivery", "id": "novox/hq@055550802096"},
|
||||
summary: "the delivery novox/hq@055550802096 has been held for 36h2m6s, past its bound of 24h0m0s (it waits for " +
|
||||
"the operator): healer H2 may none: the state is the operator's — `mesh-delivery.show novox/hq@055550802096`",
|
||||
"acme/hq@055550802096`\nabout: delivery acme/hq@055550802096 (stalled)\nsince: 2026-10-07 00:38 UTC\n" +
|
||||
"key: delivery.acme/hq_055550802096.stalled\nmore: conditions show delivery.acme/hq_055550802096.stalled",
|
||||
key: "delivery.acme/hq_055550802096.stalled", kind: "stalled", severity: Warning,
|
||||
subject: map[string]string{"scope": "delivery", "id": "acme/hq@055550802096"},
|
||||
summary: "the delivery acme/hq@055550802096 has been held for 36h2m6s, past its bound of 24h0m0s (it waits for " +
|
||||
"the operator): healer H2 may none: the state is the operator's — `mesh-delivery.show acme/hq@055550802096`",
|
||||
headline: "Delivery of hq held for 36 hours", needs: "release it, or stop it.",
|
||||
explanation: "Needs you: release it, or stop it. A delivery of hq has been held for 36 hours, past its limit.",
|
||||
resolved: "Delivery of hq is no longer held", popup: true,
|
||||
|
||||
@@ -46,7 +46,7 @@ func aRepository(t *testing.T) string {
|
||||
|
||||
func TestAPhraseInOneDesignDocumentComesBackFromWhereItIsWritten(t *testing.T) {
|
||||
origin := aRepository(t)
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://forge.invalid:3000", Repository: "novox/hq", URL: origin}
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://forge.invalid:3000", Repository: "acme/hq", URL: origin}
|
||||
r.Sync()
|
||||
found, err := r.Search("never look alike", 0)
|
||||
if err != nil || len(found.Hits) != 1 || found.Hits[0].Path != "03-DESIGN/07-knowledge.md" || found.Hits[0].Heading != "The stores" {
|
||||
@@ -89,7 +89,7 @@ func TestAPhraseInOneDesignDocumentComesBackFromWhereItIsWritten(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAPathOutsideTheRepositoryAndAnEmptySearchAreRefused(t *testing.T) {
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://forge.invalid:3000", Repository: "novox/hq"}
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://forge.invalid:3000", Repository: "acme/hq"}
|
||||
for _, p := range []string{"../etc/passwd", "/etc/passwd", "a/../../b"} {
|
||||
if _, err := r.Read(p); err == nil || !strings.Contains(err.Error(), "not a path inside") {
|
||||
t.Errorf("%s: %v", p, err)
|
||||
@@ -98,13 +98,13 @@ func TestAPathOutsideTheRepositoryAndAnEmptySearchAreRefused(t *testing.T) {
|
||||
if _, err := r.Search(" ", 0); err == nil || !strings.Contains(err.Error(), "empty one") {
|
||||
t.Errorf("an empty search: %v", err)
|
||||
}
|
||||
if r.CloneURL() != "http://forge.invalid:3000/novox/hq.git" {
|
||||
if r.CloneURL() != "http://forge.invalid:3000/acme/hq.git" {
|
||||
t.Error(r.CloneURL())
|
||||
}
|
||||
}
|
||||
|
||||
func TestAFailedSyncLeavesTheCheckoutStandingAndSaysWhy(t *testing.T) {
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://127.0.0.1:1", Repository: "novox/hq"}
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://127.0.0.1:1", Repository: "acme/hq"}
|
||||
r.Sync()
|
||||
if s := r.Standing(); s.Commit != "" || s.LastError == "" {
|
||||
t.Fatalf("%+v", s)
|
||||
@@ -118,7 +118,7 @@ func TestTheOldLayoutIsClearedAndTheCheckoutLivesInItsOwnDirectory(t *testing.T)
|
||||
base := t.TempDir()
|
||||
write(t, filepath.Join(base, "README.md"), "an old checkout's file")
|
||||
_ = os.MkdirAll(filepath.Join(base, ".git"), 0o755)
|
||||
r := &Records{Base: base, Origin: "http://forge.invalid:3000", Repository: "novox/hq", URL: origin}
|
||||
r := &Records{Base: base, Origin: "http://forge.invalid:3000", Repository: "acme/hq", URL: origin}
|
||||
r.Sync()
|
||||
if _, err := os.Stat(filepath.Join(base, "README.md")); err == nil {
|
||||
t.Error("the old layout's file was left")
|
||||
@@ -140,9 +140,9 @@ func TestTheReaderRefusesToGuess(t *testing.T) {
|
||||
if _, err := FromEnv(func(k string) string { return env[k] }); err == nil || !strings.Contains(err.Error(), "none is set") {
|
||||
t.Fatalf("a module with no repository set guessed one: %v", err)
|
||||
}
|
||||
write(t, filepath.Join(dir, "config.json"), `{"repository": "novox/hq"}`)
|
||||
write(t, filepath.Join(dir, "config.json"), `{"repository": "acme/hq"}`)
|
||||
r, err := FromEnv(func(k string) string { return env[k] })
|
||||
if err != nil || r.Repository != "novox/hq" || r.Origin != "http://forge.invalid:3000" {
|
||||
if err != nil || r.Repository != "acme/hq" || r.Origin != "http://forge.invalid:3000" {
|
||||
t.Fatalf("%+v %v", r, err)
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ func TestRecordsDecisionsNamesTheKnowledgeBaseAndReadsNothingOfHq(t *testing.T)
|
||||
write(t, filepath.Join(origin, "02-DECISIONS/0001-a-decision.md"), "---\ntopic: the mesh\nstatus: accepted\n---\n\n# 1. A decision\n")
|
||||
run(t, origin, "add", "-A")
|
||||
run(t, origin, "commit", "--quiet", "-m", "records")
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://forge.invalid:3000", Repository: "novox/hq", URL: origin}
|
||||
r := &Records{Base: t.TempDir(), Origin: "http://forge.invalid:3000", Repository: "acme/hq", URL: origin}
|
||||
r.Sync()
|
||||
var decisions *stdio.Tool
|
||||
for _, tool := range tools(r) {
|
||||
|
||||
Reference in New Issue
Block a user