Skip to content

[codex] Use empty checks in runtime and codegen#33

Merged
anthonyprintup merged 1 commit into
mainfrom
codex/use-empty-checks
May 8, 2026
Merged

[codex] Use empty checks in runtime and codegen#33
anthonyprintup merged 1 commit into
mainfrom
codex/use-empty-checks

Conversation

@anthonyprintup
Copy link
Copy Markdown
Owner

Summary

  • Replace range emptiness checks in the runtime with .empty() where the type exposes it.
  • Emit .empty() for generated fixed repeated array validation instead of comparing .size() with zero.
  • Regenerate checked smoke outputs and update handwritten smoke assertions to use .empty().

Root Cause

Generated fixed-array validation and several runtime helpers encoded non-empty checks as .size() != 0u or equivalent. That made emitted interfaces less idiomatic and inconsistent with container APIs that already expose .empty().

Validation

  • uv run pytest (99 passed)
  • git diff --check

Notes

  • C++ smoke configure was attempted earlier in this workspace but the shell does not have clang-cl on PATH, so that build path was not run locally.

@anthonyprintup anthonyprintup marked this pull request as ready for review May 8, 2026 20:08
@anthonyprintup
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

ℹ️ 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".

@anthonyprintup anthonyprintup merged commit 64f39fb into main May 8, 2026
8 checks passed
@anthonyprintup anthonyprintup deleted the codex/use-empty-checks branch May 8, 2026 20:11
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