Skip to content

fix: mask cache eviction - #69

Merged
antouhou merged 1 commit into
mainfrom
fix-mask-cache-eviction
Aug 20, 2026
Merged

fix: mask cache eviction#69
antouhou merged 1 commit into
mainfrom
fix-mask-cache-eviction

Conversation

@antouhou

@antouhou antouhou commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Improved shape-effect mask caching during rendering.
    • Added accurate tracking of cached mask usage and cleanup.
    • Prevented unnecessary mask regeneration when cached effects are reused.
  • Tests

    • Expanded visual regression coverage for mask cache hits, generation, and cleanup metrics.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b7ed95d4-ab34-427a-a313-263ff612f99c

📥 Commits

Reviewing files that changed from the base of the PR and between 806836b and d50b1d8.

📒 Files selected for processing (4)
  • src/renderer/metrics.rs
  • src/renderer/rendering.rs
  • src/renderer/shape_effects.rs
  • tests/visual_regression.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The renderer now reuses shape-effect mask cache entries on effect-result cache hits. Per-frame metrics record collected masks in empty and normal render paths. Visual regression coverage verifies mask hits, generation, and collection.

Changes

Shape effect cache

Layer / File(s) Summary
Shape effect mask lookup
src/renderer/shape_effects.rs
resolve_shape_effects builds the mask cache key before the effect-result lookup and queries the mask cache when the effect result is cached.
Mask collection metrics and regression coverage
src/renderer/metrics.rs, src/renderer/rendering.rs, tests/visual_regression.rs
ShapeEffectCacheMetrics records collected masks. Empty and normal render paths store mask cleanup counts. The regression test checks mask hits, generated masks, and collected masks.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to d50b1

This localized cache-eviction change has no actionable merge-blocking risk remaining and is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the mask cache eviction fix implemented by the changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-mask-cache-eviction

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@antouhou
antouhou merged commit 8663e6e into main Aug 20, 2026
5 checks passed
@antouhou
antouhou deleted the fix-mask-cache-eviction branch August 20, 2026 18:44
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