Commit Graph

1394 Commits

Author SHA1 Message Date
gsxdsm
9488d66547 Merge pull request #1194 from plarson/feat/task-dependency-mutation
Add safe task dependency mutation
2026-05-30 16:33:13 -07:00
gsxdsm
24e0c44b4a FN-5731: require confirmation before archiving near-duplicate tasks
Stop silent near-duplicate auto-archive by routing duplicates through explicit user confirmation in API, engine, and dashboard flows.

- add new near-duplicate confirmation metadata/types and preserve duplicate task rows until confirmation
- update workflow routes and triage logic to return confirmation-required outcomes instead of immediate archive
- add TaskCard and TaskDetailModal UI/actions plus styling and hook updates for confirming or rejecting duplicate handling
- expand dashboard and engine tests and task-management docs to cover the new confirmation path

Files changed:
docs/task-management.md                            | 14 ++++-
packages/core/src/types.ts                         |  4 ++
packages/dashboard/app/api/legacy.ts               |  1 +
packages/dashboard/app/components/TaskCard.css     | 59 ++++++++++++++++++
packages/dashboard/app/components/TaskCard.tsx     | 46 +++++++++++++-
packages/dashboard/app/components/TaskDetailModal.css   | 34 +++++++++++
packages/dashboard/app/components/TaskDetailModal.tsx   | 71 +++++++++++++++++++++-
packages/dashboard/app/components/__tests__/TaskCard.test.tsx     | 71 ++++++++++++++++++++++
packages/dashboard/app/components/__tests__/TaskDetailModal.rendering.test.tsx   | 68 +++++++++++++++++++++
packages/dashboard/app/hooks/useTasks.ts           |  2 +-
packages/dashboard/src/__tests__/routes-tasks-near-duplicate.test.ts  | 45 ++++++++++++++
packages/dashboard/src/routes/register-task-workflow-routes.ts    |  9 ++-
packages/engine/src/__tests__/reliability-interactions/near-duplicate-intake.test.ts                  | 16 +++--
packages/engine/src/triage.ts                      | 19 +++---
14 files changed, 433 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-5731

Fusion-Task-Lineage: fa004129-7bce-4457-b8c3-ceb9fb953319
2026-05-30 15:52:46 -07:00
gsxdsm
20c1c3261e FN-5741: persist merge-request handoff shadow contract
Introduce Phase 1 write-only persistence for merge-request handoff acceptance across core and engine paths.

- add persisted merge-request record types, schema/settings plumbing, and store write-path support
- update merger/executor/self-healing/run-audit flows to emit and consume the handoff-accepted shadow marker
- expand core/engine/roadmap tests and docs to cover the new merge-request shadow contract
- add a patch changeset for @runfusion/fusion for this bundled package update

Files changed:
 .changeset/fn-5741-merge-request-shadow.md         |   5 +
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   2 +
 docs/settings-reference.md                         |   1 +
 packages/core/src/__tests__/db-migrate.test.ts     |  12 +-
 packages/core/src/__tests__/db.test.ts             |  34 ++--
 packages/core/src/__tests__/goals-schema.test.ts   |   2 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 .../src/__tests__/merge-request-record.test.ts     |  97 +++++++++++
 packages/core/src/__tests__/mission-store.test.ts  |   2 +-
 packages/core/src/__tests__/run-audit.test.ts      |   2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |   6 +-
 .../core/src/__tests__/settings-parity.test.ts     |   3 +
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/db.ts                            |  49 +++++-
 packages/core/src/index.ts                         |   4 +-
 packages/core/src/settings-schema.ts               |  30 ++++
 packages/core/src/store.ts                         | 189 ++++++++++++++++++++-
 packages/core/src/types.ts                         |  37 ++++
 .../src/__tests__/merger-merge-lifecycle.test.ts   |  54 ++++++
 .../merge-request-shadow-handoff.test.ts           |  74 ++++++++
 packages/engine/src/executor.ts                    |  15 +-
 packages/engine/src/merger.ts                      |  37 ++++
 packages/engine/src/run-audit.ts                   |   1 +
 packages/engine/src/self-healing.ts                |  16 +-
 .../src/store/__tests__/roadmap-store.test.ts      |   4 +-
 27 files changed, 646 insertions(+), 45 deletions(-)

Fusion-Task-Id: FN-5741

Fusion-Task-Lineage: 3fec14c3-47ff-4f14-bc02-24021518c992
2026-05-30 14:42:50 -07:00
gsxdsm
9c4e8edf39 FN-5733: enforce mission completion-gate assertions for live Goals mission
Realize the mission completion-gate contract by surfacing and enforcing structured assertion coverage for milestone completion.

- add milestone rollup signaling for prose-only acceptance criteria and wire it into mission-store completion gating
- update mission execution loop reliability paths so validator-trigger continuity is preserved across completion and startup recovery
- expose the new rollup flag in dashboard mission types/API and show an autopilot warning badge in MissionManager when prose exists without structured assertions
- extend core, engine, and dashboard tests plus mission docs, and add a patch changeset for @runfusion/fusion

Files changed:
 .changeset/fn-5733-mission-completion-gate.md      | 10 +++
 docs/missions-completion-contract.md               | 11 +++
 docs/missions.md                                   |  4 +
 packages/core/src/__tests__/mission-store.test.ts  | 81 ++++++++++++++++++++
 packages/core/src/mission-store.ts                 | 89 ++++++++++++++++++++++
 packages/core/src/mission-types.ts                 |  2 +
 packages/dashboard/app/api/legacy.ts               |  1 +
 .../dashboard/app/components/MissionManager.css    | 42 +++++++++-
 .../dashboard/app/components/MissionManager.tsx    | 22 +++++-
 .../components/__tests__/MissionManager.test.tsx   | 20 ++++-
 packages/dashboard/app/components/mission-types.ts |  1 +
 .../src/__tests__/mission-execution-loop.test.ts   | 23 ++++++
 .../mission-validation-trigger-gap.test.ts         | 41 ++++++++++
 packages/engine/src/mission-execution-loop.ts      | 21 ++++-
 14 files changed, 357 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-5733

