Code quality, DX, and documentation improvements#100
Open
moshemalawach wants to merge 6 commits into
Open
Conversation
The workspace Cargo.toml declared edition = "2024" which does not exist. All individual crates already override to 2021, so this was silently ignored but would break if any crate removed its local edition field.
…lers Convert panicking unwrap/expect calls in production request handlers to proper error propagation. Fixes hash().unwrap(), try_into().unwrap(), and .first().unwrap() patterns. Also replaces a dbg!() macro with debug!() logging and resolves two stale TODO comments.
Add limit and offset query parameters (default: limit=100, offset=0) to prevent unbounded response bodies. Backwards-compatible — existing clients without query params receive up to 100 results.
Wraps docker-compose, cargo, and forge commands into simple make targets. Run 'make help' to see all available targets.
Replace the minimal 9-line README with comprehensive documentation including architecture overview, prerequisites, quick start guide, development commands, API endpoint tables, and documentation links.
- Log orphaned commitments in rollback paths instead of silently dropping - Clamp pagination limit to i64::MAX before casting to prevent overflow - Scope docker-clean to project images only (--rmi local)
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
"2024"to"2021"unwrap()calls with proper error propagation in client REST handlers; resolve stale TODO comments; replacedbg!()withdebug!()logginglimit/offsetpagination toGET /v1/commitments(default: limit=100, offset=0, backwards-compatible)Test plan
cargo buildsucceeds (edition fix)cargo clippy --all-targets -- -D warningspassescargo testunit tests passGET /v1/commitmentsreturns paginated results;?limit=10&offset=5works; no params defaults to limit=100make helpprints all available targets