Skip to content

fix: Preserve parameter descriptions in Args-only docstrings - #5302

Merged
jbeckwith-oai merged 1 commit into
mainfrom
codex/fix-5298-docstring-indentation
Oct 5, 2026
Merged

jbeckwith-oai merged 1 commit into
mainfrom
codex/fix-5298-docstring-indentation

Conversation

@jbeckwith-oai

Copy link
Copy Markdown
Contributor

Summary

This pull request fixes lost parameter descriptions when a Google docstring begins with Args: and has no summary. Griffe cleans the already-cleaned text again, removing the parameter indentation and treating the section as the tool description. A leading newline preserves that indentation during parsing.

The regression test covers automatic and explicit Google style, wrapped parameter descriptions, and the existing empty tool description convention.

Test plan

  • Confirmed both regression cases fail before the fix.
  • Passed 138 focused schema, docstring, and tool-decorator tests.
  • Independent review found no actionable issues.
  • Passed the final verification wrapper: formatting, lint, mypy, Pyright, and 11,870 tests (70 skipped). Native macOS sandbox tests remain excluded under the repository's Codex execution policy.

Issue number

Fixes #5298

Checks

  • I've added new tests, if relevant
  • I've run .agents/skills/code-change-verification/scripts/run.sh
  • I've confirmed all verification steps pass
  • If using Codex, I've run an independent code review before submitting this PR

@jbeckwith-oai
jbeckwith-oai requested review from a team, rm-openai and seratch as code owners October 5, 2026 15:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 5, 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-05T15:14:17.971785Z fc85abc PR opened
🔒 Security Review ✅ Completed 2026-10-05T15:14:47.869584Z fc85abc 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.

@markstuart-oai markstuart-oai 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.

Reviewed the complete diff at fc85abc. The leading newline preserves parameter indentation when Griffe cleans the docstring again. The regression covers automatic and explicit Google style, wrapped descriptions, and the existing empty-description behavior. No actionable findings.

Hosted checks at this commit passed, including Python 3.10–3.14 tests, Windows tests, type checks, lint, and CodeQL. This was a source review; I did not run local workloads or a separate security scan.

@jbeckwith-oai
jbeckwith-oai added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit a726a9c Oct 5, 2026
25 checks passed
@jbeckwith-oai
jbeckwith-oai deleted the codex/fix-5298-docstring-indentation branch October 5, 2026 15:49
@openai-sdks openai-sdks Bot mentioned this pull request Oct 15, 2026
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.

function_tool: a Google docstring with only an Args: section loses every parameter description (griffe re-runs cleandoc and dedents the parameter lines)

2 participants