Fusion-Task-Lineage: 259418c6-5404-4773-8fd2-db8d7e9cadd3
2026-05-30 14:07:20 -07:00
Phil Larson
a89e4edadb fix: address dependency mutation review comments 2026-05-30 13:53:34 -07:00
Phil Larson
b1c1a33d34 Add safe task dependency mutation 2026-05-30 13:43:36 -07:00
gsxdsm
5ff7f37c24 FN-5728: fake-timer store-watcher polling tests
Speed up store-watcher polling coverage by replacing real-time waits with deterministic fake-timer advancement.

- Apply Vitest fake timers to watch-active polling tests in store-watcher coverage.
- Advance timers explicitly around polling cycles and task creation to avoid interval-based delays.
- Ensure watcher teardown restores real timers and stops polling cleanly.
- Update FN-5048 speed audit notes with the fake-timer rewrite details and new runtime sample.

Files changed:
 docs/test-speed-audit-FN-5048.md                  |  4 ++--
 packages/core/src/__tests__/store-watcher.test.ts | 19 +++++++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-5728

Fusion-Task-Lineage: 7cc1eed6-fe86-458d-94c3-8d0780ff7828
2026-05-30 12:58:47 -07:00
gsxdsm
3255965ad5 FN-5715: gate mission feature completion on assertion validation
Prevent mission-linked done tasks from bypassing assertion validation and recover stalled validation triggers after restart.

- require assertion-linked done features to have a passed validator result before slice/milestone completion
- keep assertion-linked features in progress when linked tasks move to done/archived until validation passes
- restart mission loop recovery when needed and re-trigger done/archived implementing features that still need validation
- add regression coverage for scheduler, mission loop recovery, mission store completion gating, and reliability trigger continuity
- document the new FN-5715 reliability backstop and recovery behavior

Files changed:
 .changeset/fn-5715-mission-validation-trigger.md   |   7 +
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   1 +
 docs/missions.md                                   |  11 +-
 packages/core/src/__tests__/mission-integration.test.ts |   2 +-
 packages/core/src/__tests__/mission-store.test.ts  |  30 +++-
 packages/core/src/mission-store.ts                 |  19 ++-
 packages/engine/src/__tests__/mission-execution-loop.test.ts   |  95 +++++++++++++
 packages/engine/src/__tests__/reliability-interactions/mission-validation-trigger-gap.test.ts         | 151 +++++++++++++++++++++
 packages/engine/src/__tests__/scheduler.test.ts    |  54 ++++++++
 packages/engine/src/mission-autopilot.ts           |   7 +-
 packages/engine/src/mission-execution-loop.ts      |  25 ++++
 packages/engine/src/mission-feature-sync.ts        |  32 ++++-
 packages/engine/src/scheduler.ts                   |  12 +-
 14 files changed, 431 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-5715

Fusion-Task-Lineage: 98b1cbd6-6b68-40a0-b4b3-c512183adf8b
2026-05-30 09:43:02 -07:00
gsxdsm
033f74c458 FN-5714: reject linking features to non-active tasks
Gracefully handle feature-to-task linking when the referenced task is archived, deleted, or missing.

- enforce active-board task validation in mission store linkage path with clear error text
- return surfaced validation errors from fn_feature_link_task instead of throwing opaque failures
- add regression coverage in core and CLI extension tests for archived/non-active task references
- add changeset and sync Fusion skill reference docs with the new fn_feature_link_task behavior

Files changed:
 .changeset/fn-5714-link-archived-task.md           |  5 +++
 .../cli/skill/fusion/references/extension-tools.md |  2 +-
 .../skill/fusion/references/fusion-capabilities.md |  2 +-
 packages/cli/src/__tests__/extension.test.ts       | 50 ++++++++++++++++++++++
 packages/cli/src/extension.ts                      | 35 +++++++++------
 packages/core/src/__tests__/mission-store.test.ts  | 17 ++++++++
 packages/core/src/mission-store.ts                 |  9 ++++
 7 files changed, 106 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-5714

Fusion-Task-Lineage: d84c45cf-0a0d-47a3-81c5-f99d16e03ecf
2026-05-30 08:39:38 -07:00
gsxdsm
0dbb1cd6f9 FN-5704: escalate self-owned execution limbo instead of endless resume
Escalate reclaimable in-progress resume limbo into an explicit failure path to stop infinite self-healing loops.

- add resume-limbo escalation handling in self-healing/executor flow so self-owned stuck execution is failed and surfaced
- extend core task/run-audit types and retry-reset/store behavior to persist and expose the new escalation state
- add reliability interaction coverage for reclaim self-owned resume limbo escalation and update related schema/store/CLI/plugin tests and docs

Files changed:
 AGENTS.md                                          |   1 +
 docs/architecture.md                               |   2 +
 packages/cli/src/commands/__tests__/task.test.ts   |   2 +
 packages/core/src/__tests__/db-migrate.test.ts     |  12 +-
 packages/core/src/__tests__/db.test.ts             |  34 ++---
 packages/core/src/__tests__/goals-schema.test.ts   |   2 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 packages/core/src/__tests__/mission-store.test.ts  |   2 +-
 packages/core/src/__tests__/run-audit.test.ts      |   2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |   6 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/db.ts                            |  13 +-
 packages/core/src/manual-retry-reset.ts            |   1 +
 packages/core/src/store.ts                         |  37 ++++-
 packages/core/src/types.ts                         |  11 ++
 ...laim-self-owned-resume-limbo-escalation.test.ts | 168 +++++++++++++++++++++
 packages/engine/src/executor.ts                    |   5 +
 packages/engine/src/run-audit.ts                   |   1 +
 packages/engine/src/self-healing.ts                |  72 +++++++++
 .../src/store/__tests__/roadmap-store.test.ts      |   4 +-
 21 files changed, 345 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-5704

