FN-5678: add branch-group data model foundation

Establish per-mission/per-planning branch-group persistence and task metadata plumbing for shared auto-merge behavior.

- add `branch_groups` schema, indexes, exports, and store types for mission/planning branch assignment
- wire task source metadata branch-context helpers and branch-group row handling into core store flows
- add branch-group and migration coverage plus roadmap schema-version assertion wording fix
- add published changeset and storage doc note for the new branch-group persistence layer
- preserve forward-only migration safety by advancing schema to 96 and gating branch-group migration at `< 96`

Files changed:
 .changeset/per-mission-automerge-foundation.md     |  11 ++
 docs/storage.md                                    |   1 +
 packages/core/src/__tests__/backup.test.ts         |  32 ++++
 .../core/src/__tests__/branch-group-store.test.ts  | 148 ++++++++++++++++++
 packages/core/src/__tests__/db-migrate.test.ts     |  40 +++++
 packages/core/src/__tests__/db.test.ts             |  16 ++
 packages/core/src/__tests__/mission-store.test.ts  |  16 ++
 packages/core/src/db.ts                            |  52 ++++++-
 packages/core/src/index.ts                         |   2 +-
 packages/core/src/mission-store.ts                 |  19 ++-
 packages/core/src/mission-types.ts                 |   4 +
 packages/core/src/store.ts                         | 171 ++++++++++++++++++++-
 packages/core/src/types.ts                         |  59 +++++++
 13 files changed, 556 insertions(+), 15 deletions(-)

Fusion-Task-Id: FN-5678
Fusion-Task-Lineage: cd6e5312-a9c5-475f-a0de-1d3090395bdd
This commit is contained in:
gsxdsm
2026-05-29 11:15:47 -07:00
parent 91137ecb51
commit 72214132d2
13 changed files with 556 additions and 15 deletions

View File

@@ -0,0 +1,11 @@
---
"@runfusion/fusion": minor
---
Add per-mission/planning branch-group data-model foundations in `@fusion/core`.
- Introduce durable `branch_groups` storage with source linkage (`mission`/`planning`), branch metadata, PR state, status, and auto-merge override.
- Add `TaskStore` branch-group APIs: create/get/getBySource/list/update/setTaskBranchGroup.
- Persist `Task.autoMerge` and `Mission.autoMerge` as optional overrides.
- Reuse `Task.branchContext.groupId` for task↔group linkage (no separate `branchGroupId` column).
- Bump project schema version to `94` with migration coverage and schema assertions.