gitea: merge-pull merges plainly only from a watched-branches view read since the last change
An unread or stale view held no entry for a watched repository, so every
member would have merged plainly with the note no delivery: a merge that
reports success and delivers nothing. The registrations holder now keeps
the time of its last read and of the last registration-changed heard; the
merge call refuses every member ("the watched branches are not read yet")
while the view is not read since that change, and a read that fails is
said and asked again with the module's growing wait until it answers.
Builds: design 47 H2 H-A-471 (second addendum); review finding H-A-471 addendum (2)
This commit is contained in:
@@ -570,7 +570,10 @@ test("the first registrations are learned from the seat mesh-catalog's verb at t
|
||||
const held = reg(JSON.stringify({ registrations: [{ module: "mesh-sdk" }] }));
|
||||
await held.start();
|
||||
assert.equal(held.written, true, "a registration held at the start");
|
||||
const down = reg(new Error("no responders"));
|
||||
// A failed first view is said and asked again (H-A-471, second addendum): the test's wait answers it with none.
|
||||
let downAnswer: unknown = new Error("no responders");
|
||||
const down = new Registrations(async () => { if (downAnswer instanceof Error) throw downAnswer; return downAnswer; }, (l) => said.push(l),
|
||||
async () => { downAnswer = { registrations: [] }; });
|
||||
await down.start();
|
||||
assert.equal(down.written, false);
|
||||
assert.match(said.join("\n"), /could not be read: no responders/, "a failed first view is said, never taken as none silently");
|
||||
|
||||
Reference in New Issue
Block a user