Fusion-Task-Lineage: c8f73d16-d95b-450f-a514-e7d3c2f7aebe
2026-05-29 20:05:14 -07:00
gsxdsm
668e3a5099 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
2026-05-29 15:45:20 -07:00
gsxdsm
0605d13ab5 FN-5675: add mission branch strategy and planning breakdown controls
Add mission-level branch strategy support and expose planning breakdown controls across mission flows.

- Extend mission/core data models and store logic to track and persist base-branch strategy metadata.
- Update mission API routes and legacy adapters to read/write new mission branch strategy fields.
- Enhance MissionManager and PlanningModeModal UX to configure branch strategy and planning breakdown behavior.
- Add/adjust coverage across core, dashboard, and roadmap plugin tests for mission branch and planning flow behavior.
- Add a changeset and mission docs updates for the new mission branch strategy behavior.

Files changed:
 .changeset/fn-5675-mission-branch-strategy.md      |   9 +
 docs/missions.md                                   |  13 ++
 packages/core/src/__tests__/db-migrate.test.ts     |  12 +-
 .../src/__tests__/db-mission-base-branch.test.ts   |  14 +-
 packages/core/src/__tests__/db.test.ts             |  34 ++--
 packages/core/src/__tests__/goals-schema.test.ts   |   2 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 packages/core/src/__tests__/mission-store.test.ts  | 148 +++++++++++++-
 packages/core/src/__tests__/run-audit.test.ts      |   2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |   6 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/db.ts                            |   9 +-
 packages/core/src/index.ts                         |   1 +
 packages/core/src/mission-store.ts                 |  64 ++++--
 packages/core/src/mission-types.ts                 |   9 +
 packages/dashboard/app/api/legacy.ts               |  23 ++-
 .../dashboard/app/components/MissionManager.tsx    | 226 +++++++++++++++++++--
 .../dashboard/app/components/PlanningModeModal.tsx |   9 +-
 .../components/__tests__/MissionManager.test.tsx   | 100 +++++++++
 .../PlanningModeModal.planning-flow.test.tsx       |  91 +++++++++
 packages/dashboard/app/components/mission-types.ts |   4 +
 .../dashboard/src/__tests__/mission-e2e.test.ts    |  49 ++++-
 packages/dashboard/src/mission-routes.ts           |  41 +++-
 .../src/store/__tests__/roadmap-store.test.ts      |   4 +-
 25 files changed, 808 insertions(+), 76 deletions(-)

Fusion-Task-Id: FN-5675

Fusion-Task-Lineage: cfd13c13-9eff-4b82-90c3-88505d51bfb2
2026-05-29 15:25:47 -07:00
gsxdsm
dae4c0ea5d FN-5696: backfill missing mission feature assertion links
Backfill and repair missing mission feature assertion links so validator coverage stays intact for legacy mission data.

- add MissionStore backfillFeatureAssertions with dry-run and mission-scoped repair support
- centralize feature assertion text derivation and reuse it for create/update/backfill flows
- add regression tests for repair behavior, idempotency, and dry-run semantics
- document the operator repair workflow and add a dedicated backfill script for FN-5696

Files changed:
 docs/missions.md                                  |   2 +
 packages/core/src/__tests__/mission-store.test.ts |  84 +++++++++++
 packages/core/src/mission-store.ts                | 116 ++++++++++++++-
 scripts/backfill-fn-5696-feature-assertions.mjs   | 174 ++++++++++++++++++++++
 4 files changed, 373 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-5696

Fusion-Task-Lineage: 483bf2cc-be03-4007-860b-66d841e6aa15
2026-05-29 13:58:13 -07:00
gsxdsm
bac12d1e28 FN-5695: sync feature assertions for late-added mission features
Close the assertion-graph gap by making mission feature assertions store-managed and automatically synchronized.

- add `sourceFeatureId` to contract assertions (types, schema migration, persistence, snapshot restore)
- auto-create/update/delete managed assertions when features are added, edited, or removed in `MissionStore`
- remove duplicate/manual assertion creation from mission routes and rely on centralized store behavior
- expand core, dashboard, engine, and plugin tests plus docs to cover validator behavior for later-added features

Files changed:
 docs/missions.md                                   | 11 ++-
 docs/storage.md                                    |  2 +-
 packages/core/src/__tests__/db-migrate.test.ts     | 12 ++--
 packages/core/src/__tests__/db.test.ts             | 34 ++++-----
 packages/core/src/__tests__/goals-schema.test.ts   |  2 +-
 packages/core/src/__tests__/insight-store.test.ts  | 10 +--
 packages/core/src/__tests__/mission-store.test.ts  | 82 +++++++++++++++++++---
 packages/core/src/__tests__/run-audit.test.ts      |  2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |  6 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |  2 +-
 packages/core/src/__tests__/task-documents.test.ts |  2 +-
 packages/core/src/db.ts                            | 11 ++-
 packages/core/src/mission-store.ts                 | 69 ++++++++++++++++--
 packages/core/src/mission-types.ts                 |  4 ++
 .../dashboard/src/__tests__/mission-e2e.test.ts    | 70 ++++++++++++------
 packages/dashboard/src/mission-routes.ts           | 16 +----
 .../src/__tests__/mission-execution-loop.test.ts   | 46 +++++++++++-
 .../src/store/__tests__/roadmap-store.test.ts      |  4 +-
 18 files changed, 288 insertions(+), 97 deletions(-)

