Fix mission step sync when stepKey collides with claimed mission steps#358
Closed
cursor[bot] wants to merge 1 commit into
Closed
Fix mission step sync when stepKey collides with claimed mission steps#358cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Huge Cleanup (#355) added stepKey fallback matching in syncMissionFromRun. When a run graph contains both a mission-linked step and an unlinked orchestrator step sharing the same stepKey, sync could mark the wrong mission step failed and open mis-targeted interventions. Require unambiguous stepKey matches and ignore stepKey fallback for run steps when another step in the graph already claims the mission step via missionStepId. Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Owner
|
Closing: superseded by #359 (ade/missions removal). The files this patches (aiOrchestratorService.ts, missionLifecycle.ts) no longer exist on main; the stepKey-collision bug is moot. — 2026-05-29 ADE board cleanup |
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.
Bug and impact
Impact: After Huge Cleanup (#355),
syncMissionFromRuncould mark the wrong mission step as failed (and surface the wrongfailed_stepintervention) when a run graph contained:missionStepIdset,stepKeye.g.review)stepKeybut nomissionStepId(coordinator/legacy rows)The new stepKey fallback in
resolveMissionStepForRunStepmatched the mission step by metadatastepKeyfor the unlinked run step, even though that mission step was already owned by the linked run step.Trigger: Mission with a planned step keyed
review→ run includes linked step + unlinked coordinator/legacy step sharingreview→ coordinator/legacy step fails →syncMissionFromRunmarks the primary mission step failed.Root cause
#355 added stepKey-based mission step resolution without checking whether another step in the same run graph had already claimed the mission step via
missionStepId, and without requiring an unambiguous stepKey match across mission steps.Fix
resolveMissionStepForRunStepinmissionLifecycle.tsmissionStepId/metadata.orchestratorStepIdlinkagemissionStepIdValidation
npm exec vitest run src/main/services/orchestrator/aiOrchestratorService.test.ts -t "does not sync unlinked run steps"Related open PRs (not duplicated)
failed_stepinterventions (dedup metadata), not step targeting