Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3cd3bcce37
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if twins: | ||
| new_home = twins[0] | ||
| else: | ||
| new_home = layout.insert_layer(kdb.LayerInfo(*held)) |
There was a problem hiding this comment.
Keep displaced layers out of IHP enum slots
When a prior module has activated IHP, the generic activation above prunes IHP's empty, fixed layer indices, and layout.insert_layer here can reuse one of those indices for the displaced foreign tuple. The added (250, 0) regression takes this branch and leaves nonempty geometry there; if a later default IHP test calls ihp.PDK.activate() while the cached locked_cell remains, IHP cannot restore its reserved slot without the same locked-cell relocation problem, so its enum may resolve to the foreign layer. Allocate a slot outside all registered enum reservations and add a generic-to-IHP regression.
AGENTS.md reference: AGENTS.md:L14-L15
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #552 +/- ##
==========================================
+ Coverage 91.66% 91.68% +0.01%
==========================================
Files 216 216
Lines 30533 30533
Branches 5672 5672
==========================================
+ Hits 27989 27993 +4
+ Misses 1458 1457 -1
+ Partials 1086 1083 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@benvial could you review this one? GitHub won't let me add you as a reviewer. |
Three tests in tests/meep/test_physical_layers.py failed depending on test order: an earlier chain of PDK switches left two (2, 0) layers in the shared layout. A module-scoped autouse fixture now restores the generic layer table before and after every test module.
3cd3bcc to
e8be4be
Compare
Three tests in
tests/meep/test_physical_layers.pyfail depending on test order. I saw them on #548 (ubuntu, seed 2179762284) and #550 (macos, seed 1753024304). They pass alone and on main.I bisected the Linux order down to four tests in four modules:
tests/palace/test_magnetostatic_config.py::test_reversing_a_source_keeps_the_mesh_and_flips_only_its_directionleaves IHP active. Activating IHP deletes the empty generic layers.tests/fdtd/test_runtime_compatibility.py::test_artifact_simulation_is_a_deprecated_aliasregisters a raw (2, 0) in the freed slot 0.tests/palace/test_via_merge_clip_plumbing.py::test_clipping_does_not_hide_a_short_inside_one_barre-activates the generic PDK. gdsfactory's restore callsLayout.move_layer/delete_layer, which raise on locked cells, and it swallows the error. The layout then holds two (2, 0) layers.tests/fdtd/test_monitor_names.py::test_xy_false_ignores_name_without_deprecation_warning.LAYER.SLAB150writes to one (2, 0) layer,kcl.layer(2, 0)reads the other, and the slab region is empty.The root is in gdsfactory (9.51.0) and I did not change it. This PR adds
restore_generic_pdk()totests/_helpers.pyand a module-scoped autouse fixture intests/conftest.pythat runs it before and after every test module. It names each generic slot as the enum does, moves a foreign layer out of a generic slot and merges duplicate layers. It unlocks cells only while it does that. Nothing undersrc/changes.Checked: the first 1688 tests of the failing Linux order plus the three tests went from 3 failed to 1689 passed. The 4-test chain went from 3 failed to passing. The full suite passes with both seeds.
tests/test_generic_pdk_restore.pyadds three regression tests for the helper.