Fusion-Task-Id: FN-5695
Fusion-Task-Lineage: 337f030c-e883-41aa-b982-13ebe45bd5ee
2026-05-29 13:35:13 -07:00
gsxdsm
b265d6b395 FN-5700: remove duplicate task autoMerge declarations
Clean up duplicate task autoMerge declarations across core schema, store mapping, and tests.

- Remove the redundant task-level autoMerge field from core Task types and DB schema expectations.
- Keep task hydration autoMerge mapping in a single path and normalize boolean conversion to explicit integer checks.
- Update affected core and roadmap store tests to match the deduplicated autoMerge surface.

Files changed:
 packages/core/src/__tests__/db-migrate.test.ts     | 12 ++++----
 packages/core/src/__tests__/db.test.ts             | 34 +++++++++++-----------
 packages/core/src/__tests__/goals-schema.test.ts   |  2 +-
 packages/core/src/__tests__/insight-store.test.ts  | 10 +++----
 packages/core/src/__tests__/mission-store.test.ts  |  2 +-
 packages/core/src/__tests__/run-audit.test.ts      |  2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |  6 ++--
 .../core/src/__tests__/store-merge-queue.test.ts   |  2 +-
 packages/core/src/__tests__/task-documents.test.ts |  2 +-
 packages/core/src/db.ts                            |  1 -
 packages/core/src/store.ts                         |  4 +--
 packages/core/src/types.ts                         |  5 ----
 .../src/store/__tests__/roadmap-store.test.ts      |  4 +--
 13 files changed, 39 insertions(+), 47 deletions(-)

Fusion-Task-Id: FN-5700

Fusion-Task-Lineage: d2d4d41e-31b1-44a0-9594-9d75056c59a2
2026-05-29 12:25:17 -07:00
gsxdsm
72214132d2 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
2026-05-29 11:16:00 -07:00
gsxdsm
a014c6d42d FN-5697: retry transient auto-merge failures and fix migration versioning
Treat transient auto-merge/provider abort errors as bounded retries while preserving correct schema migration ordering.

- Add transient merge retry handling with capped exponential backoff, queue re-enqueue, and exhaustion logging before failing tasks.
- Extend task/core types and evaluator evidence plumbing for merge transient retry tracking and MergeTransientRetryExhausted visibility.
- Add regression coverage for transient auto-merge retries and exhaustion behavior in merge error recovery tests.
- Resolve migration collision by promoting workflow_steps.gateMode migration to version 77, shifting subsequent migrations, and bumping schema version to 95.
- Add a changeset and architecture note documenting transient retry behavior.

Files changed:
 .changeset/fn-5697-auto-merge-transient-retry.md   |  5 ++
 docs/architecture.md                               |  1 +
 packages/core/src/db.ts                            | 85 +++++++++++----------
 packages/core/src/eval-types.ts                    |  1 +
 packages/core/src/store.ts                         | 19 +++--
 packages/core/src/types.ts                         |  7 ++
 packages/engine/src/__tests__/evaluator-evidence.test.ts       |  1 +
 packages/engine/src/__tests__/merge-error-recovery.test.ts     | 87 ++++++++++++++++++++++
 packages/engine/src/evaluator-evidence.ts          |  1 +
 packages/engine/src/project-engine.ts              | 68 +++++++++++++++++
 10 files changed, 231 insertions(+), 44 deletions(-)

Fusion-Task-Id: FN-5697

Fusion-Task-Lineage: c8be7374-7cb6-444e-9920-9227e05a43dc
2026-05-29 10:23:59 -07:00
gsxdsm
a312da63e4 FN-5674: add per-task auto-merge persistence and resolver
Add per-task auto-merge overrides to the core task model and persist/snapshot them through review transitions.

- add Task.autoMerge typing, storage row mapping, updateTask support, and DB schema migration to persist per-task auto-merge state
- snapshot settings.autoMerge onto tasks when moving into in-review when no explicit task override is set
- export resolveEffectiveAutoMerge to consistently resolve task-level override vs global settings precedence
- expand core tests for migration, persistence, movement, and merge behavior; update roadmap schema-version expectation to match the new schema version

Files changed:
 packages/core/src/__tests__/db-migrate.test.ts     | 10 +++----
 packages/core/src/__tests__/db.test.ts             | 34 +++++++++++-----------
 packages/core/src/__tests__/goals-schema.test.ts   |  2 +-
 packages/core/src/__tests__/insight-store.test.ts  | 10 +++----
 packages/core/src/__tests__/mission-store.test.ts  |  2 +-
 packages/core/src/__tests__/run-audit.test.ts      |  2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |  6 ++--
 .../core/src/__tests__/store-merge-queue.test.ts   |  2 +-
 packages/core/src/__tests__/store-movement.test.ts | 33 +++++++++++++++++++++
 .../core/src/__tests__/store-persistence.test.ts   | 18 ++++++++++++
 packages/core/src/__tests__/task-documents.test.ts |  2 +-
 packages/core/src/__tests__/task-merge.test.ts     | 19 ++++++++++++
 packages/core/src/db.ts                            |  9 +++++-
 packages/core/src/index.ts                         |  1 +
 packages/core/src/store.ts                         | 23 +++++++++++++--
 packages/core/src/task-merge.ts                    | 15 +++++++++-
 packages/core/src/types.ts                         |  7 +++++
 .../src/store/__tests__/roadmap-store.test.ts      |  4 +--
 18 files changed, 157 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-5674

