Skip to content

feat(cli): add chunksetbin and chunksetbinstate - #1

Merged
eventvoid merged 1 commit into
mainfrom
feat/chunksetbin
Sep 3, 2026
Merged

feat(cli): add chunksetbin and chunksetbinstate#1
eventvoid merged 1 commit into
mainfrom
feat/chunksetbin

Conversation

@eventvoid

Copy link
Copy Markdown
Member

Summary

CLI side of chunkdb/chunkdb#17 (CHUNKSETBIN, server 1.3+).

  • chunksetbin <cx> <cy> <hex> / chunksetbinstate <cx> <cy> <hex>, or --in <file> to send raw bytes from a file. The layouts are what chunkbin / chunkbinstate print, so chunkbin --out x followed by chunksetbin --in x copies a chunk. Also available in shell.
  • chunkclient.CommandWithPayload writes the request line, the bytes, and the empty-line terminator, then reads the response as before.
  • Argument validation is shared between the top-level command and shell (parseChunkSetBinArgs); the unit table covers hex, bad hex, bad ints, missing payload, and --in combined with hex. README and CHANGELOG updated.

Test plan

  • gofmt, go vet, go test ./...
  • end to end against a server from chunkdb main at 872ac88 (4×4×4-bit geometry): hex write + chunkbin read-back, chunkbinstate --out then chunksetbinstate --in, server-side length error surfaced, shell path
  • CI

Binary chunk writes over the CHUNKSETBIN command (chunkdb server 1.3+).
The payload is given as hex or read from a file with --in, in the byte
layouts chunkbin / chunkbinstate print, so chunkbin --out output can be
written back unchanged. Both commands work in shell as well.

chunkclient gains CommandWithPayload, which writes the request line, the
raw bytes, and the empty-line terminator before reading the response.
@eventvoid
eventvoid merged commit 47fae70 into main Sep 3, 2026
2 checks passed
@eventvoid
eventvoid deleted the feat/chunksetbin branch September 3, 2026 11:04
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