From 05b496eda473963edc10b3f2dff1b445da722abe Mon Sep 17 00:00:00 2001 From: Duncan Date: Sat, 29 Aug 2026 19:48:24 -0400 Subject: [PATCH] fix(acp): extend description extraction to codex v1.1.7; protect prose gate with integrated render test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit B1 (F2 — codex v1.1.7 command/file-change approvals): - Add two extraction paths to `description_from_request_permission`: 4. `params.toolCall.rawInput.command` — codex v1.1.7 command execution (no title; command string in rawInput). Wire shape cited from tag v1.1.7. 5. `params._meta.codex.params.reason` — codex v1.1.7 file-change (no title or rawInput; reason in codex metadata). Wire shape cited. - Two new Rust tests use verbatim v1.1.7 wire shapes from `buildCommandPermissionRequest` / `buildFileChangePermissionRequest` in `codex-acp tag v1.1.7 CodexApprovalHandler.ts`. Both go red if the extraction pointers are changed back. - Three new PermissionRequestCardBlock component tests (Carl's F2 bar): hostile markup renders as inert text (no bold"; + const contentWithHostile = JSON.stringify({ + v: 1, + state: "pending", + requestNonce: "a9f3b2c1-d4e5-4f6a-b7c8-d9e0f1a2b3c4", + sessionId: "sess-abc", + turnId: "turn-xyz", + expiresAt: FUTURE_EXPIRY, + optionIds: ["opt-allow", "opt-deny"], + labels: { "opt-allow": "Allow once", "opt-deny": "Deny" }, + description: hostileDesc, + }); + + const container = await renderBlock({ + content: contentWithHostile, + viewerPubkey: OWNER_PUBKEY, + ownerPubkey: OWNER_PUBKEY, + }); + + // No