fix(javascript): accept the Wakaru 1.x release line and verify 1.14.0 (#1540)
* fix(javascript): accept the Wakaru 1.x release line and verify 1.14.0 Exact --version equality rejected every Wakaru build except 1.13.0, and strict report schemas rejected any added field, so each upstream release broke recovery until REA re-pinned. Wakaru now documents that --version, --json and provenance.json change only by addition within a major version. Admit ^1.13.0 with the verified/compatible split used for Binwalk and Unblob, report the observed version instead of the pinned constant, and add a limitation for unverified releases. Parse reports with loose objects and keep the reported module status as a string; path, identity, range and file-set checks stay exact. Move the audited pin, submodule, CI binary and verifier to 1.14.0, and document where to get the binary from the refusal message. * fix(javascript): project known Wakaru warning fields --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
@@ -97,6 +97,44 @@ describe.skipIf(process.platform !== "linux" || process.arch !== "x64")(
|
||||
await assertRecoveryCleanup(fixture.launches);
|
||||
});
|
||||
|
||||
it("accepts a later release on the verified major line with additive report fields", async () => {
|
||||
const fixture = await recoveryFixture("additive");
|
||||
const result = await fixture.service.recover({
|
||||
path: fixture.path,
|
||||
output_directory: fixture.output,
|
||||
});
|
||||
if (!result.ok) throw result.error;
|
||||
const value = javascriptRecoveryResultSchema.parse(
|
||||
result.value.normalized_result,
|
||||
);
|
||||
expect(value).toMatchObject({
|
||||
status: "complete",
|
||||
engine: { version: "1.99.0" },
|
||||
modules: [{ reported_status: "future_status" }],
|
||||
});
|
||||
expect(result.value.provider.version).toBe("1.99.0");
|
||||
expect(
|
||||
value.limitations.some((limitation) =>
|
||||
limitation.includes("This session uses Wakaru 1.99.0"),
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
JSON.parse(await readFile(value.report.path, "utf8")),
|
||||
).toMatchObject({
|
||||
future_report_field: { nested: true },
|
||||
warnings: [{ code: "W001" }],
|
||||
});
|
||||
expect(value.warnings).toEqual([
|
||||
{
|
||||
filename: "module.js",
|
||||
kind: "notice",
|
||||
is_error: false,
|
||||
message: "future warning",
|
||||
},
|
||||
]);
|
||||
await assertRecoveryCleanup(fixture.launches);
|
||||
});
|
||||
|
||||
it("retains valid partial output and exact failure diagnostics", async () => {
|
||||
const fixture = await recoveryFixture("partial");
|
||||
const result = await fixture.service.recover({
|
||||
|
||||
Reference in New Issue
Block a user