Skip to content

feat: DevKit 1.2.0 — portable plugins and compatibility preflight - #29

Merged
Ayleovelle merged 1 commit into
mainfrom
codex/devkit-1.2.0-compatibility
Sep 30, 2026
Merged

Ayleovelle merged 1 commit into
mainfrom
codex/devkit-1.2.0-compatibility

Conversation

@Ayleovelle

@Ayleovelle Ayleovelle commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Prepare DevKit 1.2.0 for the current ChatGPT/Codex plugin packaging model while retaining the existing Codex compatibility configuration and fail-closed runtime contracts.

  • Add Agent Plugins 1.0 root plugin.json and typed stdio mcp.json; retain .codex-plugin/plugin.json and .mcp.json.
  • Put portable runtime data, Python environment and uv cache under client-managed PLUGIN_DATA rather than writing a virtual environment into the installed plugin.
  • Add a bounded, read-only package compatibility checker; verify identity/version/overlay/launch/manual consistency without claiming client installation, model availability, broker authority or dispatch.
  • Include the new entry points and checker in both deterministic artifacts; add extracted-package and both-format real stdio tests, plus CI/release preflight coverage.
  • Add source-backed September 2026 guidance covering current model metadata, capacity handling and plugin/host boundaries. Existing model-neutral planning, intentional worker-effort policy, immutable legacy replay and 17-tool surface are preserved.

Primary evidence

The portable MCP schema does not allow legacy env_vars; it is deliberately not copied. Current models are discovered from actual task metadata, not hard-coded from release notes.

