Skip to content

refactor(runtime): share executable and process helpers - #1581

Merged
mldangelo-oai merged 17 commits into
mainfrom
mdangelo/codex/shared-process-contracts
Oct 16, 2026
Merged

mldangelo-oai merged 17 commits into
mainfrom
mdangelo/codex/shared-process-contracts

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Share executable-path handling and process signatures between SDK and Deep Scan callers.

Depends on #1577.

Changes

  • Move the existing path helper to plugin-owned shared source and generate its SDK copy.
  • Reuse native binding lookup and diagnostic handling.
  • Cover preflight stream and write-callback failures with child cleanup.

Testing

For a5c465c69b31, source-matched checks passed 34 process, 11 executable-path, and four archive controls, plus 24 preflight functions and eight selected executor controls. Worker checks cover fresh and resumed discovery/reducer launches, concurrent scans, inherited settings, intentional overrides, executable/home origins, and cancellation. All five portable plugin checks passed: Ruff lint and format, SDK build:ci, and the source-compatibility checker and its tests.

This evidence covers selected executor controls, not a complete executor-suite run. Hosted CI for this candidate remains to be verified.

Risk and rollout

Depends on #1577. Executable lookup, authentication, environment forwarding, working directories, permission overrides, direct-provider routing, and per-scan configuration remain compatible. Existing commands and diagnostic text are preserved. Native packaging and platform behavior remain part of final pre-merge validation.

Public disclosure review

Reviewed the source, synthetic fixtures, commit metadata, description, and public PR artifacts.

  • 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-10-14T20:32:57.331162Z 5a5f4e4 New commits
🔒 Security Review ✅ Completed 2026-10-14T20:34:35.973037Z 5a5f4e4 New commits
ℹ️ 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.

@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 11, 2026 00:28

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: dff80de72d

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

Copilot AI 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.

🟢 Approval recommended

The refactor preserves existing behavior and includes focused coverage for the newly unified failure path.

0 open findings

What changed in this PR

Refactors executable-path and process contracts into shared plugin/SDK helpers, building on #1577.

Changes:

  • Shares executable-path handling and SDK spawn types.
  • Consolidates native binding loading and inferred helper types.
  • Reuses preflight stdio diagnostics and tests write-callback failures.
File Description
CONTRIBUTING.md Documents generated executable-path source.
evals/​secret-discovery/​runtime.mts Updates the shared helper import.
plugins/​codex-security/​mcp-app/​src/​executable-path.ts Adds the canonical path helper.
plugins/​codex-security/​mcp-app/​src/​native.ts Consolidates native binding lookup.
plugins/​codex-security/​mcp-app/​src/​deep-scan/​executor.ts Uses the shared helper and inferred return type.
plugins/​codex-security/​mcp-app/​src/​deep-scan/​permission-profile-preflight.ts Reuses stdio failure handling.
plugins/​codex-security/​mcp-app/​tests/​test_deep_scan_permission_profile_preflight.ts Covers write-callback failures.
sdk/​typescript/​scripts/​check-package.mjs Validates the generated module package contents.
sdk/​typescript/​scripts/​generate-models.cjs Generates the SDK helper copy.
sdk/​typescript/​src/​deduplication/​codex-review.ts Uses the shared spawn signature.
sdk/​typescript/​src/​executable-path.ts Adds the generated SDK helper.
sdk/​typescript/​src/​feedback.ts Uses the shared spawn signature.
sdk/​typescript/​src/​runtime.ts Reexports shared paths and defines the spawn contract.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 11, 2026 14:59

Copy link
Copy Markdown
Collaborator Author

@codex review

Copilot AI 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.

🟢 Approval recommended

The refactor preserves existing behavior and includes focused coverage for the newly shared failure path.

0 open findings

🧠 Review effort: Balanced

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 776e01fd03

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

@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 11, 2026 15:54

Copy link
Copy Markdown
Collaborator Author

@codex review

Copilot AI 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.

🔵 Needs a closer look

Process spawning, native bindings, generated packaging, and Deep Scan lifecycle behavior span multiple runtime boundaries and depend on #1577.

0 open findings

🧠 Review effort: Balanced

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: c9c56cd542

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

@mldangelo-oai mldangelo-oai changed the title refactor: share executable paths and process contracts refactor(runtime): share executable and process helpers Oct 12, 2026

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed a5c465c69b31 in two source-review passes, including relevant callers and contracts.

Approved. No new actionable findings in the reviewed scope.

Validation: CI-helper TypeScript compilation and plugin bundling passed locally; native binaries came from CI with matching compiled source inputs. Focused SDK tests passed: feedback.test.ts. Focused MCP tests passed: test_deep_scan_permission_profile_preflight.ts. The full cross-platform suite was not run locally; Windows execution remains unverified here.

Base automatically changed from mdangelo/codex/shared-workbench-messages to main October 13, 2026 13:49

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed the PR diff at 5a5f4e4c7d58 in three independent source passes, followed by verification of the changed runtime paths.

The shared executable-path helper preserves Windows absolute and drive-relative path behavior, and its SDK copy is included in generation and package output. The consolidated stdio handler preserves retryable failures from both stream events and write callbacks. Native binding selection remains unchanged. No blocking source findings.

Static review; I did not rerun the test suites or native platform checks.

@mldangelo-oai
mldangelo-oai merged commit 70404e7 into main Oct 16, 2026
67 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/shared-process-contracts branch October 16, 2026 03:42
@github-actions github-actions Bot mentioned this pull request Oct 16, 2026
3 tasks done
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.

5 participants