mirror of
https://github.com/morluto/rea
synced 2026-10-25 22:08:11 -04:00
test(artifacts): cover fixed input-size recovery for Rust and IL2CPP (#6148)
#5633 gave Rust and IL2CPP input-size refusals input-allowance recovery through fixedAllowanceOptions, but no public CLI check covered either command, and IL2CPP had no remediation assertion at all. Add both commands to the CLI input-limit matrix. Go and WASM still carried a duplicated hand-written copy of the same advice. They now use the shared "input" allowance recovery, so all four commands name their fixed allowance from one owner. The matrix also asserted not.toContain("evidence reply"), which the new "evidence-reply" wording passes only because of the hyphen. Assert the absence of the old advice text instead. Fixes #5405 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,9 +5,27 @@ import { z } from "zod";
|
||||
import { createTestTempDirectory } from "../../fixtures/temporaryDirectory.js";
|
||||
import { cliTest } from "../../support/cli/cliFixture.js";
|
||||
|
||||
for (const { command, limit } of [
|
||||
{ command: "inspect-go-binary", limit: 256 * 1024 * 1024 },
|
||||
{ command: "inspect-wasm-artifact", limit: 8 * 1024 * 1024 },
|
||||
for (const { command, limit, recovery } of [
|
||||
{
|
||||
command: "inspect-go-binary",
|
||||
limit: 256 * 1024 * 1024,
|
||||
recovery: "input byte allowance",
|
||||
},
|
||||
{
|
||||
command: "inspect-rust-binary",
|
||||
limit: 256 * 1024 * 1024,
|
||||
recovery: "within the fixed Rust input allowance",
|
||||
},
|
||||
{
|
||||
command: "inspect-il2cpp-metadata",
|
||||
limit: 256 * 1024 * 1024,
|
||||
recovery: "within the fixed IL2CPP input allowance",
|
||||
},
|
||||
{
|
||||
command: "inspect-wasm-artifact",
|
||||
limit: 8 * 1024 * 1024,
|
||||
recovery: "input byte allowance",
|
||||
},
|
||||
]) {
|
||||
cliTest.skipIf(process.platform === "win32")(
|
||||
`${command} identifies fixed input-size refusal and recovery`,
|
||||
@@ -51,8 +69,11 @@ exit 1
|
||||
remediation: z.object({ action: z.string() }),
|
||||
})
|
||||
.parse(output.json);
|
||||
expect(refusal.remediation.action).toContain("input byte allowance");
|
||||
expect(refusal.remediation.action).not.toContain("evidence reply");
|
||||
// Raising the evidence-reply allowance cannot admit an oversized input.
|
||||
expect(refusal.remediation.action).toContain(recovery);
|
||||
expect(refusal.remediation.action).not.toMatch(
|
||||
/allowance for the evidence reply/u,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user