Skip to content

refactor(plugin): colocate runtime payload contract - #686

Merged
soyeon-oai merged 1 commit into
mainfrom
codex/plugin-payload-contract
Aug 27, 2026
Merged

refactor(plugin): colocate runtime payload contract#686
soyeon-oai merged 1 commit into
mainfrom
codex/plugin-payload-contract

Conversation

@soyeon-oai

@soyeon-oai soyeon-oai commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move the canonical runtime payload contract next to the authored plugin source so package builders can share one source-owned file list.

Changes

  • move plugin-files.json from the TypeScript SDK package to plugins/codex-security
  • update the SDK builder, package checks, smoke test, and runtime tests to read the new location
  • keep source-snapshot tests independent of repository Git metadata

Testing

  • pnpm dlx bun@1.3.14 test --timeout 30000 ./tests-ts/build-plugin.test.ts — 6 passed
  • pnpm dlx bun@1.3.14 test --timeout 30000 ./tests-ts/runtime.test.ts --test-name-pattern 'keeps native scan tools|keeps installed-package plugin lookup' — 2 passed
  • pnpm run build:plugin — generated 118 declared runtime files
  • node scripts/check-plugin-source.mjs — verified the generated payload is untracked
  • pnpm run format
  • git diff --check

Risk and rollout

Low risk. The payload list is unchanged; only its canonical location and consumers change. Package generation still fails if a declared file is missing.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

Change impact

The package builder reads the same unchanged payload contract from the authored plugin directory instead of the SDK directory.

flowchart LR
  subgraph column_0["Canonical source"]
    direction TB
    node_0["Plugin-owned payload contract<br/><code>plugin-files.json</code>"]
  end
  subgraph column_1["Package tooling"]
    direction TB
    node_1["Build the declared runtime payload<br/><code>build-plugin.mjs</code>"]
    node_2["Check the packed artifact<br/><code>check-package.mjs</code>"]
  end
  subgraph column_2["Generated result"]
    direction TB
    node_3["Same allowlisted plugin files<br/><code>_bundled_plugin</code>"]
  end
  node_0 -->|"defines"| node_1
  node_0 -->|"defines"| node_2
  node_1 -->|"materializes"| node_3
  class node_0 changed
  class node_1 changed
  class node_2 affected
  class node_3 affected
  classDef changed fill:#d7f5e5,stroke:#237a4b,color:#111
  classDef affected fill:#e6f0ff,stroke:#3569a8,color:#111
  classDef context fill:#f2f3f5,stroke:#6e7781,color:#111
Loading

Limits: This PR does not publish a package; the payload contract contents are unchanged.

Source evidence (4)

Collection limits

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-27T21:03:08.043897Z 08f3288 PR opened
🔒 Security Review Completed 2026-08-27T21:03:54.718383Z 08f3288 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@soyeon-oai
soyeon-oai merged commit c61b46e into main Aug 27, 2026
41 of 68 checks passed
@soyeon-oai
soyeon-oai deleted the codex/plugin-payload-contract branch August 27, 2026 21:29
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.

2 participants