fix(ci): clippy sort_by_key, overlay.rs unused variable#2
Conversation
…tion, asset hardening
Complete three runtime integrity tasks:
Task 1 — Suspension system completion:
- Zstd snapshot compression with magic-byte detection for backward compat
- Performance benchmark test verifies <500ms suspend, <1000ms resume targets
- 3 new regression tests (compressed roundtrip, size comparison, perf)
Task 2 — SDK panic elimination:
- Removed 5 expect("storage lock") calls via mutex recovery helper
- Removed 3 expect("rng lock") calls via mutex recovery helper
- All SDK functions now recover gracefully from mutex poison
Task 3 — Asset pipeline hardening:
- Replaced expect("texture_loader lock") with mutex recovery
- Replaced 12 expect("cache lock") calls with recovery helpers
- Added lock_entries/lock_id_map helpers for consistent mutex handling
All 79 tests pass. cargo fmt, clippy -D warnings clean.
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (116)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- collections.rs: 3 sort_by -> sort_by_key with Reverse - history.rs: 1 sort_by -> sort_by_key with Reverse - search.rs: 4 sort_by -> sort_by_key (1 ascending, 3 descending with Reverse) fix(tests): add Linux any_thread support for winit EventLoop in scene tests - Previously failed on Linux CI with 'EventLoop outside main thread' panic
Task 1 — Expanded SDK API surface: - New SdkState struct with timing (delta_time, frame_count, game_time) - Runtime module: 3 new Lua APIs (delta_time, frame_count, game_time) - Utility module: 2 new logging levels (warn, error) - Platform detection uses std::env::consts::OS (simpler, cross-platform) - All timing updated per-frame via SdkState::tick() Task 2 — Professional error model: - Created lua_err() helper to reduce repeated .map_err(|e| e.to_string()) - Cleaner error propagation throughout all SDK modules - Consistent error format across all 7 modules Task 3 — Developer experience polish: - SdkState shared across all modules (not duplicated state) - GameManager passes sdk_state through to GameSession - GameScene owns and manages SdkState lifecycle - Removed unused imports and dead code - Tests: 13 pass (7 RNG + 6 storage)
Task 1 — Expanded runtime module: - SdkState: FPS tracking with 0.5s window, uptime, pause/debug state - Runtime API: fps(), uptime(), set_paused(), is_paused(), set_debug(), is_debug(), architecture(), build_version(), engine_version() - Frame timing: delta_time, frame_count, game_time all updated per tick Task 2 — Professional math module (vibege.math): - Types: vec2(x,y), rect(x,y,w,h), color(r,g,b,a) - Utilities: clamp, lerp, inverse_lerp, remap, smoothstep, sign - Rounding: round, floor, ceil, abs - Geometry: distance, normalize, radians, degrees - Extrema: min, max Task 3 — Professional debug module (vibege.debug): - Debug draw: draw_rect (outline+fill), draw_line (point series), draw_circle (segment approximation), draw_text - Diagnostics: runtime_stats(), asset_stats() - No stubs — all functions are fully implemented 13 SDK tests pass. fmt, clippy, build all clean.
Task 1 — Professional render module: - Load textures from Lua via vibege.render.load_texture(key, data) -> width,height - Unload textures via unload_texture(key) - Draw sprites: draw_sprite(key, x, y, w, h) - Draw sub-textures: draw_subtexture(key, x, y, w, h, u1, v1, u2, v2, r, g, b, a) - Draw tinted: draw_tinted(key, x, y, w, h, r, g, b, a) - Query: has_texture(key), measure_text(text, char_w) -> w, h - Internal SdkTextureCache manages Lua-loaded texture handles Task 2 — Professional asset module (vibege.assets): - 10 functions: exists, is_loaded, metadata, size, asset_type, release, unload, enumerate, memory_usage, statistics Task 3 — Renderer architecture: - New SpriteSubtex DrawCmd variant with UV coords + tint color - draw_sprite_subtex(), draw_sprite_tinted() renderer APIs - Proper integration with existing texture slot manager - No stubs — all 168 lines fully implement 20 renderer tests + 13 SDK tests pass. fmt, clippy, build all clean.
Task 1 — Scene & Camera module (vibege.scene): - Camera state: position, zoom stored in SdkState - API: screen_size(), camera_position(), set_camera_position(), camera_zoom(), set_camera_zoom(), world_to_screen(), screen_to_world(), viewport() Task 2 — Animation module (vibege.animation): - Tween engine: active tweens updated per-frame in SdkState::tick - API: tween(id, duration, from, to, easing?), get_tween_value(), is_tween_done(), cancel_tween(), cancel_all_tweens(), tween_count() - 6 easing functions: linear, quad in/out/in-out, cubic in/out Task 3 — Persistence module (vibege.save): - File-based saves with SHA256 integrity checksums - Per-game isolated directories (./saves/<game_name>/) - API: save(slot, data), load(slot), delete(slot), exists(slot), enumerate(), metadata(slot) - Backward compatible with legacy saves without checksums 13 SDK tests pass. fmt, clippy, build all clean.
…SDK improvements Solitaire: - Full Klondike rules: Draw 1/3, waste, foundations, tableau - Undo (500 steps), hints, auto-complete, restart - Seeded shuffle via vibege.util.set_seed/random_int - Save/resume via vibege.save module - 5 themes (felt/walnut/midnight/modern/carbon), high contrast mode - Card rendering with shadows, suit symbols, rank labels - Drag-and-drop, double-click to foundation, keyboard shortcuts - Win detection, score, timer, move counter - Lua-native serialization for save data (no external deps) SDK improvements driven by game development: - InputManager: added is_mouse_button_released() - SDK input: added is_mouse_released() Lua binding - Live testing of all 11 SDK modules through game usage 71 tests pass. fmt, clippy, build all clean.
…anager Library: - Game details now show play time, last played (e.g. '3d ago'), and formatted duration (e.g. '1h 30m') - Update indicator shown inline in game list - Favourite star shown inline with name - Added format_duration() and format_days_ago() helpers - Better detail line: version, author, size, play time, plays Download Manager: - Added speed_bytes_per_sec, eta_secs, last_update to DownloadTask - DownloadQueue::update_progress() calculates transfer speed and ETA - Speed averaged over 0.5s window for stability 147 scene tests pass. fmt, clippy, build all clean.
…level, home scene sections, library grid/view/sort, download queue concurrent
Fixes two CI failures identified in PR #1: