S3 away: read a holder's answer of the kind away as a transport fault
A holder answers error-kind away, with part and words, when a part it depends on is away; the kept call reads it from the answer and calls again at the pace. Go: busretry.ErrorKindAway, AwayAnswer, AwayIn, Away; TypeScript: ERROR_KIND_AWAY, awayAnswer, awayIn. Builds: design 47 H2 §776, §775; H-A-349 DQ-15, H-A-350 DMC-2, H-A-354
This commit is contained in:
+6
-1
@@ -670,7 +670,7 @@ test("the provider loop is named for what it is, and its old name stays an alias
|
||||
await newTest6(); // a TypeScript bundle's value over one call's limit fails at once, namin
|
||||
});
|
||||
|
||||
import { allows, refusal, parseCallers, parseVerbCallers, parseConfiguredVerbCallers, readDefinitionCallers, moduleOf, UNPROVEN, runAs, askIdOf, META_ASK } from "../dist/callers/index.js";
|
||||
import { allows, refusal, parseCallers, parseVerbCallers, parseConfiguredVerbCallers, readDefinitionCallers, moduleOf, UNPROVEN, runAs, askIdOf, META_ASK, awayAnswer, awayIn } from "../dist/callers/index.js";
|
||||
import { Follower, statusTools, keepStatus, statusKey, viewWaitsFinding, type Answer, type Status } from "../dist/views/index.js";
|
||||
|
||||
// callers and verb callers judge a proved caller by the Go side's rules (ADR 0459 §2, ADR 0627 §2)
|
||||
@@ -704,6 +704,11 @@ async function newTest1(): Promise<void> {
|
||||
assert.equal(await runAs(meta, a, async () => askIdOf(a)), want, JSON.stringify(meta));
|
||||
assert.equal(askIdOf(a), "", "no ask once the call ended");
|
||||
}
|
||||
// design 47 H2 §776, DQ-15: the kind away is answered and read as the Go side does
|
||||
assert.deepEqual(awayIn(JSON.parse(JSON.stringify(awayAnswer("the forge's store", "401")))), { part: "the forge's store", words: "401" });
|
||||
assert.equal(awayAnswer("p", "w")["error-kind"], "away");
|
||||
assert.equal(awayIn({ error: "no", "error-kind": "refused" }), undefined);
|
||||
assert.deepEqual(awayIn({ error: "the store is down", "error-kind": "away" }), { part: "", words: "the store is down" });
|
||||
|
||||
const verbs = parseVerbCallers('{"pull":["*"],"merge-pull":["mesh-delivery-forge-bridge"],"comment":["operator"]}', ["pull", "merge-pull", "comment"], {});
|
||||
assert.equal(refusal(verbs, "pull", "ace.anyone"), undefined);
|
||||
|
||||
Reference in New Issue
Block a user