Fix EventBus context arguments and formalize event schemas - #1210
Merged
rickwierenga merged 8 commits intoAug 19, 2026
Conversation
j0nch
marked this pull request as draft
August 18, 2026 00:57
j0nch
marked this pull request as ready for review
August 18, 2026 03:40
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.
Summary
Fix EventBus context factories that did not follow the positional calling semantics of their decorated public methods, and formalize the EventBus instrumentation and schema contracts so the same class of bug and metadata drift is less likely in future drivers.
evented_operation()invokes a context factory with the original call arguments:A decorated operation and its context factory therefore need compatible positional and keyword semantics. For operations with validated, normalized, derived, measured, or completion-only context, this PR documents explicit
event_operation()construction inside the method as the preferred approach.Problem
The audit found two failure modes that only appear when an EventBus subscriber is active:
TemperatureController.hold_temperature(120)passed120into a shared context factory'stemperatureparameter. Hardware behavior remained correct, but the event reportedtarget_temperature=120instead of the configured target and omitted the requested duration. Positionalwait_for_temperature(timeout, tolerance)calls were similarly vulnerable.TypeErrors. Valid calls such as positionalVSpin.spin(...)andLiquidHandler.move_picked_up_resource(to, ...)could fail in their context factories before the frontend operation ran.The same positional-capacity issue affected later optional arguments on several LiquidHandler operations.
Implementation changes
VSpin.spin().current_temperatureon successfultemperature_controller.wait_for_temperature.completedevents.An audit of all current
evented_operation()call sites found no remaining signature mismatches. Existing BenchCel, Access2, incubator, shaker, machine, and PreciseFlex factories were verified before being left unchanged.Documentation and contributor contract
This PR also establishes a canonical EventBus documentation structure:
duration,timeout,target_temperature,current_temperature,relative_centrifugal_force,resources,source,destination, andvolume.@evented_operation(...)for straightforward invocation-context projections whose factory matches the method's calling semantics.event_operation()construction when context depends on validation, normalization, resolved resources, derived parameters, measured values, or completion state.This keeps EventBus consistency semantic rather than inheritance-based, which is important for PLR's independent vendor/device frontends.
Compatibility
current_temperatureis a backward-compatible completed-event addition forwait_for_temperature.Verification
94 passed, 20 subtests passedgit diff --check: clean