From 195c936fa2cef6b5c88d74f90d5f83840058ca27 Mon Sep 17 00:00:00 2001 From: "Adam Perry @ OpenAI" Date: Thu, 18 Jun 2026 16:16:19 -0700 Subject: [PATCH] core: log AGENTS.md paths as URIs (#28989) ## Why No need to do path contortions when it's for our own logs. ## What Follow up on a previous PR's nit and update the path-types skill for future reference. --- .codex/skills/path-types/SKILL.md | 1 + codex-rs/core/src/agents_md.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.codex/skills/path-types/SKILL.md b/.codex/skills/path-types/SKILL.md index 006273001..87be423d5 100644 --- a/.codex/skills/path-types/SKILL.md +++ b/.codex/skills/path-types/SKILL.md @@ -34,6 +34,7 @@ Keep these requirements in mind while migrating code to conform with the above g * URIs should not yet be stored in rollouts, databases, or other persistent storage * path conversion errors: fail-closed for security-relevant paths, fail-open for UI/diagnostics * prefer small focused methods on `PathUri` or `LegacyAppPathString` over local helpers +* represent `PathUri` values as URIs in diagnostics It is OK if the conversion between paths and URIs is somewhat lossy as long as it will do the right thing for real users. diff --git a/codex-rs/core/src/agents_md.rs b/codex-rs/core/src/agents_md.rs index 05a1a901f..d0dc7026a 100644 --- a/codex-rs/core/src/agents_md.rs +++ b/codex-rs/core/src/agents_md.rs @@ -123,9 +123,9 @@ async fn read_agents_md( if size > remaining { tracing::warn!( - "Project doc `{}` exceeds remaining budget ({} bytes) - truncating.", - p.inferred_native_path_string(), - remaining, + path = %p, + remaining_bytes = remaining, + "project doc exceeds remaining budget; truncating" ); }