Fusion-Task-Lineage: 8e1e3988-2e41-4d7a-9653-e88c36ec272c
2026-05-29 09:56:28 -07:00
gsxdsm
71e2aec5b7 FN-5663: add goal-citation audit trail to agent reasoning
Record goal citation evidence so agent reasoning can be traced end-to-end.

- add core goal citation types, extraction helper, persistence schema, and store APIs for citation create/list workflows
- add CLI support and tests for goal citation flows, including command wiring and regression coverage
- update docs and add a published changeset for @runfusion/fusion describing the new audit-trail capability

Files changed:
 .changeset/fn-5663-goal-citation-audit-trail.md    |  10 +
 docs/agents.md                                     |  15 ++
 docs/cli-reference.md                              |   6 +-
 packages/cli/src/__tests__/bin.test.ts             |   2 +
 .../cli/src/__tests__/goals-citations-cli.test.ts  |  82 ++++++++
 packages/cli/src/bin.ts                            |  19 +-
 packages/cli/src/commands/goals.ts                 |  43 +++++
 packages/core/src/__tests__/db-migrate.test.ts     |  10 +-
 packages/core/src/__tests__/db.test.ts             |  34 ++--
 .../src/__tests__/goal-citation-extractor.test.ts  |  56 ++++++
 .../src/__tests__/goal-citations-store.test.ts     | 175 +++++++++++++++++
 packages/core/src/__tests__/goals-schema.test.ts   |   2 +-
 packages/core/src/__tests__/insight-store.test.ts  |  10 +-
 packages/core/src/__tests__/mission-store.test.ts  |   2 +-
 packages/core/src/__tests__/run-audit.test.ts      |   2 +-
 packages/core/src/__tests__/secrets-schema.test.ts |   6 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |   2 +-
 packages/core/src/__tests__/task-documents.test.ts |   2 +-
 packages/core/src/db.ts                            |  51 ++++-
 packages/core/src/goal-citation-extractor.ts       |  56 ++++++
 packages/core/src/index.ts                         |  13 ++
 packages/core/src/store.ts                         | 210 ++++++++++++++++++++-
 packages/core/src/types.ts                         |  51 ++++-
 .../src/store/__tests__/roadmap-store.test.ts      |   4 +-
 24 files changed, 817 insertions(+), 46 deletions(-)

Fusion-Task-Id: FN-5663

Fusion-Task-Lineage: 720f2c4b-4363-464a-a76f-472ec6aca136
2026-05-29 08:25:38 -07:00
gsxdsm
230efa1cdc FN-5644: default AI merge commit body to summarize changes
Fusion-Task-Id: FN-5644

Fusion-Task-Lineage: 5cf0133b-2a14-4bb4-a1c4-2d5bef5793bc
2026-05-28 23:45:40 -07:00
gsxdsm
d78fbccacc FN-5643: fix gh api --json flag handling for PR fetches
Fusion-Task-Id: FN-5643

Fusion-Task-Lineage: 2eaba342-1ac7-4ebf-886e-acd22af637ee
2026-05-28 22:59:18 -07:00
gsxdsm
cec191eac3 FN-5638: migrate pi-ai and pi-coding-agent packages to @earendil-works scope
Fusion-Task-Id: FN-5638

