test(codex): observe permission events in auto-review scenarios (#7382)

List snapshots do not subscribe modern clients to permission events. Activate that feed before both scenarios so the request assertion and auto-review absence assertion exercise delivery.

Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com>
This commit is contained in:
paseo-bot[bot]
2026-10-19 15:49:47 +02:00
committed by GitHub
parent dd244c076d
commit 05920a236c
@@ -288,6 +288,12 @@ async function runScenario(modeId: "auto" | "auto-review") {
try {
writeMockCodexConfig(codexHome, mockServer.url);
await client.connect();
const permissionEvents = client.observeEvents([
"agent_permission_request",
"agent_permission_resolved",
]);
permissionEvents.subscribe({ snapshot: () => {}, update: () => {} });
await permissionEvents.ready;
await client.fetchAgents({ subscribe: {} });
const agent = await client.createAgent({