* feat(ghidra): admit raw NMOS 6502 analysis * test(ghidra): require verified POSIX verifier cleanup * test(ghidra): verify 6502 low-memory raw imports * docs(skill): document raw NMOS 6502 support * fix(ghidra): preserve requested Windows raw source paths * docs(ghidra): include raw 6502 in Windows installation scope * test(ghidra): verify Windows raw junction rejection through CLI and MCP * fix(validation): make fixtures portable and preserve explicit Codex home * fix(ghidra): attest raw mapping state and address space * fix(ghidra): align diagnostics and regression groups * fix(ghidra): bind raw attestation to language address space * chore(ghidra): avoid verifier insertion conflict * docs(ghidra): align linked raw admission guides * fix(ghidra): retain 6502 verifier workspace on failure * test(ghidra): isolate Windows authority doctor fixture * fix(binary): re-admit Windows raw paths on session reopen * test(binary): require fresh provider execution after path change * Constrain 6502 to raw lifecycle and snapshot targets * Bypass saved reads for unadmitted Windows paths * Guard direct CLI snapshot replay on Windows paths * fix(snapshot): gate Windows Ghidra replay on native admission * fix(snapshot): constrain nested 6502 subjects to raw images * test: make dyld slice fixtures portable
75 lines
2.2 KiB
TypeScript
75 lines
2.2 KiB
TypeScript
import { readFile } from "node:fs/promises";
|
|
import { resolve } from "node:path";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
import { PRODUCT_IDENTITY } from "../../src/identity.js";
|
|
|
|
const translatedReadmes = [
|
|
"README_zh.md",
|
|
"README_zh-TW.md",
|
|
"README_ja.md",
|
|
"README_ko.md",
|
|
"README_tr.md",
|
|
"README_ru.md",
|
|
"README_vi.md",
|
|
"README_th.md",
|
|
"README_de.md",
|
|
"README_es.md",
|
|
"README_fr.md",
|
|
"README_uk.md",
|
|
"README_pl.md",
|
|
"README_pt-BR.md",
|
|
"README_ar.md",
|
|
"README_fa.md",
|
|
"README_id.md",
|
|
] as const;
|
|
|
|
const jsonExamples = (content: string): unknown[] =>
|
|
[...content.matchAll(/```json\s*([\s\S]*?)```/gu)].map((match): unknown =>
|
|
JSON.parse(match[1] ?? ""),
|
|
);
|
|
|
|
const shellExamples = (content: string): string[] =>
|
|
[...content.matchAll(/```bash\s*([\s\S]*?)```/gu)].map((match) =>
|
|
(match[1] ?? "").trim(),
|
|
);
|
|
|
|
describe("onboarding documentation product facts", () => {
|
|
it.each([
|
|
["docs/native-investigation.md", "raw-binary.md#nmos-6502"],
|
|
["docs/ghidra-riscv.md", "raw-binary.md"],
|
|
])(
|
|
"routes raw admission guidance in %s to the owning guide",
|
|
async (path, target) => {
|
|
const content = await readFile(resolve(path), "utf8");
|
|
const links = [...content.matchAll(/\]\(([^)\s]+)\)/gu)].map(
|
|
(match) => match[1],
|
|
);
|
|
expect(links, path).toContain(target);
|
|
},
|
|
);
|
|
|
|
it("keeps the installation MCP example aligned with the package registration command", async () => {
|
|
const content = await readFile(resolve("docs/installation.md"), "utf8");
|
|
expect(jsonExamples(content)).toContainEqual(
|
|
expect.objectContaining({
|
|
mcpServers: expect.objectContaining({
|
|
rea: expect.objectContaining({
|
|
command: "npx",
|
|
args: ["-y", PRODUCT_IDENTITY.registrationPackageSpecifier, "mcp"],
|
|
}),
|
|
}),
|
|
}),
|
|
);
|
|
});
|
|
|
|
it("keeps translated onboarding commands aligned with the English examples", async () => {
|
|
const english = shellExamples(await readFile(resolve("README.md"), "utf8"));
|
|
for (const path of translatedReadmes)
|
|
expect(
|
|
shellExamples(await readFile(resolve(path), "utf8")),
|
|
path,
|
|
).toEqual(english);
|
|
});
|
|
});
|