"""The MCP sandbox refuses interpreters whose dynamic loader it cannot mount.""" from __future__ import annotations import struct import sys from pathlib import Path import pytest from obliteratus import mcp_worker from obliteratus.mcp_runtime_layout import elf_interpreter pytestmark = pytest.mark.cpu def elf64(path: Path, interp: bytes | None) -> Path: """Minimal little-endian ELF64 with an optional PT_INTERP program header.""" phoff, phentsize = 64, 56 phnum = 1 if interp is not None else 0 data_off = phoff + phentsize * phnum ident = b"\x7fELF" + bytes([2, 1, 1]) + bytes(9) header = struct.pack("