Conversation
|
| fingerprint = _trajectory_fingerprint(row_template) | ||
| if ( | ||
| fingerprint in self._seen_fingerprints | ||
| or fingerprint in batch_fingerprints | ||
| ): | ||
| continue |
There was a problem hiding this comment.
Affordance branches are collapsed
When two distinct Affordance branches produce identical trajectory samples, this global trajectory-only fingerprint treats the second branch as a duplicate. Because Affordance provenance and the compatibility key are attached only after this check, the second branch never receives its own candidate identity and cannot be scheduled, losing its lineage.
Prompt To Fix With AI
This is a comment left during a code review.
Path: embodichain/lab/sim/motion/expansion/coordinator.py
Line: 311-316
Comment:
**Affordance branches are collapsed**
When two distinct Affordance branches produce identical trajectory samples, this global trajectory-only fingerprint treats the second branch as a duplicate. Because Affordance provenance and the compatibility key are attached only after this check, the second branch never receives its own candidate identity and cannot be scheduled, losing its lineage.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Description
Add the source-neutral foundation for high-throughput expert trajectory generation.
This PR defines the shared contracts needed to combine Affordance and trajectory expansion across handwritten experts, MotionGenerator, Atomic Actions, and Task Program adapters. Runtime randomization and observation fan-out profiles are deliberately deferred until their physical and persistence owners exist. It intentionally keeps physical execution, fixed-scene restoration, candidate scheduling, and dataset persistence out of this layer.
Included
SourceAdapterboundary with handwritten-template and MotionGeneratorPlanResultadapters.ActionPlanTemplateAdapterfor explicit phase permissions.CandidateSpec:TrajectoryGenerationJobCfginto a reusable Generation Profile:ActionPlanTemplateAdapterand Atomic materialization helper.plan_transformhook:ActionPlanis validated first;ActionPlanis validated again before execution.Deliberately excluded
run-envcollector routing;Those belong in the next integration layer and should reuse these contracts instead of adding a second identity or configuration protocol.
Dependencies and relationship to existing PRs
Refs #670, #591, #594, #653
Validation
python docs/scripts/check_api_docs.py: 2259/2259 exports documented.git diff --checkpassed.Type of change
Checklist
Follow-up decision for #591 / #594
The fixed-scene host, LeRobot sink, PickUp contact validator, and Atomic Runtime execution remain deferred. They belong in the Coordinator/PhysicalExecutor layer and should consume this source adapter and CandidateSpec contract rather than be copied into the foundation.