FN-5960: add unlinked mission advisory reporting

Add explicit visibility for active missions that remain intentionally unlinked to goals.

- document the no-backfill decision with an engine-emitted unlinked mission advisory
- add a scheduler reporter that emits one deduped workflow insight for active missions without goal links and falls back to task logs when insight storage is unavailable
- cover the advisory reporter and scheduler integration with focused tests
- clear PR remediation errors when changing the Create Pull Request base branch

Files changed:
 docs/missions.md                                   |   2 +
 .../dashboard/app/components/PrCreateModal.tsx     |   2 +
 packages/engine/src/__tests__/scheduler.test.ts    |   8 +
 .../unlinked-missions-advisory-reporter.test.ts    | 170 +++++++++++++++++++++
 packages/engine/src/scheduler.ts                   |  18 +++
 .../src/unlinked-missions-advisory-reporter.ts     | 117 ++++++++++++++
 6 files changed, 317 insertions(+)

Fusion-Task-Id: FN-5960

Fusion-Task-Lineage: efdbb4f5-fbd5-4ed7-9b9e-58706041d993
This commit is contained in:
gsxdsm
2026-06-04 23:36:28 -07:00
parent fa36d68621
commit fb6b441fbe
6 changed files with 317 additions and 0 deletions

View File

@@ -52,6 +52,8 @@ Mission ↔ goal links are created and removed deliberately as part of normal pl
Mission Manager shows an **Unlinked** indicator on active mission cards when `linkedGoalCount` is zero. This is a read-only attention badge so operators can quickly find active missions that still need an explicit goal association.
The engine also emits a workflow insight with advisory key `unlinked_missions_advisory` when it first observes one or more active missions with zero goal links. The insight is advisory only, includes only the affected mission ids plus a count, and is deduped to one stable row so it does not spam on every scheduler heartbeat.
### Task → Goal provenance
When a mission feature is linked or triaged into a task, Fusion does **not** copy goal ids onto the task row. Instead, task goal provenance is always derived from the mission link owned by `MissionStore`: