fix: address review nits from batch integration follow-ups (#818)
- browser: reject empty Referrer-Policy tokens structurally while still skipping them per W3 fallback semantics. - browser: document that WebMCP keys cannot collapse since unknown frames are excluded before keying. - ghidra: split NativeAOT non-recovery diagnostics into reason-missing vs payload-present variants with exact assertions. - reference: lock secret-patterned exclusion before failure projection so failure messages cannot carry secret paths. - doctor: lock direct-launcher Codex timeout ordering both ways. - native: note plutil -n macOS 12+ requirement; add fat-output control guarding the thin pre-scan. - reconstruction: multi-unknown limitation coverage via shared helper. Tracks #817 for the remaining smol-toml advisory.
This commit is contained in:
@@ -206,6 +206,25 @@ describe("Node-wrapped registration policy", () => {
|
||||
},
|
||||
);
|
||||
|
||||
it("checks a direct-launcher Codex startup timeout without Node wrapping", async () => {
|
||||
const home = await createTestTempDirectory("rea-direct-registration-");
|
||||
await mkdir(join(home, ".codex"));
|
||||
await writeFile(
|
||||
join(home, ".codex/config.toml"),
|
||||
'[mcp_servers.rea]\ncommand = "/current/rea"\nargs = ["mcp"]\nstartup_timeout_sec = 1\n',
|
||||
);
|
||||
const statuses = await readClientRegistrationStatuses(
|
||||
home,
|
||||
"/current/rea",
|
||||
{
|
||||
environment: {},
|
||||
},
|
||||
);
|
||||
expect(statuses).toEqual([
|
||||
expect.objectContaining({ client: "codex", state: "stale" }),
|
||||
]);
|
||||
});
|
||||
|
||||
it.each([{ tools: ["binary_session"] }, { tools: ["*"] }])(
|
||||
"checks Copilot tool selection $tools independently of launcher",
|
||||
async ({ tools }) => {
|
||||
|
||||
@@ -69,6 +69,31 @@ describe("reference import native entry failure details", () => {
|
||||
},
|
||||
);
|
||||
|
||||
it.skipIf(process.platform === "win32")(
|
||||
"excludes secret-patterned paths before failure projection",
|
||||
async () => {
|
||||
const root = await createTestTempDirectory("rea-import-native-secret-");
|
||||
await promisify(execFile)("mkfifo", [join(root, "secret-events.pipe")], {
|
||||
timeout: 2_000,
|
||||
});
|
||||
const imported = await importReferenceSource({
|
||||
root,
|
||||
caller: "native-entry-secret-detail-test",
|
||||
policy: { secretPatterns: ["*secret*"] },
|
||||
});
|
||||
if (!imported.ok) throw new Error(imported.error.message);
|
||||
expect(
|
||||
imported.value.entries.find(
|
||||
(item) => item.path === "secret-events.pipe",
|
||||
),
|
||||
).toBeUndefined();
|
||||
expect(imported.value.exclusions).toContainEqual({
|
||||
path: "secret-events.pipe",
|
||||
reason: "configured-secret",
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
it("preserves an ordinary readable source-file control", async () => {
|
||||
const root = await createTestTempDirectory("rea-import-native-readable-");
|
||||
await writeFile(join(root, "main.ts"), "export const value = 1;\n");
|
||||
|
||||
@@ -19,6 +19,31 @@ it.each([
|
||||
},
|
||||
);
|
||||
|
||||
it("does not mistake fat slice output for a thin Non-fat file record", () => {
|
||||
const output = [
|
||||
"Fat header in: /owned/universal.dylib",
|
||||
"fat_magic 0xcafebab2",
|
||||
"nfat_arch 2",
|
||||
"architecture arm64",
|
||||
" cputype CPU_TYPE_ARM64",
|
||||
" cpusubtype CPU_SUBTYPE_ARM64E",
|
||||
" offset 16384",
|
||||
" size 16777216",
|
||||
" align 2^14 (16384)",
|
||||
"architecture x86_64",
|
||||
" cputype CPU_TYPE_X86_64",
|
||||
" cpusubtype CPU_SUBTYPE_X86_64_ALL",
|
||||
" offset 16793600",
|
||||
" size 16777216",
|
||||
" align 2^12 (4096)",
|
||||
"",
|
||||
].join("\n");
|
||||
expect(parseLipoArchitectures(output)).toMatchObject([
|
||||
{ name: "arm64", file_offset: 16384 },
|
||||
{ name: "x86_64", file_offset: 16793600 },
|
||||
]);
|
||||
});
|
||||
|
||||
it("keeps section blocks separate under CRLF captures", async () => {
|
||||
const lf = parseOtoolLoadCommands(await nativeFixture("otool-load.txt"));
|
||||
const crlf = parseOtoolLoadCommands(
|
||||
|
||||
Reference in New Issue
Block a user