fix(cg): unify Stylo test locks to prevent cascading test failures#637
fix(cg): unify Stylo test locks to prevent cascading test failures#637softmarshmallow merged 2 commits intomainfrom
Conversation
…ures The `html` and `htmlcss` test modules each had their own mutex guarding Stylo's process-global DOM slot. Since both locks protected the same shared state, tests from the two modules could run concurrently and corrupt Stylo, causing panics that poisoned the htmlcss lock (which used `.unwrap()`) and cascaded to all 22 htmlcss tests. Consolidate into a single `stylo_test::lock()` in lib.rs with poison recovery via `unwrap_or_else(|e| e.into_inner())`. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughThis change refactors test synchronization across the grida-canvas crate. A new centralized test-locking module ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
htmlandhtmlcsstest modules each had their own mutex guarding Stylo's process-global DOM slot. Since both locks protected the same shared state, tests from the two modules could run concurrently and corrupt Stylo, causing panics that poisoned thehtmlcsslock (which used.unwrap()) and cascaded to all 22 htmlcss tests.stylo_test::lock()inlib.rswith poison recovery viaunwrap_or_else(|e| e.into_inner()), matching the patternhtmlalready used.cargo testfailure on main after feat(htmlcss): CSS Grid layout + box-shadow support #635 was merged.Test plan
cargo test -p cgpasses (683 lib tests, 0 failures)cargo test --workspace --exclude grida-canvas-wasmpassestest-cratesworkflow passes🤖 Generated with Claude Code
Summary by CodeRabbit