Verification so far

  • Official JSON schemas validate both portable files; Codex plugin validator passes.
  • Focused package/metadata/stdio suite: 52 passed, 1 skipped, 8 subtests passed.
  • After the portable data-location refinement: affected package+real stdio suite 22 passed.
  • Ruff on changed Python and locked dependency validation pass.
  • Full Linux baseline: 156 failed, 2021 passed, 33 skipped; upgrade run: 156 failed, 2041 passed, 33 skipped, with exactly the same failed test IDs. These are not presented as a green full suite. The repository's Windows CI remains required; local failures include protected-volume/Windows task-root restrictions and an existing promotion error-code mismatch.
  • Final full Linux run for exact head 21e3360: 156 failed, 2041 passed, 33 skipped, 226 subtests passed; failed test IDs exactly match the unmodified Linux baseline.
  • GitHub CI, CodeQL and Dependency review all passed for 21e33606fb60e5080b87d12819909c6d4efe9f59 (CI run #86, 2026-09-30). Windows runtime/Fast Lane and Linux artifact checks are green.

Boundaries

No merge, release, marketplace publication, new MCP tool, remote service, credential, hook trust or security-policy change. Client-specific actual installation has not been verified. The compatibility report explicitly keeps host environment forwarding and private broker attestation unverified.

Summary by Sourcery

Adopt portable Agent Plugins packaging and add compatibility preflight validation while retaining Codex support and fail-closed runtime behavior.

New Features:

  • Add portable Agent Plugins 1.0 manifests alongside the retained Codex compatibility configuration.
  • Provide a bounded, read-only compatibility preflight that reports package consistency without authorizing host execution or dispatch.

Bug Fixes:

  • Prevent portable runtime state, Python environments, and uv caches from being written into the installed plugin package.

Enhancements:

  • Preserve equivalent stdio runtime behavior across portable and legacy configuration formats while using client-managed plugin data.
  • Include compatibility validation and both plugin entry points in deterministic release artifacts.
  • Advance the project and MCP package version to 1.2.0 while preserving the existing tool surface and fail-closed contracts.

CI:

  • Run package compatibility tests in CI and enforce the preflight during release validation.

Documentation:

  • Document current plugin packaging boundaries, dynamic model and capacity handling, and the limits of compatibility verification.

Tests:

  • Add package, extracted-artifact, manifest-drift, and portable/legacy stdio coverage for the new packaging model.

@sourcery-ai

sourcery-ai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

DevKit 1.2.0 adopts portable Agent Plugins packaging alongside the retained Codex format, relocates portable runtime state to client-managed data, and adds deterministic artifact, extracted-package, CI, and stdio validation. A bounded read-only preflight reports package consistency and explicitly avoids claiming installation, host capability, model availability, broker authority, or dispatch, while the existing 17-tool, model-neutral, fail-closed runtime contracts remain unchanged.

Sequence diagram for read-only package compatibility preflight

sequenceDiagram
    participant Operator
    participant Preflight as check_compatibility.py
    participant Package as Plugin package

    Operator->>Preflight: inspect_package(plugin_root)
    Preflight->>Package: Read manifests and MCP configurations
    Preflight->>Package: Read pyproject.toml, server.py, uv.lock, and skills
    Preflight-->>Operator: JSON consistency report
    Note over Preflight: execution_authorized = false
    Note over Preflight: Host installation, forwarding, broker, models, and dispatch remain unverified
Loading

Flow diagram for artifact and release preflight validation

flowchart TD
    Source[Source checkout] --> Build[Build deterministic artifact]
    Build --> Artifact[Extracted plugin artifact]
    Source --> Check[Run compatibility preflight]
    Artifact --> Check
    Check -->|pass| Stdio[Run package and stdio validation]
    Stdio --> CI[CI artifact checks]
    CI --> Release[Release preflight]
    Check -->|fail| Stop[Stop release]
Loading

File-Level Changes

Change Details Files
Add dual-format portable and Codex package metadata while preserving the existing runtime identity and compatibility overlay.
  • Add Agent Plugins 1.0 root manifests with typed stdio configuration.
  • Retain and version the Codex manifests, MCP pointer, and Python project at 1.2.0.
  • Move portable runtime state, Python environment, and uv cache under ${PLUGIN_DATA}.
plugin.json
mcp.json
.codex-plugin/plugin.json
.mcp.json
mcp-tools/pyproject.toml
mcp-tools/uv.lock
Implement a bounded, read-only compatibility preflight that validates package consistency without granting runtime authority.
  • Validate manifest identity, version, OpenAI overlay, server inventory, launch contracts, required runtime files, and skill metadata.
  • Reject duplicate JSON keys, symlinks, oversized or invalid package files, and portable launch drift.
  • Emit structured diagnostics with explicit unverified host, model, broker, and dispatch boundaries; never invoke commands or mutate the package.
.codex-plugin/check_compatibility.py
mcp-tools/tests/test_package_compatibility.py
Ensure deterministic release artifacts and release gates contain and validate the new portable package surface.
  • Add portable manifests, checker, and compatibility guidance to both artifact allowlists.
  • Run compatibility checks in CI and release preflight.
  • Verify extracted artifacts independently for both lean and marketplace packages.
.codex-plugin/main-artifact-allowlist.json
.codex-plugin/marketplace-artifact-allowlist.json
.github/workflows/ci.yml
.github/workflows/release.yml
mcp-tools/tests/test_primary_artifact.py
Expand integration coverage for both package formats while preserving the existing stdio runtime contract.
  • Start extracted packages through both .mcp.json and mcp.json configurations.
  • Assert portable runs use client-managed data and do not create an installed-plugin virtual environment.
  • Preserve the 17-tool inventory and existing protocol behavior.
mcp-tools/tests/test_mcp_stdio.py
Document the packaging migration, compatibility limits, and current host/model boundary guidance.
  • Document package checks, artifact verification, host environment requirements, and fail-closed behavior.
  • Describe capability-driven model selection, capacity handling, image workflow boundaries, and immutable legacy replay.
  • Update English and Chinese release/version documentation and changelog.
docs/compatibility/codex-2026-09.md
README.md
README.zh-CN.md
CHANGELOG.md
skills/devkit-overview/SKILL.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@Ayleovelle
Ayleovelle marked this pull request as ready for review September 30, 2026 05:16
@Ayleovelle
Ayleovelle merged commit 6835259 into main Sep 30, 2026
7 checks passed

@sourcery-ai sourcery-ai 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.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".codex-plugin/check_compatibility.py" line_range="99-100" />
<code_context>
+
+        check(label, load)
+
+    def identity():
+        portable, legacy = data["portable_manifest"], data["codex_manifest"]
+        allowed = {"$schema", *IDENTITY, "extensions"}
+        if (
+            set(portable) != allowed
+            or portable["$schema"]
+            != "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json"
+        ):
+            raise PackageError("portable_manifest_fields_differ")
+        if portable["name"] != NAME or any(
+            portable[key] != legacy[key] for key in IDENTITY
+        ):
+            raise PackageError("manifest_identity_drift")
+        extension = portable["extensions"]
+        if extension != {"com.openai": {"interface": legacy["interface"]}}:
+            raise PackageError("openai_overlay_drift")
+        if legacy.get("mcpServers") != "./.mcp.json":
+            raise PackageError("legacy_mcp_pointer_drift")
</code_context>
<issue_to_address>
**issue (broader_impact):** The compatibility preflight accepts arbitrary extra fields in `.codex-plugin/plugin.json`, including legacy execution surfaces such as `hooks`, `agents`, or `skills`, because it compares only the selected identity fields and `interface`. A package can therefore receive an `ok: true` report while its retained Codex manifest has gained an unreviewed runtime surface.

**Triggers:** When a checked package contains a legacy manifest with the expected identity but additional execution-related fields.

**Suggested fix:** Validate the legacy manifest against its closed expected field set, or explicitly reject all legacy runtime-surface fields before reporting success.

```suggestion
        portable, legacy = data["portable_manifest"], data["codex_manifest"]
        allowed = {"$schema", *IDENTITY, "extensions"}
        legacy_allowed = {*IDENTITY, "mcpServers", "interface"}
        if set(legacy) != legacy_allowed:
            raise PackageError("legacy_manifest_fields_differ")
```
</issue_to_address>

Sourcery assessment

Needs a human reviewer. 1 finding to address first, and if the portable manifest or MCP environment mapping is wrong, a host could launch the server with an incorrect durable data or cache location, leaving records or runtime state that would need to be migrated or cleaned up after a revert. The checker and release gate are otherwise reversible, and the diff does not grant access, send data externally, move money, or delete records.

Blocking findings: .codex-plugin/check_compatibility.py:100


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment on lines +99 to +100
portable, legacy = data["portable_manifest"], data["codex_manifest"]
allowed = {"$schema", *IDENTITY, "extensions"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

issue (broader_impact): The compatibility preflight accepts arbitrary extra fields in .codex-plugin/plugin.json, including legacy execution surfaces such as hooks, agents, or skills, because it compares only the selected identity fields and interface. A package can therefore receive an ok: true report while its retained Codex manifest has gained an unreviewed runtime surface.

Triggers: When a checked package contains a legacy manifest with the expected identity but additional execution-related fields.

Suggested fix: Validate the legacy manifest against its closed expected field set, or explicitly reject all legacy runtime-surface fields before reporting success.

Suggested change
portable, legacy = data["portable_manifest"], data["codex_manifest"]
allowed = {"$schema", *IDENTITY, "extensions"}
portable, legacy = data["portable_manifest"], data["codex_manifest"]
allowed = {"$schema", *IDENTITY, "extensions"}
legacy_allowed = {*IDENTITY, "mcpServers", "interface"}
if set(legacy) != legacy_allowed:
raise PackageError("legacy_manifest_fields_differ")

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