Skip to content

refactor(native): remove unused OS primitives and proofs - #1192

Merged
mldangelo-oai merged 2 commits into
mainfrom
mdangelo/codex/candidate-migration-cleanup
Oct 2, 2026
Merged

mldangelo-oai merged 2 commits into
mainfrom
mdangelo/codex/candidate-migration-cleanup

Conversation

@mldangelo-oai

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

Copy link
Copy Markdown
Collaborator

Summary

Remove unused native OS primitives and their primitive-only proofs after their production callers were migrated. Retain the native operations used by the supported CLI, SDK, and plugin.

Changes

  • Remove unused Rust exports, TypeScript bindings, flags, and corresponding proof cases.
  • Remove the Windows CI step dedicated to the retired locking implementation and update native documentation.
  • Keep Unix account lookup and the live Windows path, identity, handle, and atomic file operations.
  • Name the username argument accurately in the embedded-NUL diagnostic.

This PR contains only the native portion of the original cleanup: nine files, 60 additions, and 1,149 deletions. It targets main independently of the MCP and SDK cleanup PRs.

Testing

On the latest native commit:

  • Ruff check and format, SDK CI compilation, portable source compatibility, and all nine compatibility-checker tests passed.
  • Rust 1.97.1 formatting and host Clippy with the locked dependencies and warnings denied passed.
  • Native release build and the existing Unix account-lookup proof passed.
  • The rebuilt binding rejects embedded-NUL usernames with the corrected diagnostic.
  • git diff --check passed; removed primitives have no production callers on main.

Risk and rollout

No public commands, flags, accepted values, environment variables, or defaults change. Existing credential, unsafe-path, scan-integrity, and worker settings protections remain in place. The complete native platform and package-install CI matrix must pass for this standalone head before merging.

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 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-02T21:50:48.002298Z 35cdc0c New commits
🔒 Security Review ✅ Completed 2026-10-02T21:51:37.392968Z 35cdc0c 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.

Base automatically changed from dev/kyleb/python-free-candidate-normalization to main October 2, 2026 18:28
@mldangelo-oai
mldangelo-oai force-pushed the mdangelo/codex/candidate-migration-cleanup branch 2 times, most recently from 6d18c5a to db68016 Compare October 2, 2026 19:11
@mldangelo-oai mldangelo-oai changed the title refactor: simplify native, scan, and SDK internals refactor(native): remove unused OS primitives and proofs Oct 2, 2026
@mldangelo-oai
mldangelo-oai requested a balanced review from Copilot October 2, 2026 21:21

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.

Copilot review overview

🟢 Approval recommended

Removed symbols have no remaining repository callers, and the identified diagnostic wording issue is non-blocking.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
What changed in this PR

Removes obsolete native OS primitives and their proofs while retaining operations used by the plugin.

Changes:

  • Removes unused Unix and Windows native APIs and flags.
  • Simplifies platform proofs and Windows CI.
  • Updates native binding types and documentation.
File Description
.github/​workflows/​native-windows.yml Removes retired lock interoperability step.
plugins/​codex-security/​native/​README.md Documents retained native functionality.
plugins/​codex-security/​native/​binding.mts Narrows the Unix binding to account lookup.
plugins/​codex-security/​native/​proof-windows.mts Removes proofs for retired Windows operations.
plugins/​codex-security/​native/​proof.mts Retains only Unix account-lookup proofs.
plugins/​codex-security/​native/​src/​unix.rs Removes unused Unix primitives.
plugins/​codex-security/​native/​src/​windows.rs Removes unused Windows operations.
plugins/​codex-security/​native/​windows-binding.mts Narrows Windows binding interfaces.
plugins/​codex-security/​native/​windows-flags.mts Removes unused constants.

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

Comment thread plugins/codex-security/native/src/unix.rs Outdated

@kmbroai kmbroai 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 native API removals and retained callers. Rust formatting, SDK CI compilation, portable source checks, and all nine compatibility-checker tests pass locally. The complete native, platform, and package CI run now passes on this head; native rebuild coverage is from CI. No blocking findings.

@mldangelo-oai
mldangelo-oai merged commit 9b75176 into main Oct 2, 2026
69 of 85 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/candidate-migration-cleanup branch October 2, 2026 22:27
@github-actions github-actions Bot mentioned this pull request Oct 2, 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.

4 participants