Skip to content

Code quality, DX, and documentation improvements#100

Open
moshemalawach wants to merge 6 commits into
EYBlockchain:masterfrom
moshemalawach:improvements/phase-1
Open

Code quality, DX, and documentation improvements#100
moshemalawach wants to merge 6 commits into
EYBlockchain:masterfrom
moshemalawach:improvements/phase-1

Conversation

@moshemalawach
Copy link
Copy Markdown

Summary

  • fix: Correct workspace Cargo.toml edition from non-existent "2024" to "2021"
  • fix: Replace panicking unwrap() calls with proper error propagation in client REST handlers; resolve stale TODO comments; replace dbg!() with debug!() logging
  • feat: Add limit/offset pagination to GET /v1/commitments (default: limit=100, offset=0, backwards-compatible)
  • chore: Add Makefile with 15 targets wrapping docker-compose, cargo, and forge commands
  • docs: Expand README with architecture overview, prerequisites, quick start, development commands, API endpoint tables, and documentation links

Test plan

  • cargo build succeeds (edition fix)
  • cargo clippy --all-targets -- -D warnings passes
  • cargo test unit tests pass
  • GET /v1/commitments returns paginated results; ?limit=10&offset=5 works; no params defaults to limit=100
  • make help prints all available targets
  • Existing CI pipeline passes without regressions

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant