Skip to content

Add typed file URIs#26840

Merged
anp-oai merged 19 commits into
mainfrom
codex/path-uri
Jun 8, 2026
Merged

Add typed file URIs#26840
anp-oai merged 19 commits into
mainfrom
codex/path-uri

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Why

Codex needs stable file: URI identifiers that can cross process and operating-system boundaries without eagerly interpreting them as native paths. Existing fields also need to keep accepting absolute path strings during migration.

What changed

  • Add codex-utils-path-uri with a validated, immutable PathUri wrapper that currently accepts only file: URLs.
  • Expose URI-level basename, parent, and join operations that preserve authorities and percent encoding without guessing the source operating system.
  • Keep native conversion explicit through AbsolutePathBuf and the current host rules.
  • Serialize as canonical URI text while accepting both URI text and legacy absolute native paths during deserialization.
  • Add adversarial coverage for Windows-looking and POSIX paths, UNC authorities, encoded metadata characters, non-UTF-8 POSIX paths, URI hierarchy operations, and legacy serde round trips.

anp-oai added a commit that referenced this pull request Jun 7, 2026
Comment thread codex-rs/utils/path-uri/src/tests.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/tests.rs Outdated
anp-oai added a commit that referenced this pull request Jun 8, 2026
Comment thread codex-rs/utils/environment-id/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/environment_path.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
@anp-oai anp-oai changed the title Add typed cross-platform path URIs Add typed file URIs Jun 8, 2026
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs
Comment thread codex-rs/utils/path-uri/src/lib.rs
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
Comment thread codex-rs/utils/path-uri/src/tests.rs Outdated
@anp-oai anp-oai marked this pull request as ready for review June 8, 2026 22:32
@anp-oai anp-oai requested a review from a team as a code owner June 8, 2026 22:32
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

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: 14a6f970c1

ℹ️ 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 codex-rs/Cargo.toml
Comment thread codex-rs/utils/path-uri/src/lib.rs Outdated
@anp-oai anp-oai merged commit ffec7c0 into main Jun 8, 2026
46 checks passed
@anp-oai anp-oai deleted the codex/path-uri branch June 8, 2026 23:33
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants