Overview
Audit #[repr], #[derive] order, and serde attributes across every
public type. Small stable enums get #[repr(u8)]; #[derive] clauses
follow the canonical order; single-field newtypes use
#[serde(transparent)]; public-facing enums use
#[serde(rename_all = "snake_case")] unless an existing wire contract
prevents it; deserialized config / input DTOs use
#[serde(deny_unknown_fields)].
Context
rules/global_rules.md §Compiler Attributes — §#[repr], §#[derive],
§Serde conventions.
- Canonical derive order:
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default.
Tasks
Acceptance criteria
References
rules/global_rules.md — §Compiler Attributes
Overview
Audit
#[repr],#[derive]order, and serde attributes across everypublic type. Small stable enums get
#[repr(u8)];#[derive]clausesfollow the canonical order; single-field newtypes use
#[serde(transparent)]; public-facing enums use#[serde(rename_all = "snake_case")]unless an existing wire contractprevents it; deserialized config / input DTOs use
#[serde(deny_unknown_fields)].Context
rules/global_rules.md§Compiler Attributes — §#[repr], §#[derive],§Serde conventions.
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default.Tasks
#[repr(u8)]toSide,OptionStyle,OptionType, and anyother small stable enum (coordinate with upstream
financial_types— avoid double-repr)
#[derive(...)]to the canonical sequence; stripunjustified
Default/Ord/Copy#[serde(deny_unknown_fields)]on every input DTO#[serde(rename_all = "snake_case")]on public-facing enums unlessan existing wire contract forbids it; document the exception
Acceptance criteria
cargo clippy --all-targets --all-features --workspace -- -D warningscleancargo test --all-features --workspaceclean (serde round-trips)References
rules/global_rules.md— §Compiler Attributes