merge: preserve current MCP paging contracts in organized documentation
Retain list_unknowns paging guidance in docs/reference/mcp-contracts.md and verify the public routes and affected MCP regressions. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -227,6 +227,9 @@ describe("case-distinct APK resource names", () => {
|
||||
const inventory = parseEvidence(
|
||||
await runProviderAnalysis(path, "inventory_artifact", {}),
|
||||
);
|
||||
expect(inventory.normalized_result).toMatchObject({
|
||||
coverage_status: "partial",
|
||||
});
|
||||
const result = projectAndroidApplicationEvidence({
|
||||
inventory_evidence: [inventory],
|
||||
});
|
||||
@@ -234,6 +237,13 @@ describe("case-distinct APK resource names", () => {
|
||||
requireSuccessfulProjection(result).normalized_result,
|
||||
);
|
||||
expect(projection.root_format).toBe("apk");
|
||||
expect(projection.coverage).toEqual({
|
||||
status: "partial",
|
||||
inventory_complete: true,
|
||||
});
|
||||
expect(projection.limitations).toContain(
|
||||
"Source inventory coverage is partial; absence is unknown.",
|
||||
);
|
||||
expect(projection.components.manifests).toHaveLength(1);
|
||||
expect(projection.components.dex).toHaveLength(1);
|
||||
expect(JSON.stringify(inventory)).toContain("res/2F.xml");
|
||||
|
||||
@@ -75,6 +75,42 @@ async function createCompleteAppleProjection() {
|
||||
}
|
||||
|
||||
describe("Apple application projection", () => {
|
||||
it("keeps a case-colliding real IPA inventory partial", async () => {
|
||||
const root = await createTestTempDirectory("rea-apple-case-collision-");
|
||||
const path = join(root, "CaseCollision.ipa");
|
||||
const writer = new ZipWriter(new Uint8ArrayWriter());
|
||||
await writer.add(
|
||||
"Payload/Example.app/Contents/Info.plist",
|
||||
new TextReader("upper"),
|
||||
);
|
||||
await writer.add(
|
||||
"Payload/Example.app/contents/Info.plist",
|
||||
new TextReader("lower"),
|
||||
);
|
||||
await writeFile(path, await writer.close());
|
||||
|
||||
const inventory = parseEvidence(
|
||||
await runProviderAnalysis(path, "inventory_artifact", {}),
|
||||
);
|
||||
expect(inventory.normalized_result).toMatchObject({
|
||||
coverage_status: "partial",
|
||||
});
|
||||
const result = projectAppleApplicationEvidence({
|
||||
inventory_evidence: [inventory],
|
||||
});
|
||||
const projection = appleApplicationProjectionResultSchema.parse(
|
||||
requireSuccessfulProjection(result).normalized_result,
|
||||
);
|
||||
|
||||
expect(projection.coverage).toEqual({
|
||||
status: "partial",
|
||||
inventory_complete: true,
|
||||
});
|
||||
expect(projection.limitations).toContain(
|
||||
"Source inventory coverage is partial; absence is unknown.",
|
||||
);
|
||||
});
|
||||
|
||||
it("projects deterministic IPA components and bridge hypotheses from exact inventory Evidence", async () => {
|
||||
const root = await createTestTempDirectory("rea-apple-");
|
||||
const path = join(root, "Fixture.ipa");
|
||||
|
||||
@@ -172,6 +172,9 @@ describe("artifact inventory coverage", () => {
|
||||
authority: "shipped-artifact",
|
||||
},
|
||||
);
|
||||
expect(parseArtifactInventoryEvidence(partial).inventory.complete).toBe(
|
||||
true,
|
||||
);
|
||||
expect(compareArtifacts(partial, partial)).toMatchObject({
|
||||
status: "unknown",
|
||||
summary: { unchanged: 0, unknown: 1 },
|
||||
|
||||
@@ -20,6 +20,7 @@ import {
|
||||
} from "../../../src/application/AppBundleExecutable.js";
|
||||
import {
|
||||
dosMz,
|
||||
elf,
|
||||
fat,
|
||||
pe,
|
||||
thinMach,
|
||||
@@ -846,3 +847,40 @@ describe("DOS binary target I/O", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
it.each([
|
||||
[
|
||||
"EI_VERSION",
|
||||
(bytes: Buffer) => {
|
||||
bytes[6] = 0;
|
||||
},
|
||||
],
|
||||
[
|
||||
"e_version",
|
||||
(bytes: Buffer) => {
|
||||
bytes.writeUInt32LE(0, 20);
|
||||
},
|
||||
],
|
||||
[
|
||||
"e_ehsize",
|
||||
(bytes: Buffer) => {
|
||||
bytes.writeUInt16LE(51, 40);
|
||||
},
|
||||
],
|
||||
])(
|
||||
"rejects an ELF with malformed %s during public target opening",
|
||||
async (_name, corrupt) => {
|
||||
const directory = await createTestTempDirectory("rea-invalid-elf-header-");
|
||||
const path = join(directory, "invalid.elf");
|
||||
const bytes = elf(1, 1, 3);
|
||||
corrupt(bytes);
|
||||
await writeFile(path, bytes);
|
||||
expect(await parseBinaryTarget(path)).toMatchObject({
|
||||
ok: false,
|
||||
error: {
|
||||
_tag: "BinaryTargetError",
|
||||
constraint: "file_format_rejected",
|
||||
},
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
@@ -214,6 +214,34 @@ describe("HarmonyOS packaging boundaries", () => {
|
||||
});
|
||||
|
||||
describe("HarmonyOS inventory coverage", () => {
|
||||
it("keeps a case-colliding inventory partial in the application projection", async () => {
|
||||
const path = await writeApplicationZip(
|
||||
"rea-harmony-case-collision-",
|
||||
"Fixture.hap",
|
||||
[
|
||||
{ path: "module.json", content: '{"module":{}}' },
|
||||
{ path: "MODULE.JSON", content: '{"module":{}}' },
|
||||
],
|
||||
);
|
||||
const inventory = await inventoryApplicationPackage(path);
|
||||
expect(inventory.normalized_result).toMatchObject({
|
||||
coverage_status: "partial",
|
||||
});
|
||||
|
||||
const projection = requireDeterministicProjection(
|
||||
projectHarmonyApplicationEvidence,
|
||||
inventory,
|
||||
harmonyApplicationProjectionResultSchema,
|
||||
);
|
||||
expect(projection.coverage).toEqual({
|
||||
status: "partial",
|
||||
inventory_complete: true,
|
||||
});
|
||||
expect(projection.limitations).toContain(
|
||||
"Source inventory coverage is partial; absence is unknown.",
|
||||
);
|
||||
});
|
||||
|
||||
it.each(ZIP_PACKAGE_FORMATS)(
|
||||
"retains archive identity and ZIP coverage for %s",
|
||||
async (format) => {
|
||||
|
||||
Reference in New Issue
Block a user