Skip to content

fix(core): add safe environment file rejection diagnostics - #14

Closed
sam2tom wants to merge 1 commit into
mainfrom
codex/core-safe-http-rejection-diagnostics
Closed

sam2tom wants to merge 1 commit into
mainfrom
codex/core-safe-http-rejection-diagnostics

Conversation

@sam2tom

@sam2tom sam2tom commented Oct 7, 2026

Copy link
Copy Markdown

Problem and behavior

Environment file writes can return a rejection without a request-correlated reason in Core logs, making an upstream HTTP 400 insufficient to diagnose an upload failure.

Emit one api_request_rejected event for rejected requests that reach the environment file creation handler. Reuse the response writer and actual handler context so request IDs match X-Request-Id and trace/span IDs match traceparent. Log only the fixed operation/route, status, allowlisted code, and a finite reason classification; unclassified causes remain unknown. Do not log bodies, query strings, raw paths, resource IDs, arbitrary error messages, or credentials. HTTP responses, authorization, execution, and retry behavior are unchanged. Update the English and Chinese operations documentation together.

Validation

  • Standard full API package tests passed.
  • Focused affected API race tests and request/trace correlation tests passed.
  • Documentation navigation, translation/hash, locale, and structure checks passed.
  • A fresh independent review identified a trace-context omission; it was fixed and tested. A second fresh review found no actionable issues.
  • Full API race testing hits an allocation-limit failure in TestUnknownMembersRejectWithLinearAllocation, reproduced against the unmodified baseline using a HEAD overlay. This unrelated failure is not reported as passing.

No deployment or paid runtime reproduction was performed. This diagnostic does not establish the historical upload failure's cause or claim that uploads have recovered.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T14:50:41.118786Z 914e1d3 PR opened
ℹ️ 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.

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