Skip to content

Take chunk ids as DataChunk in the assignment builders - #227

Merged
define-null merged 3 commits into
mainfrom
defnull/typed-chunk-ids
Sep 18, 2026
Merged

define-null merged 3 commits into
mainfrom
defnull/typed-chunk-ids

Conversation

@define-null

@define-null define-null commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Assignment builders now accept DataChunk, avoiding repeated string parsing. The type lives in the dependency-free sqd-data-chunk crate and is re-exported by assignments and messages; neither depends on the other.

Wire formats are unchanged. Breaking Rust API changes require scheduler updates: builder IDs are typed, and DataChunk::new takes &str and returns Option with stricter validation.

Validated with 92 workspace tests, Clippy, formatting, and all assignments feature combinations. Mainnet conversion verified 6.36 million chunks before the unchanged implementation was extracted into the shared crate.

define-null and others added 3 commits September 18, 2026 16:25
The assignment builders now take a `DataChunk` instead of a string, so a
caller that already holds the parts no longer formats an id only for the
builder to parse it back.

`DataChunk` stores its hash as a NUL-padded `[u8; 8]`, becomes `Copy`,
and enforces the 5-to-8 word-character rule the split builders applied.
`new` returns `Option` instead of panicking, and `last_hash()` is added.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@define-null
define-null merged commit 28307e8 into main Sep 18, 2026
3 checks passed
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