feat(checker): add OrderedStepChecker + CheckerManager wiring - #9
Open
keyneszeng wants to merge 1 commit into
Open
feat(checker): add OrderedStepChecker + CheckerManager wiring#9keyneszeng wants to merge 1 commit into
keyneszeng wants to merge 1 commit into
Conversation
Adds a stateful checker that runs its sub-checkers in sequence (step 1 must be satisfied before step 2 is evaluated). Mirrors Hub OrderedStepChecker production usage. Two design decisions: - OrderedStepChecker accepts either options.steps (raw config) plus an injected registry, or options.checkers (pre-built instances). This avoids an ESM circular import. - CheckerManager.createChecker is taught to handle OrderedStepChecker explicitly (recursively resolves each sub-config via this.createChecker and passes the pre-built instances to the OrderedStepChecker), the same pattern as CompositeChecker. Cross-repo: mirrors the Python implementation added in the companion PR to AxisDataCleaning.
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
Adds a stateful checker that runs its sub-checkers in sequence (step 1 must be satisfied before step 2 is evaluated). Mirrors Hub
OrderedStepCheckerproduction usage — the primitive behind multi-phase LIBERO tasks.Why the CheckerManager change is required
OrderedStepCheckeris a composite-style checker (it owns sub-checkers), and we need a way to instantiate its sub-checkers without introducing an ESM circular import (checker -> index -> checker). Two design points:OrderedStepCheckeraccepts eitheroptions.steps(raw config) plus an injectedoptions.registry, oroptions.checkers(pre-built instances).CheckerManager.createCheckeris taught to handleOrderedStepCheckerexplicitly: it recursively resolves each sub-config viathis.createChecker(same pattern asCompositeChecker) and passes the pre-built instances in. This is the path production tasks will use.I verified this end-to-end with mock data:
CheckerManagercorrectly instantiates the OrderedStepChecker + 2 sub-checkers (BodyContact + PositionDelta), and the ordered step logic returnstrueonly when all sub-checkers pass in order.Cross-repo coordination
check()calls.Task config schema (matches Hub)
{ "type": "OrderedStepChecker", "steps": [ {"type": "RelativePositionBoundsChecker", ...}, {"type": "GripperOpenChecker", ...} ], "allow_reentry": false }Checklist
CheckerManagerchange mirrorsCompositeCheckerhandlingreset()resetscurrentStepand recursively resets sub-checkersgetStatus()/getProgress()per-step