chore(plugins): sync the captured final review base

This commit is contained in:
morluto
2026-10-13 21:50:53 +08:00
253 changed files with 12485 additions and 1407 deletions
+9
View File
@@ -0,0 +1,9 @@
FEATURES {
STARTADDRESS: default = $8001;
}
MEMORY {
IMAGE: start = %S, size = $10000 - %S, file = %O;
}
SEGMENTS {
CODE: load = IMAGE, type = ro;
}
+19
View File
@@ -0,0 +1,19 @@
; Source-owned NMOS 6502 fixture: direct call, conditional branch, and arithmetic.
.setcpu "6502"
.segment "CODE"
.export entry, add_three
entry:
lda #7
jsr add_three
cmp #10
bne mismatch
lda #42
rts
mismatch:
lda #0
rts
add_three:
clc
adc #3
rts
@@ -29,15 +29,25 @@ const parametersFor = (
operation: string,
): Readonly<Record<string, JsonValue>> => {
if (operation.startsWith("search_")) return { pattern: "a.b" };
if (operation === "xrefs") return { address: "0x1000" };
if (operation === "xrefs" || operation === "resolve_containing_procedure")
return { address: "0x1000" };
if (operation.startsWith("list_")) return {};
return { procedure: "main" };
};
/** Operations only the headless profile declares. */
const HEADLESS_ONLY: ReadonlySet<string> = new Set([
"resolve_containing_procedure",
"list_documents",
]);
describe.each(["attached", "headless"] as const)(
"IDA %s caller-visible contracts",
(mode) => {
it.each(IDA_OPERATIONS)(
const operations = IDA_OPERATIONS.filter(
(operation) => mode === "headless" || !HEADLESS_ONLY.has(operation),
);
it.each(operations)(
"declares %s UI effects matching the upstream tools it reaches",
async (operation) => {
const { root, target } = await createIdaTarget();
@@ -69,7 +79,7 @@ describe.each(["attached", "headless"] as const)(
},
);
it.each(IDA_OPERATIONS)(
it.each(operations)(
"serializes %s against its named advertised output contract",
async (operation) => {
const { root, target } = await createIdaTarget();
@@ -26,14 +26,18 @@ describe("real Windows Ghidra workflow trust boundary", () => {
environment: "real-ghidra-windows",
"runs-on": expect.arrayContaining(["self-hosted", "Windows", "x64"]),
steps: expect.arrayContaining([
expect.objectContaining({ uses: "actions/setup-node@v4" }),
expect.objectContaining({
uses: expect.stringMatching(/^actions\/setup-node@[0-9a-f]{40}$/),
}),
expect.objectContaining({ run: "npm ci" }),
expect.objectContaining({
env: { REA_ANALYSIS_PROVIDER: "ghidra" },
run: "npm run verify:ghidra:windows | Tee-Object -FilePath windows-ghidra-proof.log",
}),
expect.objectContaining({
uses: "actions/upload-artifact@v4",
uses: expect.stringMatching(
/^actions\/upload-artifact@[0-9a-f]{40}$/,
),
with: expect.objectContaining({
path: expect.stringContaining("windows-ghidra-proof.log"),
}),
@@ -35,6 +35,20 @@ const shellExamples = (content: string): string[] =>
);
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(
@@ -0,0 +1,23 @@
@inline(never)
func consume(_ value: String) { print(value) }
@inline(never)
func smallLiteral() { consume("SleepDisabled") }
@inline(never)
func largeLiteral() { consume("The power setting could not be changed.") }
@inline(never)
func unicodeLiterals() {
consume("café")
consume("Résumé of the naïve décor, written twice")
}
@inline(never)
func emptyAndControlLiterals() {
consume("")
consume("tab\there")
}
@inline(never)
func returnedLiteral() -> String { "Holding awake" }
smallLiteral()
largeLiteral()
unicodeLiterals()
emptyAndControlLiterals()
print(returnedLiteral(), CommandLine.arguments.count)