Skip to content

Harden Windows source workflows - #7

Merged
amasiye merged 3 commits into
mainfrom
develop
Sep 1, 2026
Merged

amasiye merged 3 commits into
mainfrom
develop

Conversation

@amasiye

@amasiye amasiye commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This pull request improves cross-platform compatibility and correctness, especially on Windows, and enhances the reliability of integer handling in runtime outcome decoding. It introduces more robust detection of host architecture, improves process handling for Windows, and ensures portable decoding of 64-bit integers. The changes are covered by new and updated unit tests.

Cross-platform host detection and architecture handling:

  • Refactored host architecture detection logic to correctly identify the native architecture on Windows, even when running under a 32-bit PHP process, by checking relevant environment variables (PROCESSOR_ARCHITEW6432, PROCESSOR_ARCHITECTURE). This logic is now used in both packaging/php-runtime/build.php and src/Toolchain/Platform.php. [1] [2] [3] [4]
  • Added unit tests in PlatformTest to verify correct architecture detection for various Windows scenarios.

Process execution improvements on Windows:

  • Added a dedicated method for running artifacts on Windows in RunCommand.php, using direct descriptor inheritance to avoid issues with Symfony's input handling and to ensure proper interactive input behavior. [1] [2]

Portable 64-bit integer decoding and testing:

  • Rewrote integer decoding in RuntimeOutcomeReader to handle 64-bit signed and unsigned integers portably, avoiding reliance on platform-specific unpack('P') and ensuring correct behavior across platforms and integer boundaries.
  • Updated and added tests in RuntimeOutcomeReaderTest to verify decoding of host integer boundaries and to use a portable method for packing 64-bit integers. [1] [2] [3] [4] [5] [6]

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-09-01T16:42:07.625596Z 70cb1de Manual request
ℹ️ 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.

@amasiye

amasiye commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 70cb1de5c8

ℹ️ 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 src/Source/SourceDiscovery.php Outdated
@amasiye
amasiye merged commit 6be1d8a into main Sep 1, 2026
16 checks passed
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