Fusion-Task-Lineage: 6e99c156-5f6c-42e6-bd26-618e08ffd05f
2026-05-28 21:23:48 -07:00
gsxdsm
0e5ca34c61 refactor(FN-5633): AI merge reviewer uses the project reviewer/validator model
Drop the bespoke `merger.reviewerModel` setting. The AI merge reviewer now
resolves its model via `resolveValidatorSettingsModel` — the same
reviewer/validator lane used elsewhere (project validator → global validator →
project default) — falling back to the merger model only if that lane is empty.
Removes the setting from the type, schema default, and the Settings UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 19:53:11 -07:00
gsxdsm
b2dce7d852 Recovery: Re-land (Close source-imported GitHub issues on ta 2026-05-28 19:49:31 -07:00
gsxdsm
29ac58f8d0 feat(FN-5633): standalone AI merge path (clean-room merge + AI reviewer)
New default merge path (merger.mode="ai"), self-contained in merger-ai.ts and
dispatched from ProjectEngine.onMerge instead of the legacy aiMergeTask pipeline
(kept for merger.mode="deterministic").

Flow: clean-room detached worktree at the target branch tip → AI agent merges
the task branch + squashes (resolving conflicts) → fresh read-only AI reviewer
audits with corrective retries (blocking vs advisory; advisory lands, unfixable
correctness hard-fails via AiMergeBlockedError; fail-safe verdict parsing) →
land via `git merge --ff-only` when the checkout is on the target (else
update-ref CAS) → sync the local checkout (stash → ff → restore; AI reconciles
a conflicting restore and keeps the original edits in a backup stash;
un-stashable dirt advances the ref + warns) → finalize (delete task branch —
never the integration branch — task→done, remove temp worktree).

- Per-task target branch honored (falls back to the default integration
  branch); local checkout synced only when on that target.
- Structurally immune to the dirty-clobber and stale-base/non-FF bug classes of
  the legacy path (clean room + FF-by-construction).
- Progress surfaced on the task status pill + task log stream.
- Clear error when the target branch has no local ref.

Settings: merger.mode / merger.reviewerModel / merger.maxReviewPasses, surfaced
in Settings → Merge; legacy merge-mechanics settings hidden when AI mode is on.

Tests: merger-ai.test.ts (verdict parser, clean merge, blocking hard-fail,
advisory land, empty no-op, target-branch isolation, missing-target error,
landSquash clean/other-branch/dirty-restore/AI-resolved). Legacy
merge-orchestration tests pinned to deterministic mode.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-05-28 18:50:23 -07:00
gsxdsm
5768d5ec45 feat(FN-5627): self-heal transient merge failures stuck at mergeRetries=3
After the FN-5627 merger fix (b2d547eae, 230f6f45b) landed, two in-review
tasks (FN-5628, FN-5632) remained stuck at mergeRetries=3 with
status=failed because the merger correctly identified transient failure
classes but had no auto-recovery path \u2014 the AUTO_MERGE_COOLDOWN_MS reset
takes hours and gives up too easily.

Failure classes covered:
- lease-handoff-failed: target-not-queued (FN-5353/FN-5363 race where the
  merge queue lease was cleared between enqueue and handoff acquisition).
- Legacy same-SHA spurious 'Integration branch X advanced concurrently
  (expected SHA, observed SHA)' errors from pre-FN-5627 code paths.

Implementation:
- New MergeDetails.transientRecoveryCount field tracks per-task recovery
  attempts, bounded by MAX_TRANSIENT_MERGE_RECOVERIES = 2.
- New classifyTransientMergeError() string matcher in self-healing.ts
  identifies recoverable classes by error pattern. Returns null for
  genuine merge failures (verification, conflicts, real concurrent
  advances with different SHAs).
- SelfHealingManager.recoverTransientMergeFailures() sweep finds
  matching in-review tasks, resets mergeRetries=0, clears status/error,
  increments recovery count, re-enqueues via requeueForAutoMerge.
- Wired into BOTH startup recovery and periodic Batch 2 maintenance loop.
- Emits merger:transient-failure-auto-recovered (recovered) and
  merger:transient-failure-budget-exhausted (terminal) audit events.

No-op when autoMerge=false, requeueForAutoMerge not wired, or pause
active. Repeat-suppression on budget-exhausted emit via error marker
[transient-recovery-budget-exhausted] to prevent log spam.

Tests (6 new):
- target-not-queued recovery path
- spurious-concurrent-advance-same-sha recovery path (legacy)
- genuine concurrent-advance (different SHAs) NOT recovered
- non-transient failures NOT recovered (verification, conflicts)
- budget exhaustion emits marker once, no further requeue
- autoMerge=false no-op

Engine suite: 6157 tests pass (6 new).

In-flight: FN-5628 and FN-5632 were manually reset via SQL so the
already-running engine (which has the FN-5627 merger fix) can re-attempt
their merges before this self-healing path lands and reloads. Future
occurrences self-recover.

Fusion-Task-Id: FN-5627
2026-05-28 13:53:15 -07:00
gsxdsm
2b66825fc1 test(core): force deterministic fs.watch failure with NUL-byte path
Prior attempt accepted either fs.watch failure path (sync throw vs async
error event) — but on Linux Node, fs.watch with `recursive: true` on a
missing directory silently succeeds (returns a no-op watcher, never
throws, never emits an error). Neither catch arm fires, so the warning
the test wants to assert never appears.

Switch to a NUL-byte-embedded path. Node validates the path argument up
front and throws ERR_INVALID_ARG_VALUE synchronously on every platform,
guaranteeing the `watch:fs-watch-setup` catch arm runs. Restore the
strict assertions on phase + message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 10:46:21 -07:00
gsxdsm
2a3535893b feat(FN-5622): add goals REST API with store accessor and route handlers
Introduces a Goals REST API (`GET/POST/PUT /api/goals` and `GET/PUT /api/goals/:id`) backed by a new `@fusion/core` goal store and typed goal types, including comprehensive route and store test coverage. Documentation on architecture and storage is updated to reflect the new domain, and a changeset

Fusion-Task-Id: FN-5622

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5622
2026-05-28 10:32:16 -07:00
gsxdsm
8c0a75f50e test(core): accept either fs.watch failure path on Linux and macOS
`store-activity.test.ts > "logs fs.watch setup failures and keeps polling
active"` flakes on Linux CI: it sets `tasksDir` to a non-existent path
and expects `fs.watch` to throw synchronously (routed to
`watch:fs-watch-setup`). macOS Node does throw, but Linux Node returns a
watcher that emits an async `error` event instead (routed to
`watch:fs-watch-error`). The contract this test guards is "log the
failure and keep polling alive" — not which catch arm handled it.

Match either warning message + phase, and use `vi.waitFor` so the async
Linux path isn't raced by the spy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 10:03:29 -07:00
gsxdsm
d767e2ecbd feat(FN-5601): add OpenAI Responses API type support to custom providers
Added OpenAI Responses API as a new custom provider type, wiring `apiType: "responses"` through the core registry, engine routes, and dashboard UI with a dropdown selector; includes test coverage across the registry, routes, and component layers.

Fusion-Task-Id: FN-5601

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5601
2026-05-27 21:31:12 -07:00
gsxdsm
699556d5a0 Merge pull request #1106 from titosemi/fix/inbox-user-alias-normalization
fix(core): normalize bare "user" id to dashboard alias in inbox routing
2026-05-27 16:30:04 -07:00
Josemi Liebana
dd6c361083 fix(core): normalize bare "user" id to dashboard alias in inbox routing
Messages sent with to_id="user" (the natural alias agents use) were
silently dropped from getInbox() due to two gaps:

WRITE PATH (types.ts): normalizeMessageParticipant did not include "user"
in DASHBOARD_USER_ALIASES, so messages were stored with toId="user"
instead of toId="dashboard".

READ PATH (message-store.ts): getParticipantIdsForLookup did not include
"user" in the IN-clause for the dashboard mailbox lookup, so messages
already stored with toId="user" (from old sessions) were never returned.

Both paths now include "user" as a canonical alias for DASHBOARD_USER_ID.

Tests:
- normalizeMessageParticipant("user","user") -> {id:"dashboard",type:"user"}
- getInbox("dashboard","user") returns messages stored with toId="user"
  (legacy case: inserted directly into DB without normalization)
2026-05-27 18:47:52 +02:00
Josemi Liebana
d7e4cf7f94 fix(test): update useChat tests for order=desc and before-cursor pagination 2026-05-27 15:24:31 +02:00
Josemi Liebana
6e9ab0e989 feat(dashboard): load latest messages first with order=desc pagination
- Add order?: 'asc' | 'desc' to ChatMessagesFilter (core)
- Route handler passes order param from query string
- Initial load requests order=desc and reverses for display
- loadMoreMessages uses before cursor instead of offset
- hasMoreMessages starts false (prevents IntersectionObserver race)
- ChatView IntersectionObserver guards against messagesLoading
2026-05-27 11:57:21 +02:00
gsxdsm
390bd7f923 perf(dashboard): cache gh CLI checks and defer SQLite integrity scan
Cold-start dashboard responsiveness went from ~99s to ~6-11s. CPU profiling
identified two synchronous-spawn hotspots blocking the event loop:

- `GitHubTrackingReconciler` scanned up to 200 done tasks per startup,
  each call into `getIssue` invoking `isGhAvailable()` + `isGhAuthenticated()`
  via `execFileSync`. `gh auth status` makes a network roundtrip, so 400
  sync spawns ≈ 71s of pure event-loop blocking (69% of cold-start CPU).
  Memoized both checks with a 60s TTL; `resetGhAvailabilityCache()` is
  exported for login/logout flows that need immediate invalidation.

- `PRAGMA integrity_check(100)` walks every page of the SQLite file (~7s
  per database, multiple DBs × projects). The deferred check was scheduled
  3s after init — right in the responsiveness-critical window. Pushed to
  60s so the user is already interacting before it runs; check itself is
  unchanged.

Also yields the event loop between major InProcessRuntime init phases and
between self-healing recovery steps (34 per project), defers orphan-task
AI agent resumption by 30s (env-overridable, auto-zero under Vitest), and
ships an opt-in `FUSION_TRACE_EL_LAG=/path/to/file` event-loop lag tracer
that diagnosed all of the above.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 23:41:28 -07:00
gsxdsm
5eacd79b43 feat(FN-5584): merge fusion/fn-5584 2026-05-25 15:27:06 -07:00
gsxdsm
9b7e87667b feat(FN-5566): add soft-delete cleanup sweep for blocker residue
Added soft-delete reliability sweeps and guardrails to prevent blocker residue from persisting across delete operations, including column drift detection, deleted row sweep guards, and in-progress delete reconciliation, with comprehensive test coverage and documentation updates to the soft-delete ve

Fusion-Task-Id: FN-5566

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5566
2026-05-23 21:54:07 -07:00
gsxdsm
41727cd3bb feat(FN-5577): add github-tracking reconciler for deleted archived tasks
Added GitHub tracking reconciliation to sync hidden and deleted archived tasks on engine startup, spanning a new reconcile task listing method in the core store, a reconciler pass in the dashboard, and comprehensive test coverage for both the store listing and the deleted-archived reconciliation log

Fusion-Task-Id: FN-5577

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5577
2026-05-23 21:19:44 -07:00
gsxdsm
a6a57dc40a test: guard tests from killing the live dashboard port
Adds a static pretest check and a runtime vitest-setup wrapper that block
shell/process calls matching `kill|pkill|killall|fuser|lsof ... <port>` or
`.listen(<port>)` against reserved Fusion ports. Reserved set is dynamic:
default 4040 plus $PORT, $FUSION_SERVER_PORT, $FUSION_RESERVED_PORTS, and any
port responding to /api/health on 4040..4045 at worker startup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 19:51:36 -07:00
gsxdsm
6e7f1e570e fix(dashboard): useMergeAdvanceNotice tests should waitFor toBeDefined
`notice` is `events.find(...)` which returns `undefined` (not `null`)
when no match. `waitFor(() => expect(...).not.toBeNull())` exited
immediately because `undefined !== null` — the test never actually
waited for the api mock to resolve. Sometimes the followup assertions
happened to land after the events fetched (test passed by luck);
sometimes they ran while notice was still undefined and the assertions
failed.

Switched all five waitFor sites to `.toBeDefined()` so they actually
block on the events-fetch resolution.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 18:39:36 -07:00
gsxdsm
408e20bdc6 fix(merger): prevent tasks landing in Done with no commit on main
Two root-cause fixes for the "fake done" patterns surfaced while debugging
FN-5475's stuck preflight (it depended on FN-5233, which the board reported
as Done but whose squash had stranded on a sibling fusion/fn-* branch).

