serviceability-instruction: golden fixtures + CI guard (RFC-26 RF)#4059
Open
juan-malbeclabs wants to merge 1 commit into
Open
serviceability-instruction: golden fixtures + CI guard (RFC-26 RF)#4059juan-malbeclabs wants to merge 1 commit into
juan-malbeclabs wants to merge 1 commit into
Conversation
…+ CI guard (RFC-26 RF)
Extend the serviceability fixture generator to depend on the builder crate and
emit, per instruction, ix_<name>.bin (tag + borsh wire bytes) and ix_<name>.json
({ variant, data_hex, accounts:[{pubkey,is_signer,is_writable}] }) with fixed,
deterministic inputs. Covers a representative set exercising the trickiest
layouts: create_device (variable dz_prefix), delete_device (atomic close),
create_link, create_subscribe_user (optional feed), create_user (length-detected),
clear_topology / assign_topology_node_segments (batched), set_global_config.
Add `make generate-fixtures-check` (regenerate + fail on drift) and a
`fixtures-check` job in the rust CI workflow.
Refs #4026, RFC-26.
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.
Summary
RFC-26 RF: golden fixtures for the instruction builders + a CI drift guard.
doublezero-serviceability-instructionand emit, per instruction,ix_<name>.bin(wire bytes = tag + borsh) andix_<name>.json({ variant, data_hex, accounts: [{pubkey, is_signer, is_writable}] }) from fixed, deterministic inputs.create_device(variable dz_prefix),delete_device(atomic close),create_link,create_subscribe_user(optional feed),create_user(length-detected),clear_topology/assign_topology_node_segments(batched),set_global_config(config PDA + all 8 pools).make generate-fixtures-check(regenerate + fail on drift, scoped to the emitted.bin/.json) and afixtures-checkjob in therustworkflow.These fixtures capture byte-for-byte the current SDK trailing convention (they will drive Go/Python/TS parity in a later phase).
Testing Verification
make generate-fixtures-checkpasses (regenerated output is byte-identical to the committed fixtures); a hand-edited fixture makes it fail as expected.Closes #4026. Part of RFC-26 (rfcs/rfc26-rust-instruction-builder-library.md).
PR stack (RFC-26 builder library)
Stacked PRs, merge in order (each based on the previous one's branch):
R10 (commands/* migration + program-test) is the final PR and will carry the global changelog entry.