Repository navigation
refactor(elastic)!: ASAPv1 only — drop the proto format, add goldens - #173
Closed
GordonYuanyc wants to merge 2 commits into
Closed
GordonYuanyc wants to merge 2 commits into
GordonYuanyc wants to merge 2 commits into
Conversation
Delete proto/elasticsketch/elasticsketch.proto (ElasticState) and reserve
SketchEnvelope field 18 ("elastic"); regenerate src/proto/generated. Drop
the Elastic check from tests/xtest_consumer.rs. ASAPv1 (0x0b 0x00) is
Elastic's only serialization.
Add the elastic_4b_2x4 and elastic_4b_2x4_stale golden fixtures (bump
asapv1_golden) and their cases in tests/asapv1_golden.rs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…o the README Set the eviction flag on the Elastic fixtures' free bucket, a state a vacated bucket keeps, and bump asapv1_golden to the regenerated bytes. The spec and message_pack_format.md point to the golden README's Coverage section instead of counting fixtures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 Elastic's protobuf format; ASAPv1 (0x0b 0x00) is the only Elastic format left, and it gets its first goldens.Removed
proto/elasticsketch/elasticsketch.proto(ElasticState) and itstools/gen-protoentry;SketchEnvelope.elastic(18) is nowreserved 18; reserved "elastic";.CountMinStatestays (other sketches onmainuse it).tests/xtest_consumer.rsand its helpers. Elastic had no portable or native shim.Added
elastic_4b_2x4andelastic_4b_2x4_stale(pushed to sketchlib-golden-bytes; submodule bumped), built from fixed state, never hashed: 4 heavy buckets (a free bucket that keeps its eviction flag, the reachable state merges leave behind; a 31-byte fixstr flow id; the empty flow id; a 32-byte str8 flow id; votes across uint widths up toi32::MAX) and a 2x4 signed light layer down toi32::MIN. The stale file differs only instale_copies(one byte). Both are checked in both directions.Notes
Elastic's Octo deltas never used the proto, so no codec loses its only format. sketchlib-go has no Elastic ASAPv1 codec yet; its PR mirrors these goldens.
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 -- elastic,xtest_consumer. The reviewer hand-decoded both goldens and confirmed the stale fixture's construction is hash-free. Implemented and reviewed by separate agents; review findings are addressed in the second commit.🤖 Generated with Claude Code