Skip to content

[issue #53] Enforce the Codex main-agent frontdoor#95

Merged
Saber5656 merged 33 commits into
mainfrom
codex/codex-frontdoor-enforcement
Jul 16, 2026
Merged

[issue #53] Enforce the Codex main-agent frontdoor#95
Saber5656 merged 33 commits into
mainfrom
codex/codex-frontdoor-enforcement

Conversation

@Saber5656

Copy link
Copy Markdown
Owner

Summary

  • add the root-owned zero-argument launcher, deployment lifecycle, supervisor, host observer, and assurance generation needed to run one pinned stock Codex CLI as the managed main-agent frontend
  • expose only typed request submission, redacted projection reads, and output acknowledgement through the session-bound MCP bridge; the positive path creates exactly one waiting_human request and no downstream execution
  • bind workflow and scoped-worker artifacts to the approved request, principal, checkout, runtime, and deployment epoch, while keeping the same-rootfs managed-worker claim suppressed
  • document the exact v0.1.0 authority boundary and the human-owned post-merge deployment, login, commissioning, tagging, and release gates in English and Japanese

Enforcement boundary

This PR provides an action_enforced path only for the release-pinned stock Codex CLI started through the installed root-owned launcher. Live process identity is checked twice against the launch record, including the exact kernel argument vector (KERN_PROCARGS2 on macOS) and deployment epoch.

It does not claim to control Codex App, IDE integrations, direct codex launches, Claude, Cursor, Grok, or every prompt ingress. It does not ship automatic frontend-to-worker transport. Merge does not activate the host installation and does not publish v0.1.0.

Validation

  • python3 scripts/validate_all.py: 41 suites, contract validation, and compilation passed
  • /usr/bin/python3 scripts/validate_all.py: the same matrix passed
  • focused assurance, attester, supervisor, deployment, bridge, frontdoor, worker, and enforcement-profile suites passed under both Python runtimes
  • real macOS exact-argv proof preserved ['a b', 'c'] as two elements and distinguished it from a collapsed one-element vector
  • README offline quickstart and operator Day-1 / bridge routing smokes passed
  • relative links and anchors, executable shell blocks, and English/Japanese command/path/API/environment parity passed
  • git diff --check and gitleaks dir . --redact --no-banner passed
  • independent tech-qa, tech-architect, tech-security/Security Commit Review, and tech-docs reviews passed with no actionable findings

Human gates after merge

  1. prepare and review the deployment plan from clean merged main
  2. perform the documented administrator freeze, seal, and activate steps
  3. verify the dedicated CODEX_HOME and perform Codex login manually
  4. start the zero-argument launcher and complete root observer commissioning
  5. submit the simple research prompt and confirm one fresh waiting_human request with no downstream artifacts

Related to #53. This PR must not close the release issue; tagging and GitHub Release publication remain human-owned operations.

Saber5656 added 14 commits July 16, 2026 04:59
Centralize the configured state-root contract and make durable state,
lock, and permission handling fail closed.
Carry checkout, principal, and projection bindings through work orders and
completion gates so downstream execution cannot reuse stale authority.
Bind the worker process, checkout, profile, and projection to one approved
capability and reject network or provider grants.
Verify deployment epochs and exact kernel argument vectors with two live
process snapshots before promoting a managed-agent claim.
Prepare, freeze, activate, revoke, and verify one pinned Codex deployment
with durable epochs and trusted runtime-home handling.
Persist one redacted, session-bound request at waiting_human and hide
unbound child or worker summaries from the frontend projection.
Limit the managed frontend to typed submit, redacted projection reads, and
output acknowledgement through the host-validated MCP bridge.
Record an exact-one waiting_human request and prove that the frontend
canary creates no downstream execution or checkout mutation.
Create a root-bound launch record before dropping privileges and exec the
reviewed zero-argument Codex session with its canonical environment.
Capture root-owned process and denial observations without promoting
claims beyond the fixed Codex frontend inventory.
Bind evidence, deployment epoch, and live claim evaluation into immutable
commissioned generations before activation.
Keep repository-level CLI, profile, API, and viewer expectations aligned
with the deterministic frontend authority contract.
Describe deployment, commissioning, recovery, routing acceptance, and the
exact limits of the managed frontend and worker domains.
Explain the launcher-only Codex target, waiting_human frontend stop, worker
isolation requirement, and human-owned release gates in English and Japanese.
@Saber5656 Saber5656 self-assigned this Jul 15, 2026
@Saber5656 Saber5656 added the documentation Improvements or additions to documentation label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 79 files, which is 29 over the limit of 50.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 083b2de1-af53-43a3-bfa0-25759be21601

📥 Commits

Reviewing files that changed from the base of the PR and between ee9dee7 and d193135.

📒 Files selected for processing (80)
  • .github/codeql/extensions/saihai-python-models/codeql-pack.yml
  • .github/codeql/extensions/saihai-python-models/models/frontdoor.yaml
  • .github/codeql/extensions/saihai-python-models/models/frontdoor.yml
  • .github/workflows/validate.yml
  • CHANGELOG.md
  • README.ja.md
  • README.md
  • docs/configuration.md
  • docs/runbooks/main-agent-enforcement.md
  • organization/runtime/workflows/README.md
  • organization/runtime/workflows/frontdoor-orchestrator-protocol.md
  • organization/runtime/workflows/operator-runbook.md
  • organization/runtime/workflows/profiles/agent-integration-assurance.registry.json
  • organization/runtime/workflows/profiles/agent-integration-canary.md
  • organization/runtime/workflows/profiles/codex-main-agent.config.example.toml
  • organization/runtime/workflows/profiles/codex-main-agent.deployment.example.json
  • organization/runtime/workflows/profiles/codex-main-agent.instructions.md
  • organization/runtime/workflows/profiles/codex-main-agent.requirements.example.toml
  • organization/runtime/workflows/profiles/codex-main-agent.rules.example
  • organization/runtime/workflows/profiles/saihai-codex-main-agent-bridge.wrapper.example
  • organization/runtime/workflows/profiles/saihai-codex-main-agent.launcher.example
  • organization/runtime/workflows/profiles/saihai-frontend-session.sh
  • organization/runtime/workflows/profiles/verify_enforcement.md
  • organization/runtime/workflows/schemas/agent-integration-assurance.schema.json
  • organization/runtime/workflows/schemas/agent-integration-attestation.schema.json
  • organization/runtime/workflows/schemas/agent-integration-evidence.schema.json
  • organization/runtime/workflows/schemas/child-thread-plan.schema.json
  • organization/runtime/workflows/schemas/codex-main-agent-deployment.schema.json
  • organization/runtime/workflows/schemas/main-agent-bridge-request.schema.json
  • organization/runtime/workflows/schemas/orchestrator-projection.schema.json
  • organization/runtime/workflows/schemas/scoped-worker-capability.schema.json
  • organization/runtime/workflows/schemas/work-order.schema.json
  • organization/runtime/workflows/scripts/agent_integration_assurance.py
  • organization/runtime/workflows/scripts/agent_integration_attester.py
  • organization/runtime/workflows/scripts/agent_integration_canary.py
  • organization/runtime/workflows/scripts/agent_integration_observer.py
  • organization/runtime/workflows/scripts/codex_main_agent_deployment.py
  • organization/runtime/workflows/scripts/codex_main_agent_install.py
  • organization/runtime/workflows/scripts/codex_main_agent_supervisor.py
  • organization/runtime/workflows/scripts/codex_main_agent_verify.py
  • organization/runtime/workflows/scripts/frontdoor_orchestrator.py
  • organization/runtime/workflows/scripts/host_state_root.py
  • organization/runtime/workflows/scripts/main_agent_bridge_mcp.py
  • organization/runtime/workflows/scripts/provider_evidence_contract.py
  • organization/runtime/workflows/scripts/provider_runner.py
  • organization/runtime/workflows/scripts/report_gate.py
  • organization/runtime/workflows/scripts/run_lifecycle.py
  • organization/runtime/workflows/scripts/run_lock.py
  • organization/runtime/workflows/scripts/run_store.py
  • organization/runtime/workflows/scripts/safe_paths.py
  • organization/runtime/workflows/scripts/scoped_worker_executor.py
  • organization/runtime/workflows/scripts/work_order_builder.py
  • organization/runtime/workflows/scripts/workflow_selector.py
  • organization/runtime/workflows/tests/e2e_harness.py
  • organization/runtime/workflows/tests/fixtures/run-artifacts/failed-invalid-report/requests/req-failed-invalid-report.json
  • organization/runtime/workflows/tests/test_agent_integration_assurance.py
  • organization/runtime/workflows/tests/test_agent_integration_attester.py
  • organization/runtime/workflows/tests/test_agent_integration_canary.py
  • organization/runtime/workflows/tests/test_agent_integration_observer.py
  • organization/runtime/workflows/tests/test_codex_main_agent_deployment.py
  • organization/runtime/workflows/tests/test_codex_main_agent_supervisor.py
  • organization/runtime/workflows/tests/test_completion_gate.py
  • organization/runtime/workflows/tests/test_e2e_failure_modes.py
  • organization/runtime/workflows/tests/test_e2e_happy_path.py
  • organization/runtime/workflows/tests/test_frontdoor_orchestrator.py
  • organization/runtime/workflows/tests/test_main_agent_bridge_mcp.py
  • organization/runtime/workflows/tests/test_provider_runner.py
  • organization/runtime/workflows/tests/test_report_gate.py
  • organization/runtime/workflows/tests/test_run_lock.py
  • organization/runtime/workflows/tests/test_run_store.py
  • organization/runtime/workflows/tests/test_safe_paths.py
  • organization/runtime/workflows/tests/test_scoped_worker_executor.py
  • organization/runtime/workflows/tests/test_task_state_bridge.py
  • organization/runtime/workflows/tests/test_work_order_builder.py
  • organization/runtime/workflows/tests/test_workflow_selector.py
  • tests/test_codeql_workflow.py
  • tests/test_enforcement_profiles.py
  • tests/test_saihai_cli.py
  • tests/test_server_workflow_api_safety.py
  • tests/test_viewer_fixtures.py

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/codex-frontdoor-enforcement

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Link the ready release-preparation PR by its actual GitHub number.
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed
Comment thread organization/runtime/workflows/scripts/run_store.py Fixed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4f7593feab

ℹ️ 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".

Comment thread organization/runtime/workflows/scripts/frontdoor_orchestrator.py Outdated
Comment thread organization/runtime/workflows/scripts/work_order_builder.py
Comment thread organization/runtime/workflows/scripts/frontdoor_orchestrator.py
Comment thread organization/runtime/workflows/scripts/codex_main_agent_deployment.py Outdated
@Saber5656
Saber5656 merged commit f71b8cd into main Jul 16, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants