row 264a r12 (#1769): sessions.test T2's refused() keeps every table but events equal and pins one action.refused {code: not-holder} event per refused call in call order; the old every-table check could never pass since request()'s catch (broker.mjs:4242) writes the refusal through #refused; BUILD.md records Mos's reading of sage-2257; test only (mos-1277, sage-2676)

This commit is contained in:
jason.woltje committed 2026-10-22 08:21:41 -05:00
1 parent 75f049ed23
commit 93f4af12bc
2 files changed
+42 -5

No files matched your search

+22
View File
@@ -417,6 +417,28 @@ range-diff gives all 16 `=`. The r9 run never started (sage-2665), so no result
the table used. 3x is 1773 s, so the cli limit goes from 1650 s to 1800 s. Its other times (bus 23 s,
each scripts/test-*.sh at most 36 s) are under the table's, and those limits stand.
### Correction: the r11 red, T2 (mos-1277, sage-2676)
The r11 gate (75f049ed2, ffc49615, CLEAR sage-2674) went red in its first phase at sessions.test T2
"a released or revoked run's retired generation", :204: the events table had 10 rows before the
three refused calls and 13 after. Every other table's count was equal. request()'s catch
(broker.mjs:4242) sends each refusal through `#refused` (:4081-:4096), which writes one
`action.refused` event with body `{code}`. r2's base dcd8d4dda has the same catch, so the
assertion that every table's row count stays the same (round 2, item 1 above) could never pass.
Sage reproduced it at 72fc5a330, ed6773f72 and 75f049ed2, and the three rows are
`action.refused {"code":"not-holder"}`. Mos ruled it a test defect, not a product fault.
Mos's reading of sage-2257: "writes nothing" means a retired generation's approval, delivery and
read write no approval, delivery, read or claim state. The refusal trail stays. Commit 19 (test
only) makes `refused()` say that, for both calls (released and revoked):
- every table's row count stays equal except events;
- each refused call adds exactly one event, kind `action.refused` with body `{"code":"not-holder"}`,
checked after each call in call order (withdraw, receive, read), so events grows by three.
Before the next gate, one survey pass runs the touched files the r10 and r11 runs never reached
(sage-2676 step 3), with M1 against the fixed T2.
### Run limits (sage-2634, sage-2637, sage-2647, mos-1275)
Every run in run-264 goes through `timeout -k 10 LIMIT`, so a hang stops the run instead of holding
+20 -5
View File
@@ -196,12 +196,27 @@ test('T2 sage-2257: a released or revoked run\'s retired generation refuses its
call('human', 'thread.send', { thread: A, body: `waiting after ${name}` });
return { d, taken };
};
// Each refusal leaves its one action.refused event (request()'s catch, #refused); nothing else is
// written: no approval, delivery, read or claim state (mos-1277).
const lastSeq = () => store.get('SELECT max(seq) AS s FROM events').s;
const refusedOnce = (fn, label) => {
const from = lastSeq();
assert.throws(fn, { code: 'not-holder' }, label);
const added = store.all('SELECT kind, body FROM events WHERE seq > ? ORDER BY seq', from);
assert.deepEqual(
added.map((e) => [e.kind, JSON.parse(e.body)]),
[['action.refused', { code: 'not-holder' }]],
label,
);
};
const refused = (name, { d, taken }) => {
const before = counts();
assert.throws(() => call(name, 'decision.withdraw', { id: d.id }), { code: 'not-holder' }, 'approval');
assert.throws(() => call(name, 'message.receive'), { code: 'not-holder' }, 'delivery');
assert.throws(() => call(name, 'message.read', { id: taken.id }), { code: 'not-holder' }, 'read');
assert.deepEqual(counts(), before);
const { events, ...before } = counts();
refusedOnce(() => call(name, 'decision.withdraw', { id: d.id }), 'approval');
refusedOnce(() => call(name, 'message.receive'), 'delivery');
refusedOnce(() => call(name, 'message.read', { id: taken.id }), 'read');
const { events: after, ...rest } = counts();
assert.deepEqual(rest, before);
assert.equal(after, events + 3);
};
// Released: generation 1 is retired once a2 claims generation 2.
const one = prepare('a1');