You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Add bounded range export for C commit-message bodies #1327
The C API already exports Java-compatible commit-message bodies, but its
export function serializes the entire handle without an output limit. An
embedding engine with a size-limited RPC cannot select smaller groups or
reject excessive output until encoding and allocation have already occurred.
Solution
Keep the existing API and add:
CommitMessage::serialize_with_limit(max_bytes) in core, checking before
appending bytes to the output while preserving Java v14 body encoding.
A C query for the number of messages in a standard message handle.
A C export function taking offset, count and a cumulative body-byte
limit, returning the existing byte-array result and ownership convention.
Reject invalid/overflowing ranges. An exceeded byte limit should return ResourceExhausted, no partial array, and leave the source usable so the caller
can retry a smaller range. An empty range at or before the end should be valid.
Keep host framing and Java list wrapping outside the API. The byte limit bounds
accumulated body lengths, not peak memory: temporary metadata rows, vector
capacity and result conversion can allocate additional memory.
Anything else?
Coverage should include Java fixture equality, exact and cumulative limits,
range overflow, empty ranges, retry and output lifetime. Format Table export
should remain unsupported. This is a focused follow-up to #1257 rather than
another cross-process protocol. Prepared with AI assistance.
Activity