Skip to content

Make Codex signature normalization reproducible and JIT-safe - #21

Merged
0thernet merged 1 commit into
mainfrom
codex/recover-codex-signature-normalization
Aug 20, 2026
Merged

Make Codex signature normalization reproducible and JIT-safe#21
0thernet merged 1 commit into
mainfrom
codex/recover-codex-signature-normalization

Conversation

@0thernet

@0thernet 0thernet commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recover the exact Codex payload normalization from Normalize strict-invalid Codex runtime signatures #16 on current main
  • make ad-hoc output deterministic across supported macOS builders by pinning SHA-256 signing, no timestamp, runtime 15.5.0, 16 KiB signing pages, DER entitlements, and the original identifiers
  • preserve exactly the two upstream V8 JIT entitlements and reject every extra entitlement
  • pin both packaged identities and reversible source deltas, then prove all non-signature Mach-O bytes remain unchanged
  • reconstruct the official payloads during package verification and run the unchanged native payload verifier
  • exercise the signed code-mode host through its framed protocol with a hot V8 workload
  • require the existing macOS 15 package lane and a focused macOS 26 reproduction lane

Failure fixed

PR #16 relied on the host default codesign page size. The failed macOS 15 run accepted the official source signature, re-signed it with 4 KiB pages, and then disagreed with identities derived on macOS 26, where the default is 16 KiB. The earlier signing command also omitted the two JIT entitlements carried by the official codex and codex-code-mode-host payloads.

This replacement always normalizes the two exact pinned files. Conditional preservation could ship an upstream signature that succeeds on one builder but is known to fail strict verification on another supported host. Every source package, source file, signing input, output identity, entitlement, structural byte boundary, and reconstruction delta is fail-closed.

PR #15 contributes no code here. Its routing behavior is already present on current main, while its remaining manifest deletion would weaken compatibility with a published recovery boundary.

Local evidence

  • portable normalization regressions: 9 passed
  • macOS normalization and image-normalizer suite: 8 passed, including exact identities and framed-protocol V8 JIT execution
  • exact committed ad-hoc package: normalized both payloads, reconstructed official sources, passed destructive tamper regressions, restored deep strict verification, and created the DMG
  • public boundary, public tree, structure, agent-guide, typecheck, and lint gates: passed
  • full check:complete: passed, including 3,054 desktop tests, 23 gateway integration tests, and every production build

This is intentionally a draft until macOS 15 and macOS 26 reproduce the same pinned identities and the full required gate is green.

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hra Ready Ready Preview Aug 20, 2026 5:17pm

Request Review

@0thernet
0thernet marked this pull request as ready for review August 20, 2026 17:45
@0thernet
0thernet merged commit 5e73f19 into main Aug 20, 2026
5 checks passed
@0thernet
0thernet deleted the codex/recover-codex-signature-normalization branch August 20, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant