morgana: row 277 (#1782) r4: a thread.claims error with no bus code still throws and prints nothing (duckworth-0123 N1, M9); BUILD.md records the rebase onto 0165be266 and N2/N3
This commit is contained in:
@@ -244,3 +244,24 @@ the fix is r2 of the build. On r2, thread-claims 5/5, cli tester 9/9, other-tree
|
||||
|
||||
Manifest adds packages/cli/README.md (10 paths). Nothing here has run yet. It runs whole after the
|
||||
rebase onto 194, on Sage's CLEAR.
|
||||
|
||||
## r4: rebase onto 0165be266 and Duckworth's delta notes (sage-2587, duckworth-0123)
|
||||
|
||||
- **Rebase.** Commits 1-6 are cherry-picked onto refactor 0165be266, which has 194, 236 and 274
|
||||
landed, on morgana/row277-0165. The range-diff is `=` for all six and the patch-ids are unchanged.
|
||||
Four files auto-merged around upstream lines: bus README, broker.mjs, cli README and cli.mjs.
|
||||
- **N1 (duckworth-0123).** The N1 catch's rethrow branch had no test, so a mutant that takes every
|
||||
error as a refusal (it would print `refused undefined`) survived. A new cli tester.test.mjs test
|
||||
throws from thread.claims with no code, then with `ECONNRESET`. Each rejects main with the same
|
||||
error and prints nothing. M9 (the code check dropped) is killed by that test.
|
||||
- **N2 (duckworth-0123), accepted.** Since 274, the owner's and a reader's thread.claims can include
|
||||
user threads (id, instance, holder run, harness, time; no name, no messages). That is the design
|
||||
join approved in duckworth-0118, with no owner filter, and owner-visible run governance under
|
||||
sage-1368 B1.
|
||||
- **N3 (duckworth-0123), for later.** When 264a and 277 meet, thread.claims's latest row per thread
|
||||
goes per session, and thread-claims.test.mjs needs the default session. It is checked in whichever
|
||||
round lands second.
|
||||
|
||||
Gate (sage-2590): the touched test files plus user-principal, other-tree and host whole; the bus,
|
||||
cli, harness, business and seat suites; every scripts/test-*.sh; M1-M9. The kit prints HEAD and the
|
||||
manifest check first. Nothing runs before Sage's CLEAR.
|
||||
|
||||
@@ -160,6 +160,23 @@ test("a refused thread.claims still prints the role rows and the refusal's code"
|
||||
assert.deepEqual(s.calls.human.map((c) => c.verb), ["agents"]);
|
||||
});
|
||||
|
||||
// Row 277 r4 (duckworth-0123 N1): an error with no bus code is not a refusal, so it still throws and
|
||||
// nothing prints: no code at all, and a code that isn't the bus's shape.
|
||||
test("a thread.claims error without a bus code still throws and prints nothing", async (t) => {
|
||||
const s = setup(t);
|
||||
for (const code of [undefined, "ECONNRESET"]) {
|
||||
const error = new Error("socket closed");
|
||||
if (code !== undefined) error.code = code;
|
||||
const failing = (business) => async (verb, args) => {
|
||||
if (verb !== "thread.claims") return s.deps.transport(business)(verb, args);
|
||||
throw error;
|
||||
};
|
||||
const x = io();
|
||||
await assert.rejects(main(["agents", "--business", "demo"], x, { ...s.deps, transport: failing }), (e) => e === error, String(code));
|
||||
assert.equal(x.out.text, "", String(code));
|
||||
}
|
||||
});
|
||||
|
||||
// Row 170 (#1667): the bus refuses a tester's message to a stopped role and stores nothing, and
|
||||
// talk says so and exits 3.
|
||||
test("talk --tester to a stopped role exits 3, prints no sent line and stores nothing", async (t) => {
|
||||
|
||||
Reference in New Issue
Block a user