FN-5679: default new missions to stopped state

Ensure mission creation always starts in a stopped planning state with autopilot off.

- Force MissionStore createMission to ignore create-time autopilotEnabled and persist stopped defaults
- Update mission POST route behavior to stop auto-watching on create and keep optional create-time updates scoped
- Add/adjust core and dashboard tests to assert stopped-by-default creation semantics
- Document mission autopilot creation behavior and add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5679-missions-default-stopped.md         |  7 +++++++
 docs/missions.md                                       |  4 +++-
 .../mission-factory-parity.integration.test.ts         |  6 +++---
 packages/core/src/__tests__/mission-store.test.ts      | 18 ++++++++++++++++++
 packages/core/src/mission-store.ts                     |  5 +++--
 packages/dashboard/src/__tests__/mission-e2e.test.ts   |  8 +++++---
 packages/dashboard/src/mission-routes.ts               |  9 +--------
 7 files changed, 40 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-5679

Fusion-Task-Lineage: 05eff3cb-07d8-4b52-ac7f-065979e78816
This commit is contained in:
gsxdsm
2026-05-29 15:45:20 -07:00
parent 91f568a9b0
commit 668e3a5099
7 changed files with 40 additions and 17 deletions

View File

@@ -176,6 +176,8 @@ Manual activation is available through `fn mission activate-slice <slice-id>`.
## Mission Autopilot
Missions are always created stopped (`status: "planning"`, `autopilotEnabled: false`, `autoAdvance: false`).
Autopilot must be enabled explicitly after creation (for example via start/update actions).
When `autopilotEnabled` is on, Fusion can watch completion events and progress missions automatically.
State machine:
@@ -187,7 +189,7 @@ State machine:
Typical flow:
1. Mission is watched (missions created/updated with `autopilotEnabled: true` are watched immediately)
1. Mission is watched (missions updated with `autopilotEnabled: true` or explicitly started are watched)
2. Task completion updates feature status
3. If a slice is complete, autopilot activates next pending slice
4. When milestones are all complete, mission transitions to complete