Skip to content

[codex] Add comprehensive root formatting check#25683

Merged
anp-oai merged 12 commits into
mainfrom
codex/just-fmt-check
Jun 2, 2026
Merged

[codex] Add comprehensive root formatting check#25683
anp-oai merged 12 commits into
mainfrom
codex/just-fmt-check

Conversation

@anp-oai
Copy link
Copy Markdown
Collaborator

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

Why

The root formatting entrypoints could drift: just fmt did not format the Justfile itself, and the CI-facing check recipe only checked Python scripts instead of matching everything formatted by just fmt.

What changed

  • Add a shared cross-platform Python formatter driver used by both just fmt and just fmt-check.
  • Run Justfile, Rust, Python SDK, and internal-script formatter groups concurrently while buffering each formatter group's output until it finishes.
  • Log formatter starts immediately, then print each formatter group's labeled output when it completes.
  • Keep the SDK lint-fix and Ruff formatting passes ordered, with source comments explaining their distinct roles and the check-mode equivalents.
  • Run Ruff through shared uv run --no-sync --with ruff overlays so formatting works on clean glibc Linux checkouts without installing the platform-specific SDK runtime wheel.
  • Show fmt-check help text in just -l and simplify CI to call the shared driver through just fmt-check.
  • Pin the general CI workflow to just@1.51.0 so its formatter agrees with the checked-in Justfile.
  • Add regression coverage for the thin Just recipes and the driver's formatter graph.

Validation

  • just fmt
  • just fmt-check
  • python3 -m pytest sdk/python/tests/test_artifact_workflow_and_binaries.py -k 'root_fmt or root_format' -q
  • pnpm run format
  • git diff --check
  • just -l | rg -n '^ fmt|fmt-check'
  • uvx --from uv==0.7.22 uv run --frozen --project sdk/python --no-sync --with ruff ruff check --diff sdk/python

Comment thread justfile Outdated
Comment thread justfile Outdated
@anp-oai
Copy link
Copy Markdown
Collaborator Author

anp-oai commented Jun 1, 2026

@codex review

Copy link
Copy Markdown
Contributor

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

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: 000561cd22

ℹ️ 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 justfile Outdated
@anp-oai anp-oai marked this pull request as ready for review June 1, 2026 21:16
Copy link
Copy Markdown
Contributor

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

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: 699944894e

ℹ️ 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 justfile Outdated
@anp-oai
Copy link
Copy Markdown
Collaborator Author

anp-oai commented Jun 1, 2026

@codex review

Copy link
Copy Markdown
Contributor

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

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: 1b3f0c3668

ℹ️ 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 justfile Outdated
Comment thread sdk/python/tests/test_artifact_workflow_and_binaries.py Outdated
Comment thread justfile
Comment thread justfile Outdated
Comment thread sdk/python/tests/test_artifact_workflow_and_binaries.py Outdated
Comment thread justfile Outdated
Comment thread justfile Outdated
Comment thread justfile
Comment thread sdk/python/tests/test_artifact_workflow_and_binaries.py Outdated
@bolinfest bolinfest self-requested a review June 1, 2026 23:04
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anp-oai I don't think my comments are blocking and I trust you to fix things as you see fit, so approving.

Unblocking #25156 is my higher-level goal here!

Comment thread scripts/format.py Outdated
Comment thread scripts/format.py Outdated
Comment thread scripts/format.py Outdated
@anp-oai anp-oai enabled auto-merge (squash) June 2, 2026 01:19
@anp-oai anp-oai merged commit 747f100 into main Jun 2, 2026
31 checks passed
@anp-oai anp-oai deleted the codex/just-fmt-check branch June 2, 2026 01:20
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 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