feat: canonicalize Codex protocol JSON asset ordering#91507
Conversation
|
Codex review: found issues before merge. Reviewed June 8, 2026, 9:44 PM ET / 01:44 UTC. Summary PR surface: Source 0, Tests +77, Other +82. Total +159 across 9 files. Reproducibility: not applicable. this is an internal generated-asset and script canonicalization PR, not a bug report with a runtime reproduction path. The relevant checks are source review, upstream Codex contract inspection, and generator drift proof. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land a keyword-scoped canonicalizer with clean generator-backed Codex protocol drift proof, keeping generated JSON aligned with upstream semantics. Do we have a high-confidence way to reproduce the issue? Not applicable; this is an internal generated-asset and script canonicalization PR, not a bug report with a runtime reproduction path. The relevant checks are source review, upstream Codex contract inspection, and generator drift proof. Is this the best way to solve the issue? No; sharing one helper between sync and check is the right owner boundary, but array sorting should be constrained to order-insensitive schema contexts before the helper writes runtime validator assets. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 79c6136a9e17. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0, Tests +77, Other +82. Total +159 across 9 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
dd6facc to
dda7ce5
Compare
dda7ce5 to
001f6bb
Compare
Problem: the generated codex assets cause large LOC churn bc they don't maintain ordering
But ordering doesn't matter for some keys.
Solution: prevent churn by sorting the keys and arrays in a sensible way
AI Generated:
Summary
origin/maincanonical order only; this does not include a Codex dependency bump.Dependency / Protocol Source Checked
rust-v0.137.0and the pinnedrust-v0.135.0tag for the app-server export path.codex-rs/app-server-protocol/src/bin/export.rs,codex-rs/app-server-protocol/src/export.rs,codex-rs/app-server-protocol/src/schema_fixtures.rs, andcodex-rs/app-server-protocol/tests/schema_fixtures.rs.@openai/codex0.135.0; no dependency or lockfile changes are included.Verification
node scripts/run-vitest.mjs test/scripts/codex-app-server-protocol-source.test.tsnode scripts/run-vitest.mjs extensions/codex/src/app-server/protocol-validators.test.tsgit diff --checkextensions/codex/src/app-server/protocol-generated/json/**/*.jsonorigin/mainfor all 8 selected schemas.agents/skills/autoreview/scripts/autoreview --mode localclean, no actionable findingsBlocked locally:
OPENCLAW_CODEX_PROTOCOL_MIN_FREE_BYTES=0 pnpm codex-app-server:protocol:checkcould not run the generator because local Homebrewcargofails before startup with a missinglibllhttp.9.3.dylibrequired bylibgit2.