Skip to content

Fix Private Lima Codex policy introspection - #323

Merged
toku345 merged 2 commits into
mainfrom
agent/fix-codex-app-server-lifecycle
Aug 8, 2026
Merged

Fix Private Lima Codex policy introspection#323
toku345 merged 2 commits into
mainfrom
agent/fix-codex-app-server-lifecycle

Conversation

@toku345

@toku345 toku345 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • sequence the Codex app-server initialize and policy-read requests by waiting for each response
  • validate list-valued effective config through complete, uniform indexed origin metadata
  • add fail-closed regression coverage and document the live C00 contract
  • refresh the Private Lima harness manifest

Root cause

Codex 0.144.5 requires a stateful initialize handshake, but the validator sent the complete JSONL request stream before reading responses. In addition, list-valued config origins are reported per index (for example, writable_roots.0) while the normalizer only accepted a parent origin key.

Impact

The C00 runtime-policy validator can now inspect the pinned Codex guest without a false block while preserving fail-closed behavior for missing or mixed provenance.

Validation

  • PYTHONDONTWRITEBYTECODE=1 python3 -W error::ResourceWarning -m unittest discover -s tests/outer_loop_lima -p 'test_*.py' — 148 tests passed, 1 skipped
  • guest ShellCheck — passed
  • strict harness manifest validation — passed
  • git diff --check and bytecode absence checks — passed
  • Lima 2.2.0 static validation for both week0 profiles — passed (sandbox-only Rosetta detection warning)
  • retained Codex VM candidate validation — CANDIDATE_CODEX_POLICY_PASS (non-authoritative, candidate module loaded from guest /tmp)

toku345 and others added 2 commits August 6, 2026 19:02
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
@toku345 toku345 self-assigned this Aug 8, 2026
@toku345
toku345 marked this pull request as ready for review August 8, 2026 06:41
@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown

Greptile Summary

The PR repairs Codex runtime-policy introspection while retaining fail-closed provenance validation.

  • Sequences initialization and policy-read requests against the stateful app-server protocol.
  • Normalizes list-valued configuration using complete per-index origin metadata.
  • Adds regression coverage, updates the documented C00 contract, and refreshes integrity hashes.

Confidence Score: 5/5

The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issues identified.

The interactive request lifecycle matches the documented stateful protocol, list provenance is checked uniformly per index, and failure paths remain fail-closed.

Important Files Changed

Filename Overview
tools/outer-loop-lima-calibration/runtime/codex.py Implements deadline-bound, sequential JSONL communication and fail-closed indexed-origin normalization without an identified defect.
tests/outer_loop_lima/test_runtime_policy.py Adds handshake-order and indexed-provenance regression coverage, including missing and mixed-origin rejection.
tools/outer-loop-lima-calibration/manifest.json Refreshes the hashes for the modified runtime module and README.
tools/outer-loop-lima-calibration/README.md Documents request sequencing and the complete indexed-origin requirement.
docs/design/codex-claude-outer-loop-private-lima-calibration-implementation.md Updates the design contract to describe stateful reads and fail-closed list provenance.

Sequence Diagram

sequenceDiagram
    participant V as C00 Validator
    participant C as Codex app-server
    V->>C: initialize (id 1)
    C-->>V: initialize result
    V->>C: initialized notification
    V->>C: config/read (id 2)
    C-->>V: config result with indexed origins
    V->>C: configRequirements/read (id 3)
    C-->>V: requirements result
    V->>V: Compare effective values and provenance
Loading

Reviews (1): Last reviewed commit: "Handle buffered Codex app-server JSONL" | Re-trigger Greptile

@toku345
toku345 merged commit 23eebcb into main Aug 8, 2026
18 checks passed
@toku345
toku345 deleted the agent/fix-codex-app-server-lifecycle branch August 8, 2026 06:47
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