docs: auto-update for PR #2974 — test(governance-types): golden discriminant tests for GroupOp and RootOp#2989
Closed
meroreviewer[bot] wants to merge 1 commit into
Closed
docs: auto-update for PR #2974 — test(governance-types): golden discriminant tests for GroupOp and RootOp#2989meroreviewer[bot] wants to merge 1 commit into
meroreviewer[bot] wants to merge 1 commit into
Conversation
Contributor
Author
There was a problem hiding this comment.
🤖 AI Code Reviewer
Reviewed by 1 agents | Quality score: 85% | Review time: 135.5s
✅ No Issues Found
All agents reviewed the code and found no issues. LGTM! 🎉
🤖 Generated by AI Code Reviewer | Review ID: review-91d5d2eb
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.
Automatic Documentation Update
Opened automatically after PR #2974 merged.
Each block shows the documentation change as a diff (added lines in green, removed in red); expand "Why this changed" for the source rationale.
Documentation changes
architecture/local-governance.html— Add golden-byte discriminant tests for all GroupOp variants; Add golden-byte discriminant tests for all RootOp variants; Pin HybridTimestamp::zero() Borsh encoding as a named constant with a self-consistency testWhy this changed (source: PR #2974)
26 frozen byte-vector constants (GOLDEN_GROUP_OP_NOOP through GOLDEN_GROUP_OP_CASCADE_UPGRADE) are defined using all-zeros/empty field data. A new test
group_op_discriminants_are_goldendecodes each constant with the currentGroupOpenum and asserts the decoded value matches the expected variant. After a successful decode it also re-encodes and asserts the byte length matches, catching golden vectors with accidental trailing bytes. All failures are accumulated into a Vec so the test reports every broken ordinal in one run rather than stopping at the first panic.10 frozen byte-vector constants (GOLDEN_ROOT_OP_GROUP_CREATED through GOLDEN_ROOT_OP_NAMESPACE_CREATED) are defined. Each is encoded as NamespaceOp::Root wrapping the given RootOp variant, so byte[0]=0 (NamespaceOp::Root discriminant) and byte[1]=RootOp ordinal. A new test
root_op_discriminants_are_goldendecodes each constant asNamespaceOp, asserts it matchesNamespaceOp::Root(<expected variant>), and checks re-encoded length. Failures are accumulated identically to the GroupOp test.A named constant
GOLDEN_HLC_ZERO(24 bytes) captures the Borsh encoding ofHybridTimestamp::zero(). A new testhlc_zero_golden_bytes_are_self_consistentasserts thatborsh::to_vec(&HybridTimestamp::zero())equalsGOLDEN_HLC_ZERO, and additionally asserts that the last 24 bytes ofGOLDEN_GROUP_OP_CASCADE_UPGRADEequalGOLDEN_HLC_ZERO, so the two constants cannot drift apart when HybridTimestamp's layout changes.Generated by
ai-reviewer update-docs. Nothing was auto-merged.