1. resolveTaskMergeTarget rejects fusion/fn-* sibling branches as a merge
   destination — when a task's baseBranch was inherited from a sibling/dependent
   dispatch, the merger detached onto and squashed against that branch instead
   of advancing main. New audit event surfaces the steering miss so the
   underlying baseBranch-propagation bug stays observable.

2. self-healing findLandedTaskCommit verifies ownership against each grep
   candidate's body before attribution. The previous code blindly accepted the
   first hit of `git log --grep=FN-XXXX` (which matches the entire commit
   message); FN-5441 and FN-5446 were both marked done against an unrelated
   FN-5483 commit whose body merely mentioned them in prose. commitOwnedByTask
   is also tightened: trailers must be line-anchored and the subject fallback
   must match conventional-commit form, not a bare substring.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 17:16:45 -07:00
Fusion (runfusion.ai)
2d2e5b809f feat(FN-5233): add tombstone recreate guard and allow-resurrection delete f
Implements the FN-5233 tombstone system for soft-delete resurrection: a configurable `tombstoneWindowSeconds` deduplicates recreation of recently deleted tasks, with an `allowResurrection` flag that permits explicit resurrect-on-recreate, tombstone recreate guards in the store layer, and cleanup of

Fusion-Task-Id: FN-5233
2026-05-23 17:07:14 -07:00
gsxdsm
4c31e885bd feat(engine): merger auto-syncs project-root checkout after ref advance
After advanceIntegrationBranchRef ff-updates refs/heads/<integrationBranch>,
the merger now enumerates other worktrees on that branch and reconciles
each one's index + working tree to the new tip via syncWorktreeToHead.

