Repository navigation
refactor(coco)!: ASAPv1 only — drop the proto format, add a golden - #172
Closed
GordonYuanyc wants to merge 3 commits into
Closed
GordonYuanyc wants to merge 3 commits into
GordonYuanyc wants to merge 3 commits into
Conversation
Delete proto/cocosketch/cocosketch.proto (CocoSketchState), reserve the
SketchEnvelope oneof field 17 ("coco"), regenerate, and remove the Coco
section of the cross-language proto consumer. Coco serializes only as ASAPv1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bump asapv1_golden to the commit adding coco_3x8.hex, a 3x8 bucket table set directly: values at both ends of every msgpack uint width, empty, 31-byte, 32-byte and multi-byte UTF-8 keys, and unoccupied buckets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to the golden README A width that is not a power of two separates the spec's % cols fold from a mask fold. The fixture adds a 4-byte UTF-8 key. Docs no longer state how many kind_ids have fixtures; they point at the golden README's Coverage section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closed
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the ASAPv1-only series: one PR per sketch group, each off
main. This one removes CocoSketch's protobuf format; ASAPv1 (0x0c 0x00) is the only Coco format left, and it gets its first golden.Removed
proto/cocosketch/cocosketch.proto(CocoSketchState) and itstools/gen-protoentry;SketchEnvelope.coco(17) is nowreserved 17; reserved "coco";.tests/xtest_consumer.rsand its helpers. Coco had no portable or native shim.Added
coco_3x7(pushed to sketchlib-golden-bytes; submodule bumped): 15 of 21 buckets set directly; nil buckets, the empty key, a 31-byte fixstr / 32-byte str8 key, 2-, 3- and 4-byte UTF-8 keys, every uint width up tou64::MAX, and an occupied bucket holding 0. Checked in both directions.% colsfold: 11 of the 15 keys sit in odd columns, which a mask fold cannot produce (verified by swapping the fold to a mask and watching the test fail).Notes
seed_list[r]with% colsinstead of one seed with a mask, i.e. an algorithm change, not just a codec.coco.rs/coco/wire.rscomputehash as usize % cols, which differs from the spec's 64-bit% colson 32-bit targets whencolsis not a power of two.Verification (rustc 1.99)
cargo fmt --check; clippy-D warningsfor all four CI feature sets;RUSTDOCFLAGS="-D warnings" cargo doc; gen-proto drift clean;asapv1_golden,--lib -- coco,pbt -- coco,xtest_consumer. The reviewer hand-decoded the golden and re-checked placement with an independent xxh3 program. Implemented and reviewed by separate agents; review findings are addressed in the third commit.🤖 Generated with Claude Code