Repository navigation
fix: device material check after restart; PLR materials in action results - #396
Merged
Merged
Conversation
…onfig.type check, so a restart does not put devices holding preset carriers into maintenance
…t imports its carrier lazily
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two core gaps found while running the TestLab station on dev.
config.type(require_plr_config_type→find_plr_resource_class) before any material tree is rebuilt. The lookup only sees already-imported classes; its registry fallback imports the module of the registry entry (e.g.pkg.resources.warehouses). A driver-package factory that imports the class it returns inside the function body (here the core presetBottleCarrier) leaves the class invisible after that import, so the device went into maintenance (TestLab: 6 process devices). A fresh database does not hit it because building the graph calls the factory. The built-in preset modules are registered inplr_additional_res_reg, butregister()only ran later into_plr_resources.find_plr_resource_classnow callsregister()first, so packages no longer need a module-level import as a workaround. The regression test reproduces it in a fresh interpreter with a lazily importing factory; it fails on dev and passes here.ResultInfoEncoderserialised a returned PLR resource through__dict__. A PLR material with an authority uuid is now returned as{"uuid": ...}, the same shape as a ResourceSlot result, so drivers do not have to convert it themselves.TestLab on dev + this branch: fresh DB two runs, restart, single run, both workflows concurrently — all 25/25, zero cross-task overlap per device, inventory consistent across restarts. Host-like probe (registry built as the station does): dev + the package without its module-level import → class not found; this branch → found.