GATE: the gate's manifest consumes the seat git's events with the hyphens the seat gives them
Builds: design 47 G §396, §310 (G-9: the seat git's events take hyphens) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -578,7 +578,7 @@ func TestAPassingVerdictAsksTheApproveAndItsApproveMergesWithinSecondsOverARealB
|
||||
announced := pr("novox/app", 7, head, "fix/x", "src/a.go")
|
||||
announced.BaseSHA = "a1a1a1a1a1a1"
|
||||
announced.Title = "Fix the apostrophe (issue 975)"
|
||||
b.publish(t, "mesh.seat.git.event.pull.updated", seatUpdated(announced))
|
||||
b.publish(t, "mesh.seat.git.event.pull-updated", seatUpdated(announced))
|
||||
rt.until("the pull request's key to hold its head", eventWithin, func() bool {
|
||||
e, err := b.kvs["pulls"].Get(ctx, "novox.app.7")
|
||||
var k PullKey
|
||||
@@ -637,7 +637,7 @@ func TestAPassingVerdictAsksTheApproveAndItsApproveMergesWithinSecondsOverARealB
|
||||
b.forgeSays(t, forgemsg.Forge{Kind: forgemsg.ForgeMerged, Repository: "novox/app", Number: 7, Head: head, Merge: strings.Repeat("b", 40),
|
||||
Root: "r", Trees: map[string]string{"app": "t"}})
|
||||
// The forge's own word that the pull request merged follows the bridge's (its webhook): the delivery ends merged.
|
||||
b.publish(t, "mesh.seat.git.event.pull.merged", seatMerged(merged("novox/app", 7, head, strings.Repeat("b", 40))))
|
||||
b.publish(t, "mesh.seat.git.event.pull-merged", seatMerged(merged("novox/app", 7, head, strings.Repeat("b", 40))))
|
||||
rt.until("source.main to hold the merge", eventWithin, func() bool {
|
||||
e, err := b.kvs["source"].Get(ctx, mdc.SourceKey(MergeBranch))
|
||||
if err != nil {
|
||||
@@ -820,7 +820,7 @@ func TestAGroupOfTwoWithGreenChecksGetsOneAskAndOnItsApproveBothMergeOneAfterThe
|
||||
for _, p := range []PullEvent{pr("novox/mesh-controller", 1, ctlHead, "feat/x", "internal/a.go"),
|
||||
pr("novox/mesh-catalog", 2, catHead, "feat/x", "modules/app/module.json")} {
|
||||
p.BaseSHA = "a1a1a1a1a1a1"
|
||||
b.publish(t, "mesh.seat.git.event.pull.updated", seatUpdated(p))
|
||||
b.publish(t, "mesh.seat.git.event.pull-updated", seatUpdated(p))
|
||||
}
|
||||
// Both members pass at the checker, whose one verdict covers both heads: the group is asked once, no composed check is asked
|
||||
// of the controller (issue 1318).
|
||||
@@ -877,8 +877,8 @@ func TestAGroupOfTwoWithGreenChecksGetsOneAskAndOnItsApproveBothMergeOneAfterThe
|
||||
// The forge's own word that each pull request merged follows the bridge's (its webhook), after the second was handed (the
|
||||
// checker judges the members still open by the trunk the first merge moved, which this test does not play): both members
|
||||
// end merged, the group with them, and the controller was never called (R6-C3).
|
||||
b.publish(t, "mesh.seat.git.event.pull.merged", seatMerged(merged(one.Repository, one.Number, one.Head.Head, strings.Repeat("a", 40))))
|
||||
b.publish(t, "mesh.seat.git.event.pull.merged", seatMerged(merged(two.Repository, two.Number, two.Head.Head, strings.Repeat("b", 40))))
|
||||
b.publish(t, "mesh.seat.git.event.pull-merged", seatMerged(merged(one.Repository, one.Number, one.Head.Head, strings.Repeat("a", 40))))
|
||||
b.publish(t, "mesh.seat.git.event.pull-merged", seatMerged(merged(two.Repository, two.Number, two.Head.Head, strings.Repeat("b", 40))))
|
||||
for _, id := range []string{IDOf("novox/mesh-controller", ctlHead), IDOf("novox/mesh-catalog", catHead)} {
|
||||
id := id
|
||||
rt.until(id+" to be merged", eventWithin, func() bool {
|
||||
|
||||
@@ -54,7 +54,7 @@ func (b *testBus) checkPasses(t *testing.T, rt *runtime, group, trunk string, pu
|
||||
Required: []string{ctxCheck}, Statuses: []string{ctxCheck}, Checks: map[string]HeadCheck{ctxCheck: {State: "success", Description: line}}})
|
||||
}
|
||||
rt.mu.Unlock()
|
||||
b.publish(t, "mesh.seat.git.event.forge.status", gitseat.ForgeStatusEvent{Repository: owner + "/" + repo, Commit: p.head,
|
||||
b.publish(t, "mesh.seat.git.event.forge-status", gitseat.ForgeStatusEvent{Repository: owner + "/" + repo, Commit: p.head,
|
||||
Context: ctxCheck, State: "success", Description: line})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,10 +122,10 @@ func TestItClaimsTheDeliverySeatAndFollowsWhatItHandles(t *testing.T) {
|
||||
if !reflect.DeepEqual(m.Emits, []string{"transition", "group", "merged"}) {
|
||||
t.Fatalf("emits %v", m.Emits)
|
||||
}
|
||||
// Eight buckets, and no `asked` (the teller asks, ADR 0437 §6): ADR 0450 §3 and the conditions it raised (issue 1275). No
|
||||
// Four buckets still in the old `state`, the four of the template `state` moved to `requires` (design 47 G §613), and no `asked` (the teller asks, ADR 0437 §6): ADR 0450 §3 and the conditions it raised (issue 1275). No
|
||||
// `turns`, no turn tool and no `check-gates-merge`: no check gates a merge (novox/hq ADR 0661 §1, §2, §6).
|
||||
buckets := m.buckets()
|
||||
if !reflect.DeepEqual(buckets, []string{"deliveries", "groups", "pulls", "asks", "merges", "owed", "source", "conditions"}) {
|
||||
if !reflect.DeepEqual(buckets, []string{"pulls", "asks", "merges", "source"}) {
|
||||
t.Fatalf("state %v", buckets)
|
||||
}
|
||||
for _, tool := range m.Tools {
|
||||
|
||||
@@ -39,7 +39,7 @@ func TestADeliveryOnMeshCheckGoesReadyAskedAndMergedOverARealBus(t *testing.T) {
|
||||
Statuses: []string{}, Checks: map[string]HeadCheck{}}}
|
||||
rt.mu.Unlock()
|
||||
announced := pr("novox/app", 8, head, "fix/y", "src/b.go")
|
||||
b.publish(t, "mesh.seat.git.event.pull.updated", seatUpdated(announced))
|
||||
b.publish(t, "mesh.seat.git.event.pull-updated", seatUpdated(announced))
|
||||
|
||||
// The checker's verdict at the head, then the forge's word that its bridge set mesh/check.
|
||||
hash, err := mdc.HeadsHash([]mdc.Head{{Repository: "novox/app", Number: 8, Head: head}})
|
||||
@@ -56,7 +56,7 @@ func TestADeliveryOnMeshCheckGoesReadyAskedAndMergedOverARealBus(t *testing.T) {
|
||||
rt.openPulls[0].Statuses = []string{ctxCheck}
|
||||
rt.openPulls[0].Checks = map[string]HeadCheck{ctxCheck: {State: "success", Description: line}}
|
||||
rt.mu.Unlock()
|
||||
set := b.publish(t, "mesh.seat.git.event.forge.status", gitseat.ForgeStatusEvent{Repository: "novox/app", Commit: head,
|
||||
set := b.publish(t, "mesh.seat.git.event.forge-status", gitseat.ForgeStatusEvent{Repository: "novox/app", Commit: head,
|
||||
Context: ctxCheck, State: "success", Description: line})
|
||||
|
||||
var key string
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
}
|
||||
],
|
||||
"consumes": [
|
||||
"git.pull.updated",
|
||||
"git.pull.merged",
|
||||
"git.pull.closed",
|
||||
"git.forge.pull",
|
||||
"git.forge.status",
|
||||
"git.repo.writable",
|
||||
"git.pull-updated",
|
||||
"git.pull-merged",
|
||||
"git.pull-closed",
|
||||
"git.forge-pull",
|
||||
"git.forge-status",
|
||||
"git.repo-writable",
|
||||
"mesh-delivery-forge-bridge.forge.**",
|
||||
"mesh-delivery-forge-bridge.owed.ended",
|
||||
"mesh-delivery-teller.answered",
|
||||
|
||||
Reference in New Issue
Block a user