mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-13 17:24:27 +01:00
Add a PR CI check that fails when the committed codex app-server protocol client (src/vs/platform/agentHost/node/codex/protocol/generated/**) does not match what `codex app-server generate-ts` produces for the @openai/codex dev-dependency version, but only when a PR actually changes the generated client or the version pin. - build/codex/generate-protocol.mjs: export the reusable pieces (generate, resolveCodexBinary, readBinaryVersion, readPinnedVersion, paths) and only run main() when invoked directly, so the check can import it side-effect free. Types provided by generate-protocol.d.mts. - build/codex/check-protocol-sync.ts: gate on a git diff touching the generated dir or codex-version.txt (its README.md excluded — preserved across regen), regenerate into a scratch dir with the dev-dependency binary, byte-compare against the committed client, and assert the pin matches. Never touches the working tree. - build/codex/test/checkProtocolSync.test.ts: unit tests for the gate + diff helpers; wired in via the build/package.json test glob (adds `codex`). - package.json: `codex:check-protocol` script. - .github/workflows/pr.yml: run the gated check in the Compile & Hygiene job. - generated/README.md: document the check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>