Repository navigation
refactor(univmon)!: ASAPv1 only — drop the proto envelope field, add goldens - #176
Closed
GordonYuanyc wants to merge 2 commits into
Closed
GordonYuanyc wants to merge 2 commits into
GordonYuanyc wants to merge 2 commits into
Conversation
UnivMon serializes only as ASAPv1 (kind_id 0x10 0x00).
- proto: reserve SketchEnvelope field 15 ("univmon"); UnivMonState and
UnivMonLayer stay in univmon.proto because hydra.proto's HydraCell still
embeds them. Regenerated src/proto/generated.
- tests/xtest_consumer.rs: drop the univmon.pb check and its g-sum helpers.
- asapv1_golden -> e2086f0: univmon_str_l2_2x4_h2, univmon_i64_l2_2x4_h2 and
univmon_empty_l2_2x4_h2, built through L2HH::apply_delta and
HHHeap::update (no hashing). tests/asapv1_golden.rs checks serialize ==
golden, the hand-read metadata and payload, the decoded state and the
re-encode.
- docs: fixture counts say seven kind_ids; features.md and tests.md follow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e docs
- asapv1_golden -> 946e5c5: univmon_{str,i64,empty}_l3_2x4_h5 replace the
l2_2x4_h2 files. 3 layers, 2 rows, 4 columns, heap 5, heap lengths
[3, 1, 2]; i64 keys add int16 and uint64.
- Fixture docs point at the golden README's Coverage section instead of a
count; spec 3.15 states the empty pyramid's key_type is "u64".
- features.md: SketchEnvelope's sketches, with UnivMonState only in HydraCell.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 14, 2026
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 UnivMon from the protobuf envelope; ASAPv1 (0x10 0x00) is the only UnivMon format left, and it gets its first goldens.Removed
SketchEnvelope.univmon(15) is nowreserved 15; reserved "univmon";(sketch_envelope::SketchState::Univmonis gone).proto/univmon/univmon.protostays becausehydra.proto'sHydraCellembedsUnivMonState.tests/xtest_consumer.rsand its helpers. UnivMon had no portable or native shim.Added
l2fails), pushed to sketchlib-golden-bytes; submodule bumped:univmon_str_l3_2x4_h5: string keys; layer 0 holds the Count Sketch golden's signed cells, so both itsl2values are uint64; an incomplete layer; total weight 70000 (standard mode).univmon_i64_l3_2x4_h5: the same withi64keys includingi64::MIN,-129,2^32.univmon_empty_l3_2x4_h5: a fresh pyramid (key_type "u64").apply_delta, heapupdate,set_total_weight,mark_layer_candidates_incomplete); no hash reaches the bytes. Checked in both directions; the reviewer hand-decoded them against spec §3.15.key_type = "u64".Notes
update_mode2) is only reachable through a hashed insert, so no golden covers it; the golden README says so.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,xtest_consumer(against the Go producer),--lib -- univmon,pbt -- univmon. Implemented and reviewed by separate agents; review findings are addressed in the second commit.🤖 Generated with Claude Code