Skip to content

refactor(elastic)!: ASAPv1 only — drop the proto format, add goldens - #173

Closed
GordonYuanyc wants to merge 2 commits into
mainfrom
asapv1-only/elastic
Closed

GordonYuanyc wants to merge 2 commits into
mainfrom
asapv1-only/elastic

Conversation

@GordonYuanyc

Copy link
Copy Markdown
Collaborator

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 its tools/gen-proto entry; SketchEnvelope.elastic (18) is now reserved 18; reserved "elastic";. CountMinState stays (other sketches on main use it).
  • The Elastic section of tests/xtest_consumer.rs and its helpers. Elastic had no portable or native shim.

Added

  • Goldens elastic_4b_2x4 and elastic_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 to i32::MAX) and a 2x4 signed light layer down to i32::MIN. The stale file differs only in stale_copies (one byte). Both are checked in both directions.
  • The ASAPv1 docs no longer state a fixture count; they defer to the golden README.

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 warnings for 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

GordonYuanyc and others added 2 commits October 2, 2026 00:59
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>
@GordonYuanyc

Copy link
Copy Markdown
Collaborator Author

Outdated. ASAPv1 encodings and goldens landed in #232 and #235 against the current spec; removing the legacy formats is redone on current main in #206 and #207.

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