Not a git pull — origin may still be at the previous tip without
pushAfterMerge, so pull --ff-only is a no-op and a naive stash/pull/pop
ends with the worktree restored to the old state. Instead the new
worktree-ref-sync helper:

  1. Diffs the worktree against the previous tip to isolate real edits
     from the stale-index "phantom diff" against the new HEAD.
  2. Snaps clean worktrees forward via reset --hard HEAD.
  3. In stash-and-ff mode with real edits, captures them as a binary patch
     against the previous tip, snaps to HEAD, then git apply --3way to
     restore. Untracked files are saved + restored separately. Patch
     conflicts surface as synced-with-pop-conflict with the patch left on
     disk for manual recovery.

Per-worktree outcome emitted as merge:auto-sync (new GitMutationType).
Per-step pull:fast-forward / stash:push / stash:pop / stash:pop-conflict
that pass through the auditor are tagged metadata.autoSync=true.

Isolated in its own try-catch so an auto-sync failure can't fail the
already-landed merge. Default behavior is mergeAdvanceAutoSync="stash-and-ff";
"off" preserves the legacy surprise behavior.

Backstopped by merger-auto-sync.slow.test.ts: clean-sync snaps both index
and files forward, ff-only with real edits is a no-op, stash-and-ff
preserves untracked locals across the snap, task worktrees on fusion/fn-*
are skipped, empty branch map emits nothing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 14:41:11 -07:00
gsxdsm
a201f56f09 feat(core): add mergeAdvanceAutoSync project setting
Schema for what the merger should do in other worktrees still checked out
on the integration branch when it advances the branch ref. Modes:
  off          — legacy (user pulls manually)
  ff-only      — fast-forward only when other worktree is clean
  stash-and-ff — Smart Pull pipeline (default)

Threads through DEFAULT_PROJECT_SETTINGS, PROJECT_SETTINGS_KEYS (auto via
Object.keys), the docs settings table, and parity + persistence tests.
Merger consumption lands in the follow-up engine change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 14:19:50 -07:00
gsxdsm
8f5c1f97ad feat(FN-5255): flip directMergeCommitStrategy default from squash to direct
Changes the default merge strategy from squash to direct by flipping `directMergeCommitStrategy` in the settings schema and types, with the core implementation in `merger-ref-update-advance.ts`. Also aligns a heartbeat executor test assertion with the FN-5060 deduplication shape.

Fusion-Task-Id: FN-5255

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5255
2026-05-23 11:08:08 -07:00
gsxdsm
687237bd91 feat(FN-5411): add project identity recovery and identity-aware startup rea
Implements project identity tracking and recovery across the Fusion system (FN-5411), enabling persistent identity for projects across storage migrations, daemon reattaches, and CLI session management. Adds a project identity metadata API and central reattach ensure mechanism, wires identity stampin

Fusion-Task-Id: FN-5411

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5411
2026-05-23 04:18:55 -07:00
gsxdsm
4d1cad027c feat(FN-5444): add merge handoff test coverage for task worktree
Adds test coverage for merge queue and heartbeat handoff interactions (FN-5444), including source metadata expectations in heartbeat executor tests, merge handoff coverage gaps, and reuse scenarios in the merger worktree integration tests.

Fusion-Task-Id: FN-5444

Fusion-Task-Lineage: 45e1b43f-8ae3-46ba-a5ee-25e8c661e753

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5444
2026-05-23 03:50:05 -07:00
gsxdsm
2209c57dd6 chore(engine): remove workflow-step mock routing + stale FN-5482 docs
Drops the "workflow-step" MockSessionPurpose enum value and the
workflowStepId / workflowStepTemplateId plumbing through
agent-runtime, agent-session-helpers, mock-provider, executor, and
merger. The seeded-workflow-prompts script loses its FN-5205
rationale comment + test (no longer applicable now that workflow
steps run through the regular session purposes).

Also strips the stale FN-5482 architecture-invariant bullet from
AGENTS.md and the corresponding audit-event line from
docs/architecture.md (the self-healing reclaim invariant they
described no longer holds).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 03:09:00 -07:00
gsxdsm
51fc826199 fix(engine,core): dedup heartbeat-spawned follow-ups by parent task
Same-agent intake guard now also matches siblings sharing a
sourceParentTaskId, so repeated heartbeats from one parent task
can't bypass dedup just because triage rewrites the title.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 03:05:46 -07:00
gsxdsm
76bd3a7d90 feat(FN-5205): add workflow-step test mode dispatch and routing for mock pr
Implements workflow step test mode (FN-5205) by wiring mock dispatch, context forwarding, and routing through executor, merger, and mock provider, plus adding corresponding tests and docs. Also adds broad-scope triage heuristics to improve task-scope detection, touching triage.ts, triage-broad-scope

Fusion-Task-Id: FN-5205

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
Fusion-Task-Id: FN-5205
2026-05-23 02:25:00 -07:00