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:
Pionxzh
2026-10-10 23:02:15 +08:00
committed by GitHub
co-authored by morluto
parent 0363e5a8e1
commit ded59689ce
16 changed files with 272 additions and 66 deletions
+17 -3
View File
@@ -22,6 +22,7 @@ import type {
resolveWakaruCommand,
runWakaruCommand,
} from "./WakaruCommand.js";
import type { WakaruVersionAdmission } from "./WakaruVersion.js";
type PublicationContext = {
tree: SafeOutputTree;
@@ -34,6 +35,7 @@ type PublicationContext = {
bytes: number;
};
engine: Awaited<ReturnType<typeof resolveWakaruCommand>>;
admitted: Exclude<WakaruVersionAdmission, { status: "unsupported" }>;
parsed: Awaited<ReturnType<typeof parseWakaruReports>>;
execution: Awaited<ReturnType<typeof runWakaruCommand>>;
signal?: AbortSignal;
@@ -86,7 +88,7 @@ export const publishWakaruArtifacts = async (
source: { ...source, published_copy: publishedCopy },
engine: {
id: "wakaru",
version: WAKARU_RELEASE.version,
version: context.admitted.version,
executable: {
path: context.engine.command,
sha256: context.engine.sha256,
@@ -107,7 +109,14 @@ export const publishWakaruArtifacts = async (
total: parsed.report.total,
failed: parsed.report.failed,
modules,
warnings: parsed.report.warnings,
warnings: parsed.report.warnings.map(
({ filename, kind, is_error, message }) => ({
filename,
kind,
is_error,
message,
}),
),
report,
provenance,
analysis_input:
@@ -118,7 +127,12 @@ export const publishWakaruArtifacts = async (
format: "directory" as const,
},
runtime_equivalence: "unknown" as const,
limitations: [...RECOVERY_LIMITATIONS],
limitations: [
...RECOVERY_LIMITATIONS,
...(context.admitted.status === "compatible"
? [context.admitted.limitation]
: []),
],
};
const manifest = await write(
"manifest.json",