feat(codex): validate bundles against pinned schemas with honest host-devtools evidence (#133) - #326
Conversation
🦋 Changeset detectedLatest commit: 070a326 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
When this API runs from the published package and Codex emits any of these comparable hook-schema files, this URL is resolved relative to the bundled dist entry, but the generated schema directory is neither imported into the bundle nor copied by packages/agent-bundle/rslib.config.ts (and the package publishes only dist). Consequently each pinned readFile raises ENOENT, which is misclassified as a missing live schema and produces a false drift warning/error even when the live files match exactly. Embed the pinned bytes/hashes or explicitly copy these files into a package-relative runtime location.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
Codex ecosystem validator for #133, mirroring the Claude devtools precedent (#193) under the issue's honesty rules:
validateCodexPlugin(newhost-contracts/codex-plugin-validation.ts): boundedcodex --versionprobe (5 s / 1 MiB; ENOENT is an honest info skip), local validation of.codex-plugin/plugin.json,hooks/hooks.json,.mcp.json, and.agents/plugins/marketplace.jsonagainst the VENDORED pinned Codex schemas (ajv + ajv-formats), each with malformed negative fixtures so a permissive schema cannot pass vacuously.codex pluginexposes install/marketplace management only — no validate command — so the report always carries an info diagnostic naming the vendored pin actually used.codex app-server generate-json-schema --out <dir>runs bounded; observed 0.147.0 emits 285 app-server protocol schema files and none of the pinned hook command schemas, so that case is an evidence-backed unassessable info (strict-independent). Genuine drift (hash mismatch or partial subset) stays warning, error under--strict. Live/pinned hashes recorded incapabilities/codex-0.147.0.json.AB6030–AB6033registered indocs/diagnostics.md; exported viaapi.ts(wired intovalidate({ hostValidation })for thecodextarget) andtest/index.ts; frozen reports; injectable command-runner proof seam.Changeset: minor,
agent-bundle.Test plan (all local, on the rebase over 0e3c444)
pnpm buildpnpm typecheckpnpm lint— 0 errors, 0 warnings (1012 files)pnpm test:unit— 187 files, 2583 passed, 0 failed, 5 skippedTracking