C6: a source-only check's step-ended is heard on its escaped subject part

The manifest validator takes no # in consumes, and a key part escapes its
dots (mesh-sdk keys.EscapeName), so the forge module keeps hearing
step-ended.*.*.*: a source-only check's module source.<owner>.<name> is one
escaped subject part, and its body names it whole. The whole test says it so.

Builds: design 47 H2 §815; H-A-408
This commit is contained in:
2026-11-22 01:07:28 +01:00
parent bff5e98b30
commit a6132b32f6
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -460,9 +460,9 @@ if (gitea) {
await failedSteps.lost(heldHeads.replace(read.names, read.branches, read.pulls));
};
// The runner's step-ended is said on step-ended.<module>.<branch>.<commit> (the seat's definition); a source-only
// check's names the registration's key source.<owner>.<name> as its module (design 47 H2 §815, H-A-408), so every
// subject under step-ended is heard.
const stepEnded = `${RUNNER}.${RUNNER_EVENTS.stepEnded}.#`;
// check's module is the registration's key source.<owner>.<name> (design 47 H2 §815, H-A-408), one subject part as
// a key part escapes it (mesh-sdk keys.EscapeName), and its body names it whole.
const stepEnded = `${RUNNER}.${RUNNER_EVENTS.stepEnded}.*.*.*`;
void bindUntilHeld(stepEnded, () => on<StepEndedEvent>(stepEnded, (event) => failedSteps.stepEnded(event.body)));
// A branch's head is read from the forge, never taken from the event (the seat's definition of branch-moved).
void bindUntilHeld(`${GIT}.${GIT_EVENTS.branchMoved}`, () => on<BranchMovedEvent>(`${GIT}.${GIT_EVENTS.branchMoved}`, async (event) => {
@@ -462,7 +462,7 @@ func TestTheSeatGitWholeOverARealBus(t *testing.T) {
until(t, "the watched heads read after the registrations", func() bool { return f.asked("GET /api/v1/repos/novox/app/branches") })
// A failed required step at a head's fingerprint refuses that head (§735, test 114), heard on the module's consumer.
until(t, "the runner's step-ended followed", func() bool { return rt.subscribed("mesh-pipeline-runner.step-ended.#") })
until(t, "the runner's step-ended followed", func() bool { return rt.subscribed("mesh-pipeline-runner.step-ended.*.*.*") })
rt.ask("mesh/event", map[string]any{"envelope": map[string]any{"key": "mesh-pipeline-runner.step-ended.app.main." + X, "node": "test",
"body": map[string]any{"v": 1, "pipeline": "main.4", "module": "app", "branch": "main", "commit": X, "fingerprint": "fp-x",
"at": "2026-11-20T03:00:00Z", "result": map[string]any{"step": "unit", "status": "required", "outcome": "failed"}}}})
@@ -478,8 +478,8 @@ func TestTheSeatGitWholeOverARealBus(t *testing.T) {
// An hq pull request whose Go checks fail is refused by merge-pull naming the failed step (H2 §815): the runner's
// step-ended of a source-only check names the registration's key as its module and the commit's root tree hash as its
// fingerprint (H-A-408), judged as a module's.
rt.ask("mesh/event", map[string]any{"envelope": map[string]any{"key": "mesh-pipeline-runner.step-ended.source.novox.hq.main." + H, "node": "test",
// fingerprint (H-A-408), escaped as one part of its subject, judged as a module's.
rt.ask("mesh/event", map[string]any{"envelope": map[string]any{"key": "mesh-pipeline-runner.step-ended.source=2enovox=2ehq.main." + H, "node": "test",
"body": map[string]any{"v": 1, "pipeline": "main.5", "module": "source.novox.hq", "branch": "main", "commit": H, "fingerprint": strings.Repeat("7", 40),
"at": "2026-11-22T01:00:00Z", "result": map[string]any{"step": "unit", "status": "required", "outcome": "failed"}}}})
hq := rt.mergePull(map[string]any{"repository": "novox/hq", "number": 11, "head": H})
+1 -1
View File
@@ -683,7 +683,7 @@
"consumes": [
"mesh-catalog.catalog-revision",
"mesh-catalog.registration-changed",
"mesh-pipeline-runner.step-ended.#",
"mesh-pipeline-runner.step-ended.*.*.*",
"git.branch-moved",
"git.pull-updated",
"git.pull-closed",