bottlerocket-os / bottlerocket-os/bottlerocket-settings-sdk
Why is NonNegativeInteger modeled as i32 instead of u32?
- Dominant language
- Rust
- Stars
- 5
- Forks
- 36
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 2
Description
Hi!
I funnily enough didn't check the underlying type of the modeled type `NonNegativeInteger`, we use the private range of AS numbers (the last few million) of the 32-bit AS range. I naively modeled it as a `NonNegativeInteger` and got a runtime validation failure when I tried setting a value in that range.
I am maybe mostly curious why you chose to model the NonNegativeInteger as i32 instead of u32?
Contributor guide
Research direction
No file or test is identified in the issue. Locate the definition and runtime validation for NonNegativeInteger, then compare its i32 representation with the 32-bit AS number range; done means the intended representation and handling of values in that range are resolved and documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100