src/errors.rs is 990 lines with no #[cfg(test)] block, so every line counts
under the C5 rule and the file is already around twice the 500-line cap on
main (981 at d1e22fc). The ratchet in nodedb-preflight.sh fires on any
growth of an over-cap file, which makes a typed error variant — the normal way
this crate reports a new refusal — impossible to add without a waiver.
This is the waiver record for the wasm clock work: the review asked for a typed
refusal naming the policy and the missing clock, so
PagedbError::RetainPolicyNeedsClock { policy } adds 9 lines and trips C5. No
existing variant names both facts.
Proposal: split the file along the seams it already has —
CorruptionDetail, QuotaKind, Evictable and the impl PagedbError
constructors — into submodules of an errors/ directory, which brings the top
file under the cap and lets the ratchet do its job again. Alternative, if the
split is not wanted: teach the C5 check to accept a file that is over the cap at
base when the growth is only in the variant set, and say so in the message.
Found while fixing the wasm clock panic (#40). Not urgent, but it blocks every
future error variant.
src/errors.rsis 990 lines with no#[cfg(test)]block, so every line countsunder the C5 rule and the file is already around twice the 500-line cap on
main(981 atd1e22fc). The ratchet innodedb-preflight.shfires on anygrowth of an over-cap file, which makes a typed error variant — the normal way
this crate reports a new refusal — impossible to add without a waiver.
This is the waiver record for the wasm clock work: the review asked for a typed
refusal naming the policy and the missing clock, so
PagedbError::RetainPolicyNeedsClock { policy }adds 9 lines and trips C5. Noexisting variant names both facts.
Proposal: split the file along the seams it already has —
CorruptionDetail,QuotaKind,Evictableand theimpl PagedbErrorconstructors — into submodules of an
errors/directory, which brings the topfile under the cap and lets the ratchet do its job again. Alternative, if the
split is not wanted: teach the C5 check to accept a file that is over the cap at
base when the growth is only in the variant set, and say so in the message.
Found while fixing the wasm clock panic (#40). Not urgent, but it blocks every
future error variant.