Skip to content

[codex] avoid redundant uint64 varint casts#31

Merged
anthonyprintup merged 1 commit into
mainfrom
codex/review-u64-varint-casts
May 2, 2026
Merged

[codex] avoid redundant uint64 varint casts#31
anthonyprintup merged 1 commit into
mainfrom
codex/review-u64-varint-casts

Conversation

@anthonyprintup
Copy link
Copy Markdown
Owner

Summary

  • Emit direct varint_size(value) calls for generated uint64 encoded-size expressions instead of redundant static_cast<::protocyte::u64>(...) wrappers.
  • Call write_varint(writer, value) directly from the runtime write_uint64 helper.
  • Regenerate smoke outputs and add focused Python/C++ coverage for scalar, packed repeated, unpacked repeated, oneof, map, and runtime writer behavior.

Validation

  • clang-format --dry-run --Werror on touched C++ files
  • uv run pytest -q (99 passed)
  • smoke\build\msvc\protocyte_host_smoke.exe "write_uint64 emits canonical varint bytes"
  • git diff --check
  • Final smoke target rebuild through VsDevCmd.bat: ninja: no work to do

Emit direct varint_size calls for generated uint64 encoded-size expressions while preserving explicit casts for other scalar conversions.

Call write_varint directly from the uint64 runtime writer and regenerate smoke outputs.

Add focused Python codegen coverage plus a C++ smoke test for canonical uint64 varint bytes.
@anthonyprintup
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ 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 marked this pull request as ready for review May 2, 2026 20:43
@anthonyprintup anthonyprintup merged commit 0e1a8c6 into main May 2, 2026
8 checks passed
@anthonyprintup anthonyprintup deleted the codex/review-u64-varint-casts branch May 2, 2026 22:19
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