Pin provider errors and Bifrost's reply exactly; defend errorIdentity's filters
Soul pass 5, S5-4: the provider-error tests proved only that the word CANARY was absent, so a message carrying a 16-byte slice of the body (X1, X2) passed, and the Bifrost success reply was checked with objectContaining, so a 9-byte body head (X5) rode along. Each provider error's message is now pinned exactly, the Bifrost success reply is pinned as exactly status, supportFact and bifrostStatus, and every canary body starts with the canary, so any prefix of it shows. S5-5: errorIdentity's class and code filters had no test (X3, X4). Cases now show a code or class name that carries input, is too long, is not a string, or comes from a thrown non-Error or null is dropped, and a short identifier survives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
963150f537
commit
35f804f7ef
2 changed files with 36 additions and 10 deletions
|
|
@ -103,7 +103,7 @@ it("keeps a provider's malformed 2xx refresh body out of every plaintext part of
|
|||
});
|
||||
|
||||
it("keeps a provider's refusal body out of every plaintext part of the reply", async () => {
|
||||
const reply = await refreshAgainst(() => new Response('{"error":"invalid_grant","echo":"CANARYrefused"}', { status: 400 }));
|
||||
const reply = await refreshAgainst(() => new Response('CANARYrefused {"error":"invalid_grant"}', { status: 400 }));
|
||||
|
||||
expect(reply.status).toBe("denied");
|
||||
expect(reply.diagnostics).toEqual(["Heimdall denied the private command (ProviderResponseError, provider_status)."]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue