Commit Graph

2857 Commits

Author SHA1 Message Date
gsxdsm
67cdb33a92 chore: gitignore the knowledge-graph build artifact
`.fusion-knowledge/` is `fn knowledge-graph build` output (FN-8920 memory epic):
~85MB of generated JSON, rewritten on every build. edges.json alone is 43MB,
past GitHub's 50MB warning threshold.

It is deterministic and fully regenerable from source — the manifest's SHA-256
fingerprints drive incremental rebuilds — so tracking it preserves nothing a
rebuild cannot reproduce, while adding irreversible, compounding history bloat to
every clone and CI checkout.

docs/knowledge-graph.md previously left this to the operator ("it is not
ignored"); that guidance is updated here so the doc and .gitignore agree. An
operator who explicitly wants a snapshot in history can still force one with
`git add -f .fusion-knowledge/graph`.

Nothing under the path was ever tracked, so no index purge is needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 13:49:37 -07:00
gsxdsm
7b3bd75268 fix(engine): wire the Plan Review replan cap and tombstone its dead predecessor
Investigating the "dead cap" turned up the opposite of what it looked like, plus a
worse problem next to it.

The Plan Review replan loop was NOT unbounded. U3 re-owned the cap-park in the
graph: requestPreMergeOptionalStepFix parks via parkPlanReviewReplanCapExhausted
at awaiting-approval with reason plan-review-replan-cap, on both an explicit
finite budget and the unbounded default. That capability has been live throughout.

What was actually dead:

1. PLAN_REVIEW_GATE_REPLAN_CAP = 8 — an unread constant belonging to the
out-of-graph triage gate (runPlanReviewBeforeExecution) that U10/R4 deleted. Its
companion column Task.planReviewReplanCount was persisted, serialized and reset
but never incremented or compared. A constant and a column that look like a live
safety ceiling while enforcing nothing are worse than no ceiling: they answer "is
this loop bounded?" with a confident yes. Deleted, ratcheted in
legacy-tombstones.test.ts, and the column documented as legacy/never-written with
the live owner named.

2. planReviewReplanCap — an operator-facing setting, declared, validated,
documented in settings-reference.md and editable in the Workflow Editor, that
NOTHING read. Lowering it changed nothing. The unbounded backstop was instead
hardcoded to PLAN_REVIEW_FEEDBACK_HISTORY_LIMIT — a bound on how much reviewer
PROSE is replayed into the next planning prompt, whose own comment says it is
"bounded independently of persistence and retry accounting". Two unrelated
concerns shared one number, so trimming prompt history would have silently
tightened a safety ceiling.

The backstop now resolves from the setting, defaulting to the new
DEFAULT_PLAN_REVIEW_REPLAN_CAP = 15 — the previously-effective value, so this is a
pure re-wiring rather than a silent behavior change. The existing 15-attempt
regression test passes unchanged, which is the evidence for that. 0 is honored as
park-on-first-REVISE. An explicit planReviewMaxRevisions / node maxRevisions
budget remains a stricter, earlier gate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 13:39:55 -07:00
gsxdsm
e0af6ddd93 FN-8952: derive Quick Add Save smoke fixtures from locales
Keep 300px Quick Add Save browser smoke coverage synchronized with shipped translations.

- Derive board and list Save fixtures from supported locale catalogs.
- Escape fixture labels and reject missing Save translations.
- Add fast fixture parity, derivation, and escaping coverage.

Files changed:
 docs/testing.md                                    |   3 +
 .../__tests__/browser-layout-smoke-fixture.test.ts |  75 +++++++++++++-
 .../dashboard/scripts/browser-layout-smoke.mjs     | 110 ++++++++++++++-------
 3 files changed, 147 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-8952
Fusion-Task-Lineage: 31daec25-5d9a-43bb-9ccf-667702006e76
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 12:38:00 -07:00
gsxdsm
878db6dca7 FN-8951: repair script-test governance drift
Keep test-shard timing governance aligned with the current workspace and workflow seams.

- Add a safe timing-snapshot pruning mode with coverage.
- Align Todo plugin Vitest isolation and Docker dependency manifests.
- Refresh workflow reliability evidence and remove deleted test timings.

Files changed:
 Dockerfile                                         |  7 ++-
 docs/testing.md                                    |  9 ++-
 plugins/fusion-plugin-todos/vitest.config.ts       | 26 ++++++--
 scripts/__tests__/ci-test-shard-timings.test.mjs   | 71 ++++++++++++++++++++++
 scripts/ci-test-shard.mjs                          | 65 ++++++++++++++++++--
 .../lib/workflow-reliability-release-check.json    | 22 +++----
 scripts/test-timings.json                          | 21 -------
 7 files changed, 175 insertions(+), 46 deletions(-)

Fusion-Task-Id: FN-8951

Fusion-Task-Lineage: fbf7e79f-4cb2-43e2-9982-09f3f94de70d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 12:09:20 -07:00
gsxdsm
00ddafd5fe FN-8845: persist deterministic spec alignment
Persist approved-plan drift alignment on linked mission features.

- Store spec alignment across PostgreSQL and SQLite mission feature projections
- Reconcile and render durable alignment instead of browser-side task joins
- Preserve migration identities and cover drift persistence regressions

Files changed:
 docs/architecture.md                               |  2 +
 docs/missions.md                                   |  2 +-
 .../core/src/__tests__/planner/spec-lock.test.ts   |  1 +
 .../src/__tests__/postgres/schema-applier.test.ts  |  9 ++++-
 .../async-stores/async-mission-store-queries.ts    |  5 +++
 packages/core/src/missions/mission-store.ts        |  9 ++++-
 packages/core/src/missions/mission-types.ts        | 10 +++++
 packages/core/src/planner/spec-lock.ts             |  7 +++-
 .../0053_mission_feature_spec_alignment.sql        |  3 ++
 packages/core/src/postgres/schema-applier.ts       | 13 +++++-
 packages/core/src/postgres/schema/project.ts       |  2 +
 packages/dashboard/app/api/missions/missions.ts    |  2 +
 .../dashboard/app/components/MissionManager.tsx    | 40 ++++++------------
 packages/dashboard/app/components/mission-types.ts |  2 +
 .../src/__tests__/plan-approval-status.pg.test.ts  |  4 +-
 .../src/__tests__/mission-feature-sync.test.ts     | 37 ++++++++++++++++-
 .../src/__tests__/spec-drift-reconciler.test.ts    | 14 +++++++
 packages/engine/src/missions/mission-autopilot.ts  | 17 +++++---
 .../engine/src/missions/mission-feature-sync.ts    | 47 +++++++++++++++++++++-
 packages/engine/src/project-engine.ts              |  3 +-
 packages/engine/src/scheduler.ts                   | 40 +++++++++++-------
 packages/engine/src/spec-drift-reconciler.ts       |  5 +++
 22 files changed, 215 insertions(+), 59 deletions(-)

Fusion-Task-Id: FN-8845

Fusion-Task-Lineage: d4a30472-f1c3-41ba-a61b-3f2be1ad32ab

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 11:50:56 -07:00
gsxdsm
963dba6f80 feat: gate review verdicts on finding severity and preserve remediation sessions
Review remediation loops were the dominant cost of task wall-clock: over 14 days,
tasks with >=5 post-review fix rounds were 22% of tasks but consumed 78% of all
task active time, and 311 of 331 recorded findings were spec-internal-consistency
complaints that changed no delivered behavior.

Two causes compounded. Plan/Code Review remediation was unbounded by default, and
the review policy ordered a full re-derivation of the artifact after every edit
("distrust the edit ... fresh holistic pass"), so each round surfaced a fresh crop
of previously-acceptable observations as new blockers.

Make the already-persisted WorkflowReviewFinding.severity load-bearing instead of
decorative: a REVISE only blocks when it carries a finding at or above the review
kind's threshold (plan: P0+P1, code: P0). Non-blocking findings are still parsed,
persisted, and handed to the implementer as advisory notes in PROMPT.md. Fails
closed — a REVISE with no findings, or with any unclassified finding, still blocks,
so prose-only and custom reviewers keep full blocking power. The gate only ever
relaxes a verdict, never promotes one.

Reviewer prompts now request the structured findings schema (Plan Review emitted
none before), define severity by consequence as P0/P1/P2, omit nits entirely rather
than filing them as low-severity findings, and use an incremental re-review contract.
Remediation renders findings grouped by priority and sanctions an explicit decline
with rationale, so a disputed finding has a terminal state.

Also preserve the implementation session across a review bounce: sendTaskBackForFix
no longer nulls sessionFile when preserving resume state, and the executor's finally
no longer clears it on a review handoff. Remediation rounds continue the conversation
instead of re-reading the repo and re-deriving the change they just wrote. The resume
prompt now directs a PROMPT.md re-read, without which a resumed agent would never see
the new findings.

New per-workflow settings planReviewBlockingSeverity / codeReviewBlockingSeverity;
set either to "any" to restore the previous behavior.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 11:28:32 -07:00
gsxdsm
936dd1ea96 FN-8924: retain safe age gate for merge recovery
Document why interrupted merge recovery retains its age-based admission gate.

- Record why merger logs cannot establish task ownership or orphan status.
- Pin non-owner recovery behavior when a merging task was recently updated.

Files changed:
 docs/self-healing-backward-move-audit.md           | 8 +++++++-
 packages/engine/src/__tests__/self-healing.test.ts | 9 ++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-8924

Fusion-Task-Lineage: 19e7f803-21fe-43fb-8ca6-eecf8ff61df4

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 09:09:04 -07:00
gsxdsm
82b5d78bf8 FN-8945: invalidate approved lineage fingerprints
Invalidate stale approval evidence atomically when a parent task leaves lineage.

- Lock and revalidate lineage children before parent deletion or archival.
- Clear affected approvals, append invalidation evidence, and reconcile cleared children.
- Cover lifecycle races, evidence collisions, and async archive/delete paths.

Files changed:
 .changeset/fn-8945-lineage-approval-invalidation.md       |   7 +
 docs/architecture.md                               |   6 +
 .../lineage-approval-invalidation.pg.test.ts       | 379 +++++++++++++++++++++
 .../planning-lifecycle-advisory-lock.pg.test.ts    |  58 ++++
 .../postgres/runtime-lifecycle-async.test.ts       |   4 +
 .../__tests__/postgres/taskstore-lifecycle.test.ts |   3 +-
 packages/core/src/postgres/advisory-locks.ts       | 164 ++++++---
 packages/core/src/store.ts                         |  26 +-
 .../core/src/task-store/archive-lifecycle-2.ts     | 123 +++++--
 .../src/task-store/async/async-archive-lineage.ts  |  27 +-
 .../core/src/task-store/async/async-lifecycle.ts   |  89 +--
 .../task-store/lineage-approval-invalidation.ts    | 168 +++++++++
 12 files changed, 939 insertions(+), 115 deletions(-)

Fusion-Task-Id: FN-8945

Fusion-Task-Lineage: be7dd6c8-5411-4b0e-8734-9fe63b9d1d9f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 08:48:47 -07:00
gsxdsm
0fc6f3d849 FN-8946: enable attributed agent mission status updates
Enable authorized agents to update feature and mission statuses with transactional, attributed audit events.

- Add mission and feature status tools to the Fusion extension and engine allowlists.
- Record bounded actor, reason, and hierarchy metadata for status transitions across every writer.
- Guard linked feature transitions and document the agent-facing workflow.

Files changed:
 .changeset/fn-8946-mission-status-writes.md        |   7 +
 docs/missions.md                                   |   7 +-
 packages/cli/skill/fusion/SKILL.md                 |   2 +-
 .../cli/skill/fusion/references/extension-tools.md |  20 +++
 .../skill/fusion/references/fusion-capabilities.md |   2 +
 packages/cli/src/__tests__/extension.test.ts       |  46 ++++++
 packages/cli/src/extension.ts                      |  27 +++
 .../mission-status-event-metadata.test.ts          |  50 ++++++
 .../__tests__/postgres/mission-store.pg.test.ts    | 160 +++++++++++++++++-
 .../core/src/async-stores/async-mission-store.ts   | 182 +++++++++++++++------
 packages/core/src/index.ts                         |   5 +
 packages/core/src/missions/mission-store.ts        |   7 +-
 packages/core/src/missions/mission-types.ts        |  99 +++++++++--
 .../src/__tests__/chat-toolset-permissions.test.ts |  24 +++
 packages/dashboard/src/mission-routes.ts           |   3 +-
 .../src/__tests__/agent-mission-tools.test.ts      |  42 ++++-
 .../src/__tests__/heartbeat-executor.test.ts       |   4 +-
 .../workflow-step-readonly-allowlist.test.ts       |   2 +
 packages/engine/src/agent-tools.ts                 |  18 ++
 .../engine/src/execution/gating-classifications.ts |   2 +
 20 files changed, 635 insertions(+), 74 deletions(-)

Fusion-Task-Id: FN-8946

Fusion-Task-Lineage: 473cc0e0-e632-48b3-ac84-adaaeb81db4b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 07:30:42 -07:00
gsxdsm
a5e1b0efc2 docs: add docs index back-link to knowledge-graph.md
Missing [← Docs index](./README.md) back-link per convention for all
indexed docs. Added during ambient docs audit.
2026-08-10 06:23:35 -07:00
gsxdsm
27cb2d2621 FN-8921: add deterministic knowledge graph tooling
Add a committable, provenance-tagged knowledge graph layer with CLI generation and query support.

- Extract TypeScript, Markdown, and FNXC knowledge into deterministic graph nodes and edges.
- Persist recoverable graph artifacts outside ignored Fusion state and expose build/query CLI commands.
- Document configuration and add core and CLI coverage for graph structure, serialization, and recovery.

Files changed:
 .changeset/fn-8921-knowledge-graph.md              |   7 +
 .gitattributes                                     |   3 +
 AGENTS.md                                          |   1 +
 docs/README.md                                     |   2 +
 docs/cli-reference.md                              |   4 +
 docs/knowledge-graph.md                            |  37 +++++
 docs/settings-reference.md                         |   4 +
 docs/storage.md                                    |   2 +
 packages/cli/package.json                          |   3 +-
 .../__tests__/knowledge-graph-bundle-shape.test.ts |   4 +
 .../src/__tests__/knowledge-graph-command.test.ts  | 115 ++++++++++++++
 packages/cli/src/bin.ts                            |  19 +++
 packages/cli/src/commands/knowledge-graph.ts       |  79 ++++++++++
 packages/cli/tsup.config.ts                        |   2 +
 packages/core/package.json                         |   4 +-
 packages/core/src/config/settings-schema.ts        |   2 +
 packages/core/src/index.ts                         |   1 +
 .../__tests__/derive-modules.test.ts               |  11 ++
 .../__tests__/extract-file-composition.test.ts     |  20 +++
 .../knowledge-graph/__tests__/extract-fnxc.test.ts |  33 ++++
 .../__tests__/extract-markdown.test.ts             |  21 +++
 .../__tests__/extract-typescript.test.ts           |  30 ++++
 .../__tests__/file-discovery.test.ts               |  26 ++++
 .../graph-artifact-not-gitignored.test.ts          |  15 ++
 .../__tests__/graph-builder-equivalence.test.ts    |  76 ++++++++++
 .../__tests__/graph-builder-incremental.test.ts    |  52 +++++++
 .../__tests__/graph-identity.test.ts               |  11 ++
 .../knowledge-graph/__tests__/graph-query.test.ts  |  13 ++
 .../__tests__/graph-serialization.test.ts          |  29 ++++
 .../__tests__/graph-store-recovery.test.ts         | 106 +++++++++++++
 .../__tests__/resolve-imports.test.ts              |  10 ++
 .../core/src/knowledge-graph/derive-modules.ts     |   4 +
 packages/core/src/knowledge-graph/extract-file.ts  |   6 +
 packages/core/src/knowledge-graph/extract-fnxc.ts  | 168 +++++++++++++++++++++
 .../core/src/knowledge-graph/extract-markdown.ts   |   9 ++
 .../core/src/knowledge-graph/extract-typescript.ts | 107 +++++++++++++
 .../core/src/knowledge-graph/file-discovery.ts     |  85 +++++++++++
 packages/core/src/knowledge-graph/graph-builder.ts | 141 +++++++++++++++++
 .../core/src/knowledge-graph/graph-manifest.ts     |   4 +
 packages/core/src/knowledge-graph/graph-query.ts   | 126 ++++++++++++++++
 .../src/knowledge-graph/graph-serialization.ts     | 134 ++++++++++++++++
 packages/core/src/knowledge-graph/graph-store.ts   |  97 ++++++++++++
 packages/core/src/knowledge-graph/graph-types.ts   |  54 +++++++
 packages/core/src/knowledge-graph/index.ts         |  14 ++
 .../core/src/knowledge-graph/resolve-imports.ts    |   4 +
 packages/core/src/types/settings/settings-scope.ts |   2 +
 pnpm-lock.yaml                                     |  12 +-
 47 files changed, 1700 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-8921

Fusion-Task-Lineage: 7014d0f1-fc47-454b-afe5-5f0d9b229f33

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 06:15:17 -07:00
gsxdsm
00e369711c FN-8949: add dead mock specifier guard
Prevent silent dead engine test mocks and restore renamed-lane coverage.

- Add a ratcheting test that detects unresolved relative vi.mock specifiers.
- Update self-healing test seams for moved modules and queue transitions.
- Document mock-specifier and store-fake failure patterns.

Files changed:
 .../dead-vi-mock-specifiers-fail-silently.md       |  57 ++++++
 ...e-defects-that-masquerade-as-production-bugs.md |  12 ++
 docs/testing.md                                    |   5 +
 .../self-healing-query-filter-blindness.test.ts    |  42 ++++-
 .../__tests__/vi-mock-specifiers-resolve.test.ts   | 199 +++++++++++++++++++++
 5 files changed, 306 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-8949

Fusion-Task-Lineage: a1079d1c-a2a9-4ac2-8245-1db434468405

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 04:54:55 -07:00
gsxdsm
5573d042a9 FN-8922: add persistent memory recall store
Add PostgreSQL-backed recall records for durable project memory retrieval.

- add recall record types, storage, search, deduplication, and prompt instructions
- migrate project schemas and expose recall APIs from core memory modules
- document plugin and storage contracts, with unit and PostgreSQL coverage

Files changed:
 .changeset/fn-8922-memory-recall-store.md          |   7 +
 docs/memory-plugin-contract.md                     |  10 +
 docs/storage.md                                    |   4 +
 .../__tests__/memory-recall-dedup-search.test.ts   |  10 +
 .../__tests__/memory-recall-instructions.test.ts   |  62 +++++
 .../postgres/memory-recall-store.pg.test.ts        | 296 +++++++++++++++++++++
 .../src/__tests__/postgres/schema-applier.test.ts  |  15 +-
 packages/core/src/index.ts                         |   1 +
 packages/core/src/memory/index.ts                  |   1 +
 packages/core/src/memory/project-memory.ts         |  33 ++-
 packages/core/src/memory/recall/index.ts           |  10 +
 packages/core/src/memory/recall/recall-dedup.ts    |  35 +++
 .../core/src/memory/recall/recall-instructions.ts  |  59 ++++
 packages/core/src/memory/recall/recall-search.ts   |  20 ++
 packages/core/src/memory/recall/recall-store.ts    |  51 ++++
 packages/core/src/memory/recall/recall-types.ts    |  14 +
 .../0052_fn_8922_memory_recall_records.sql         |  17 ++
 packages/core/src/postgres/schema-applier.ts       |  13 +-
 packages/core/src/postgres/schema/project.ts       |  10 +-
 19 files changed, 648 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-8922

Fusion-Task-Lineage: bb98f048-6fcf-46d9-bd1f-09294c2dc005

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 04:46:10 -07:00
gsxdsm
0fbeba50d1 FN-8937: rescue project engine test quarantine
Rescue the project engine suite by making subprocess watchdog behavior deterministic.

- Capture real timer APIs for subprocess watchdogs and isolate failure ownership.
- Mock integration-branch resolution to prevent host git during lifecycle tests.
- Add watchdog regression coverage and remove the expired quarantine exclusion.

Files changed:
 docs/testing.md                                    |   3 +
 packages/core/src/__test-utils__/vitest-setup.ts   |  74 ++++++++++-
 .../__tests__/subprocess-guard-fake-timers.test.ts | 140 +++++++++++++++++++++
 .../engine/src/__tests__/project-engine.test.ts    |  63 +++++++---
 packages/engine/vitest.config.ts                   |  12 +-
 scripts/lib/test-quarantine.json                   |   8 +-
 6 files changed, 265 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-8937

Fusion-Task-Lineage: 9fe166b5-b101-4683-bb2b-4855ee73df10

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 03:50:58 -07:00
gsxdsm
313eea1461 FN-8935: make Agents Overview scrollable on mobile
Make long Active Agents lists reachable within constrained mobile and short desktop layouts.

- Establish a bounded, touch-friendly Active Agents scroll owner.
- Add unit and Chromium layout coverage for populated and empty overview states.
- Document the required browser smoke coverage and add a patch changeset.

Files changed:
 .../fn-8935-agents-overview-mobile-scroll.md       |  7 ++
 docs/testing.md                                    |  2 +
 .../__tests__/browser-layout-smoke-fixture.test.ts | 26 +++++-
 .../dashboard/app/components/AgentsOverviewBar.css | 14 ++++
 .../AgentsOverviewBar.mobile-scroll.test.tsx       | 96 ++++++++++++++++++++++
 .../dashboard/scripts/browser-layout-smoke.mjs     | 86 +++++++++++++++++++
 6 files changed, 230 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8935

Fusion-Task-Lineage: 43b793b9-3629-45a8-b6c1-d8100467e960

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 03:24:37 -07:00
gsxdsm
e610c72034 FN-8943: reconcile spec-lock divergence history
Preserve prior divergence when a task is re-locked after plan changes.

- Persist immutable spec locks, current-plan evidence, and drift reports.
- Reconcile retained divergence into re-approved alignment state across engine, API, and dashboard views.
- Fence Plan Review acceptance and schema upgrades while retaining migration identity parity.

Files changed:
 .changeset/fn-8845-spec-lock-drift-report.md       |   7 +
 .changeset/fn-8943-spec-lock-divergence.md         |   7 +
 docs/architecture.md                               |  17 +-
 docs/dashboard-guide.md                            |   3 +
 docs/missions.md                                   |   4 +
 .../core/src/__tests__/planner/spec-lock.test.ts   | 158 ++++++++++++++
 .../src/__tests__/postgres/schema-applier.test.ts  |  30 ++-
 .../postgres/task-dependency-mutation.pg.test.ts   |  74 +++++++
 packages/core/src/index.gate.ts                    |   4 +
 packages/core/src/index.ts                         |   4 +
 packages/core/src/planner/drift-report.ts          | 152 +++++++++++++
 packages/core/src/planner/spec-lock.ts             | 182 ++++++++++++++++
 .../migrations/0050_spec_lock_drift_report.sql     |  29 +++
 .../0051_spec_lock_source_revision_bigint.sql      |   3 +
 packages/core/src/postgres/schema-applier.ts       |  25 ++-
 packages/core/src/postgres/schema/project.ts       |  13 ++
 packages/core/src/store.ts                         | 242 ++++++++++++++++++++-
 .../core/src/task-store/branch-and-pr-entities.ts  |  32 ++-
 packages/core/src/task-store/project-store-ops.ts  |  34 ++-
 packages/core/src/task-store/task-update.ts        |  66 +++++-
 packages/core/src/task-store/update-task-deps.ts   |  31 ++-
 packages/dashboard/app/api.ts                      |   3 +
 packages/dashboard/app/api/tasks/tasks.ts          |  22 ++
 .../dashboard/app/components/MissionManager.css    |  21 ++
 .../dashboard/app/components/MissionManager.tsx    |  41 +++-
 .../dashboard/app/components/TaskDetailModal.css   |  26 +++
 .../dashboard/app/components/TaskDetailModal.tsx   |  62 +++++-
 .../__tests__/TaskDetailModal.spec-lock.test.tsx   |  80 +++++++
 .../__tests__/TaskDetailModal.test-helpers.ts      |   2 +
 .../src/__tests__/plan-approval-status.pg.test.ts  |  81 ++++++-
 .../src/routes/register-task-workflow-routes.ts    |  59 ++++-
 .../src/__tests__/mission-feature-sync.test.ts     |  15 +-
 .../src/__tests__/spec-drift-reconciler.test.ts    | 108 +++++++++
 .../engine/src/executor/execute-workflow-graph.ts  |  49 ++++-
 .../engine/src/missions/mission-feature-sync.ts    |  55 ++++-
 packages/engine/src/project-engine.ts              |  33 +++
 packages/engine/src/spec-drift-reconciler.ts       | 105 +++++++++
 packages/engine/src/triage.ts                      |  29 +++
 38 files changed, 1842 insertions(+), 66 deletions(-)

Fusion-Task-Id: FN-8943

Fusion-Task-Lineage: 2a7f8a38-99aa-4c4b-8c36-41d14c466d21

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 02:56:58 -07:00
gsxdsm
6cf95433bf FN-8928: evict flaky workflow IR PG gate canary
Remove the flaky sync-workflow-IR PostgreSQL canary from the blocking merge gate while preserving non-blocking coverage.

- Remove the default workflow-IR PostgreSQL test from the gate canary script.
- Update gate-policy coverage expectations and flake-eviction documentation.
- Record the observed setup-hook timeout and retained regression coverage.

Files changed:
 .../suite-only-flakes-observed-register.md         | 25 +++++++++++++--
 docs/testing.md                                    |  6 ++--
 packages/core/package.json                         |  2 +-
 .../sync-workflow-ir-is-always-default.pg.test.ts  |  6 ++++
 .../__tests__/engine-vitest-gate-policy.test.mjs   | 37 +++++++++++-----------
 5 files changed, 51 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8928

Fusion-Task-Lineage: b725ba1a-fb33-4d49-89b4-277a64246cdd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 02:32:24 -07:00
gsxdsm
5b9e6643d6 FN-8869: inherit project model overrides for role agents
Role-based permanent agents now consistently use their effective project model and thinking settings.

- Resolve permanent-agent model and thinking inheritance by workflow role in core.
- Apply inherited settings to Agent views, Chat sessions, routes, and heartbeat sessions.
- Cover role-specific inheritance and preserve the lifecycle-column ratchet classification.

Files changed:
 .changeset/fn-8869-role-agent-project-model-override.md   |   7 ++
 docs/agents.md                                     |   9 +-
 docs/settings-reference.md                         |   4 +-
 packages/core/src/__tests__/agent-effective-model.test.ts    |  97 +++++++++++++++++++
 packages/core/src/__tests__/no-hardcoded-lifecycle-columns.test.ts |   2 +
 packages/core/src/ai/agent-effective-model.ts      |  82 +++++++++++++++++
 packages/core/src/ai/model-resolution.ts           |  14 +++
 packages/core/src/index.gate.ts                    |   7 ++
 packages/core/src/index.ts                         |   7 ++
 packages/core/src/types.ts                         |   7 ++
 packages/dashboard/app/components/AgentDetailView.tsx |  49 ++++++---
 packages/dashboard/app/components/AgentsView.tsx   |  11 ++-
 packages/dashboard/app/components/__tests__/AgentDetailView.effective-model.test.tsx |  55 +++++++++++
 packages/dashboard/app/components/__tests__/AgentDetailView.settings.test.tsx |  22 +++++
 packages/dashboard/app/components/__tests__/AgentsView.test.tsx |  25 +++++
 packages/dashboard/src/__tests__/chat-manager.test.ts |  45 +++++++++
 packages/dashboard/src/__tests__/routes-chat-sessions-project-model.test.ts | 103 +++++++++++++++++++++
 packages/dashboard/src/chat.ts                     |  65 +++++--------
 packages/dashboard/src/routes/register-chat-routes.ts |  37 +++++---
 packages/engine/src/__tests__/agent-session-helpers-test-mode.test.ts |  13 +++
 packages/engine/src/__tests__/agent-session-helpers.test.ts |  54 +++++++++++
 packages/engine/src/agent-heartbeat.ts             |  10 +-
 packages/engine/src/agents/agent-session-helpers.ts |   6 +-
 23 files changed, 648 insertions(+), 83 deletions(-)

Fusion-Task-Id: FN-8869

Fusion-Task-Lineage: 00227aaf-b33b-43f1-bcbb-2203c9930dbc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-10 02:25:03 -07:00
gsxdsm
a48594f128 FN-8929: dismiss accepted chat attachments
Clear staged chat attachments immediately when the server accepts a direct or room message.

- Add stream and room delivery acceptance callbacks for attachment cleanup.
- Preserve staged files on pre-acceptance failures and block destructive clear commands.
- Cover direct, room, mobile, and stream acceptance behavior with tests.

Files changed:
 .changeset/fn-8929-chat-attachment-dismiss.md      |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 .../app/api/__tests__/legacy-chat-stream.test.ts   |  34 ++++++
 packages/dashboard/app/api/chat/chat.ts            |   7 ++
 packages/dashboard/app/components/ChatView.tsx     |  86 +++++++++------
 .../__tests__/ChatView.core-interactions.test.tsx  | 117 ++++++++++++++++++++-
 .../components/__tests__/ChatView.core.test.tsx    |   6 +-
 .../__tests__/ChatView.mobile-render.test.tsx      |  21 ++++
 .../components/__tests__/ChatView.mobile.test.tsx  |   2 +-
 .../components/__tests__/ChatView.rooms.test.tsx   |  64 ++++++++---
 .../dashboard/app/hooks/__tests__/useChat.test.ts  |  54 ++++++++++
 .../app/hooks/__tests__/useChatRooms.test.ts       |  33 +++++-
 packages/dashboard/app/hooks/useChat.ts            |  11 +-
 packages/dashboard/app/hooks/useChatRooms.ts       |  13 ++-
 14 files changed, 393 insertions(+), 64 deletions(-)

Fusion-Task-Id: FN-8929

Fusion-Task-Lineage: 3f39d1aa-a4f9-4a71-a7a8-3522d7c3c83e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 23:21:02 -07:00
gsxdsm
d9a2d9dba3 FN-8925: clear orphaned paused merge stamps safely
Allow only engine-owned deadlock pauses to clear stale merge stamps without resuming work.

- Fail closed when merge ownership probing is unavailable.
- Clear stale stamps only for merge-deadlock-detected pauses and suppress their enqueue.
- Add race coverage, audit documentation, and a patch changeset.

Files changed:
 .changeset/fn-8925-paused-stale-merge.md           |   7 +
 docs/self-healing-backward-move-audit.md           |   2 +-
 docs/task-management.md                            |   4 +-
 .../self-healing-query-filter-blindness.test.ts    |   5 +-
 .../self-healing-stale-merge-fanout.test.ts        |   1 +
 packages/engine/src/__tests__/self-healing.test.ts | 203 +++++++++++++++++++--
 packages/engine/src/self-healing.ts                |  45 ++++-
 7 files changed, 241 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8925

Fusion-Task-Lineage: e5491e1a-ca0a-4a82-b4e0-4002f30e869e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>,
2026-08-09 23:13:34 -07:00
gsxdsm
e7a873c505 FN-8936: stabilize Planning Mode handoff tests
Stabilize live Proceed-action handoffs and re-admit the Planning Mode flow suite.

- Settle hydration and re-query the Proceed action before direct-create test clicks.
- Remove the Planning Mode test quarantine and record its rescue in the testing ledger.

Files changed:
 .../suite-only-flakes-observed-register.md           |  4 ++++
 docs/testing.md                                      |  3 +++
 .../PlanningModeModal.planning-flow.test.tsx         | 20 ++++++++++++++++----
 packages/dashboard/vitest.config.ts                  |  5 -----
 scripts/lib/test-quarantine.json                     |  5 -----
 5 files changed, 23 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-8936

Fusion-Task-Lineage: ed869b67-9394-458b-879c-54da0d7d327e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 23:08:11 -07:00
Phil Larson
a5c3476cb2 fix: harden pinned worktree recovery cleanup (#3402)
## Summary
- serialize pinned-path classification, orphan preservation, quarantine
reconciliation, and recreation under one reservation
- preserve cross-filesystem orphans atomically beside the configured
worktree root and retain the newest 10 generated entries per recovery
root
- exclude recovery containers from pool and self-healing scans, with
fail-closed symlink and active-session guards
- document recovery location and retention behavior

## Test plan
- `pnpm --filter @fusion/engine exec vitest run
src/__tests__/worktree-acquisition.test.ts
src/__tests__/worktree-paths.test.ts src/__tests__/worktree-pool.test.ts
src/__tests__/self-healing-tempdir-sweep.test.ts --silent=passed-only
--reporter=dot`
- `pnpm --filter @fusion/engine typecheck`
- `pnpm --filter @fusion/engine build`
- `pnpm test:gate:static`
- `pnpm check:changesets --strict`
- `pnpm check:fnxc-future-dates`


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Preserves orphaned pinned worktrees during recovery, including across
filesystems.
* Retains the 10 most recent recovery entries and safely skips active or
invalid entries.
* Keeps recovery data separate from normal worktree discovery, cleanup,
and capacity checks.
* Adds safeguards for path containment, active-session ownership, and
concurrent recovery.

* **Bug Fixes**
* Prevents pinned worktree data from being lost during recreation or
quarantine cleanup.
* Ensures recovery cleanup failures do not interrupt worktree
acquisition.

* **Documentation**
* Documented orphan recovery, retention, fallback behavior, and cleanup
safeguards.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-09 19:39:39 -10:00
gsxdsm
1474c617b5 FN-8918: suppress false parked-task alerts
Prevent stale self-healing observations from notifying operators about active or intentionally held tasks.

- Require ownerless self-healing proof before classifying a task as wedged.
- Revalidate live tasks and suppress notifications for progressing, held, deleted, archived, or complete-lane rows.
- Cover reviewing, typed not-found reads, and archived episode resolution; document the behavior.
- Add a patch changeset for the notification fix.

Files changed:
 .changeset/fn-8918-false-parked-task-alerts.md     |   7 ++
 docs/agents.md                                     |   2 +-
 docs/architecture.md                               |   2 +-
 packages/engine/src/notification/__tests__/task-wedge-notification.test.ts | 121 +++++++++++++++++++--
 packages/engine/src/notification/notification-service.ts | 34 ++++--
 packages/engine/src/notification/task-wedge-notification.ts | 21 +++-
 6 files changed, 166 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-8918

Fusion-Task-Lineage: 4da385aa-c625-40c5-a781-36becdf94fe5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 21:57:01 -07:00
gsxdsm
aac090d0c3 FN-8866: add Command Center agent activity timeline
Add a Command Center live agent activity log with historical navigation.

- Stream and paginate organization-wide agent activity with timeline filters.
- Link activity rows to agent details and task views while reusing feed presentation.
- Add localized copy, documentation, a minor changeset, and coverage for live and scroll-back behavior.

Files changed:
 .changeset/fn-8866-agent-activity-surfaces.md      |   7 +
 docs/dashboard-guide.md                            |   1 +
 packages/dashboard/app/App.tsx                     |  12 ++
 packages/dashboard/app/components/ActivityFeed.tsx |  77 ++++----
 packages/dashboard/app/components/AgentsView.tsx   |  13 +-
 .../__tests__/AgentsView.focus-agent.test.tsx      |  59 ++++++
 .../command-center/AgentActivityPanel.css          |  98 +++++++++
 .../command-center/AgentActivityPanel.tsx          |  99 ++++++++++
 .../components/command-center/CommandCenter.tsx    |   9 +
 .../__tests__/AgentActivityPanel.mobile.test.ts    |  15 ++
 .../AgentActivityPanel.sse-integration.test.tsx    |  96 +++++++++
 .../__tests__/AgentActivityPanel.test.tsx          | 121 ++++++++++++
 .../__tests__/CommandCenter.test.tsx               |  27 ++-
 .../__tests__/agentActivityCursor.test.ts          |  47 +++++
 .../__tests__/useAgentActivity.test.tsx            |  14 ++
 .../command-center/agentActivityCursor.ts          |  75 +++++++
 .../command-center/agentActivityPresentation.tsx   |   8 +
 .../components/command-center/useAgentActivity.ts  | 218 +++++++++++++++++++++
 .../app/components/dashboard/MainContent.tsx       |  19 ++
 .../MainContent.agent-activity-navigation.test.tsx | 127 ++++++++++++
 .../dashboard/app/components/dashboard/types.ts    |   3 +
 packages/i18n/locales/en/app.json                  |  30 ++-
 packages/i18n/locales/es/app.json                  |  30 ++-
 packages/i18n/locales/fr/app.json                  |  30 ++-
 packages/i18n/locales/ko/app.json                  |  30 ++-
 packages/i18n/locales/pt-BR/app.json               |  30 ++-
 packages/i18n/locales/zh-CN/app.json               |  30 ++-
 packages/i18n/locales/zh-TW/app.json               |  30 ++-
 28 files changed, 1312 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-8866

Fusion-Task-Lineage: 817ae76e-52c6-4221-8642-df757e773627

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 20:19:52 -07:00
gsxdsm
f5a9cf01b1 FN-8912: recover stale merge status after aborts
Clear orphaned transient merge statuses so bounded retries can proceed.

- Fence aborted merge generations from writing transient task statuses.
- Reconcile and clear unconfirmed merge stamps in the queue and stale-state recovery paths.
- Cover timeout, abort, retry, and self-healing behavior with regression tests.

Files changed:
 .changeset/fn-8912-merge-abort-transient-status.md |   7 +
 docs/architecture.md                               |   1 +
 docs/task-management.md                            |   2 +-
 .../merge-abort-clears-transient-status.test.ts    | 410 +++++++++++++++++++++
 .../src/__tests__/merge-active-status.test.ts      |  21 ++
 packages/engine/src/__tests__/self-healing.test.ts | 231 ++++++++++--
 packages/engine/src/merge/merge-active-status.ts   |  18 +
 packages/engine/src/merge/merger-ai.ts             |  34 +-
 packages/engine/src/project-engine.ts              |  49 ++-
 packages/engine/src/self-healing.ts                |  72 +++-
 10 files changed, 810 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-8912

Fusion-Task-Lineage: 8b2b7506-ed3e-41d4-9e54-59f45abc0020

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 20:14:10 -07:00
gsxdsm
1cf86baa1c refactor: package code organization wave 18 (executor pure peels) (#3317)
## Summary

Wave 18 continues the package code-organization program after wave 17
domain folders (U4 Slice A from
`docs/plans/2026-07-14-001-refactor-package-code-organization-plan.md`).

### What changed
Peel **pure, behavior-preserving** helpers out of
`packages/engine/src/executor.ts` into domain modules under
`packages/engine/src/executor/`, with **stable re-exports** from
`executor.ts` so deep imports and `vi.mock("../executor.js")` keep
working.

| New module | Symbols |
|------------|---------|
| `executor/task-done-refusal.ts` | `evaluateTaskDoneRefusal`,
`determineRevisionResetStart`, skip-bypass refusal helper |
| `executor/workflow-feedback-paths.ts` |
`extractReferencedPathsFromWorkflowFeedback`,
`isAlwaysAllowedScopeLeakPath`, `workflowPathMatchesDeclaredScope` |
| `executor/workflow-step-verdict.ts` |
`FUSION_WORKFLOW_STEP_CONVENTIONS_PREAMBLE`, `parseWorkflowStepVerdict`
/ `parseWorkflowStepOutput`, step outcome types |
| `executor/await-input-parse.ts` | `parseAwaitInputSentinel`,
`parseAwaitInputQuestionToolCall` |
| `executor/no-commit-eligibility.ts` | `getNoCommitEligibilityReason`
(+ prompt heuristics) |

`executor.ts` live LOC ~**22817 → ~22427** (first pure-peel batch; more
peels needed to approach the 2k cap).

### Shims
- `old path` `executor.ts` public exports → `new path` `executor/*.ts` →
delete-when consumer deep-imports are re-pointed (not this PR)

### Test plan
- [x] `@fusion/engine` typecheck
- [x] Oracle: task-done refusal, skip-bypass, workflow malformed
verdict, scope-leak allowlist, executor-step-session, executor-prompt
- [x] `vitest --project=engine-core` (merge-gate curated suite)
- [ ] CI merge gate

**Stack:** wave17 (merged) → **this PR**

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Improved recognition of workflow outcomes from structured and
conversational responses.
* Added support for extracting questions from await-input responses and
tool calls.
* Improved workflow feedback handling for referenced files and declared
scope patterns.
* Added clearer guidance for task execution, approvals, verification,
and available tools.

* **Bug Fixes**
* Prevented completion when required review approvals are missing or
revisions remain pending.
* Improved handling of workflows that legitimately require no code
changes.
  * Added clearer refusal messages and more reliable revision restarts.
  * Sanitized repository paths in Git remediation instructions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-09 15:46:09 -10:00
gsxdsm
fc4beefe5e docs: index agent-activity-contract.md in README
Add missing index entry for docs/agent-activity-contract.md in the
Architecture & Development section. The doc was a genuine orphan —
a canonical wire/cursor/retention contract for GET /api/agent-activity
referenced in AGENTS.md but not discoverable from the docs index.
2026-08-09 17:50:58 -07:00
gsxdsm
234430a978 FN-8865: show live agent activity in org charts
Expose live per-agent activity throughout the dashboard org chart and active-agent cards.

- Add an activity store with polling, visibility refresh, and reduced-motion support.

- Render activity labels and active indicators in org-chart nodes and agent panels.

- Cover activity normalization, polling behavior, and dashboard presentation with tests.

Files changed:

 .changeset/fn-8865-live-agent-activity.md          |   7 +
 docs/dashboard-guide.md                            |   1 +
 packages/dashboard/app/api.ts                      |  11 +-
 .../dashboard/app/components/ActiveAgentsPanel.css |  20 ++
 .../dashboard/app/components/ActiveAgentsPanel.tsx |  28 ++-
 packages/dashboard/app/components/AgentsView.css   |  39 ++++
 packages/dashboard/app/components/AgentsView.tsx   |  62 +++++-
 .../__tests__/ActiveAgentsPanel.test.tsx           | 122 ++++++++++-
 .../AgentsView.orgchart.activity.test.tsx          | 235 +++++++++++++++++++++
 .../__tests__/AgentsView.orgchart.test.tsx         |   7 +
 .../__tests__/agentsOrgChartActivity.test.ts       | 137 ++++++++++++
 .../app/components/agentsOrgChartActivity.ts       | 156 ++++++++++++++
 .../app/hooks/__tests__/agentActivityStore.test.ts | 179 ++++++++++++++++
 .../app/hooks/__tests__/useAgentActivity.test.tsx  |  60 ++++++
 packages/dashboard/app/hooks/agentActivityStore.ts | 221 +++++++++++++++++++
 packages/dashboard/app/hooks/useAgentActivity.ts   |  18 ++
 packages/dashboard/app/hooks/useReducedMotion.ts   |  23 ++
 17 files changed, 1307 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-8865

Fusion-Task-Lineage: 04413da2-4114-4a19-9b6b-152f12c95ac6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 17:10:49 -07:00
Victor Canô
a09e0cb87f feat(i18n): add Português (Brasil) (pt-BR) locale (#3347)
## Summary

Adds **Português (Brasil)** (`pt-BR`) as a supported locale:

- Selectable as **Translation target language** (project settings) and
as the dashboard / terminal UI language.
- Full machine-drafted catalogs (`app`, `cli`, `common`), disclosed in
`packages/i18n/locales/TRANSLATION_STATUS.md` following the pattern
#1352 established — reviewed for glossary/register consistency (0.18%
untranslated, matching only keys that are empty in `en`), but
native-speaker corrections are welcome.
- Brazilian Portuguese content-language detection (accent-stripped
stopword list — the scorer strips diacritics before matching, so
accented entries never match; `com`/`mais` deliberately omitted to avoid
bare-domain `.com` and French collisions, with regression tests for both
directions).
- `pt`/`pt-PT` browser and environment locales resolve to `pt-BR` on all
three detection paths (`FALLBACK_LNG` routing plus a `pt` branch in
`normalizeToSupportedLocale`, mirroring the existing `zh` handling).
- `README.pt-BR.md` + switcher links in all READMEs, docs updates
(`settings-reference`, `cli-reference`, `i18n-contributing`, `--lang`
help text), changeset (`minor`).

Drive-by fixes bundled: `TRANSLATION_STATUS.md` was missing the `ko`
row; the LanguageSelector endonym test was missing `한국어`;
`docs/i18n-contributing.md` now names the two compile-enforced display
maps (`LOCALE_LABELS`, `localeDisplayName`) a new locale must update;
the `--lang` CLI help text no longer drifts from its validator.

## Test plan

- `pnpm i18n:status` (key parity gate) green; catalogs are
`i18n:sync`-idempotent.
- Updated/extended suites: core `locale-settings`, i18n
`config`/`parity`/`db-banner-catalog`/`i18n-gate-coverage`, dashboard
`useLanguage`/`LanguageSelector`/`GeneralSection.importTranslate`/`detectContentLanguage`
(incl. new pt-BR detection + bare-domain regression tests), CLI
`settings`.
- `pnpm verify:fast` (typecheck, build, boot smoke), `pnpm lint`, `pnpm
check:changesets`, and the bounded `pnpm test` lane all green locally
(the three `test:pg-gate` files fail locally only for lack of a Postgres
instance; they fail identically on clean `main`).


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added Brazilian Portuguese (Português (Brasil)) across the dashboard,
terminal interface, settings, and translation tools.
  * Added Portuguese translations for common interface and CLI content.
* Added automatic Portuguese language detection, locale normalization,
and fallback support.
* Added a Portuguese (Brazil) README with product, setup, and usage
documentation.

* **Documentation**
* Updated language selectors, CLI references, settings documentation,
and translation guidance.
  * Added Portuguese README links to translated documentation.
  * Added French to the documented dashboard language options.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: gsxdsm <gsxdsm@users.noreply.github.com>
2026-08-09 13:33:16 -10:00
gsxdsm
6bd8004ba1 FN-8915: document agent activity API contract
Publish an inspectable contract for durable agent-activity history and pagination.

- Define the route wire shape, cursor semantics, retention, and SSE recovery behavior.
- Add PostgreSQL and dashboard coverage for documented pagination and truncation guarantees.
- Link architecture and diagnostics guidance to the canonical contract and validate its prerequisite lineage.

Files changed:
 .changeset/fn-8864-agent-activity-events.md        |  2 +-
 AGENTS.md                                          |  1 +
 docs/agent-activity-contract.md                    | 94 ++++++++++++++++++++++
 docs/architecture.md                               |  2 +-
 docs/diagnostics.md                                |  2 +-
 .../agent-activity-cursor-contract.pg.test.ts      | 90 +++++++++++++++++++++
 .../src/__tests__/agent-activity-route.test.ts     | 10 +++
 .../src/__tests__/sse-agent-activity.test.ts       | 12 ++-
 scripts/check-fn-8864-ancestry.sh                  | 35 ++++++++
 9 files changed, 244 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8915

Fusion-Task-Lineage: da3f8c96-3b58-4e6d-a413-c51bdd643f26

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 15:58:54 -07:00
gsxdsm
8a7ab1dedc FN-8911: allow direct database URLs for planning locks
Allow planning lifecycle locks to use non-pooled runtime PostgreSQL connections without a duplicate migration URL.

- Select runtime-direct endpoints for direct DATABASE_URL connections and retain migration overrides for pooled endpoints.
- Preserve lifecycle transport failures across triage retries and expose lock helpers through the core barrel.
- Document the connection behavior and add resolver, advisory-lock, and triage regression coverage.

Files changed:
 .../fn-8911-direct-database-url-planning-lock.md   |   7 +
 docs/architecture.md                               |   2 +-
 docs/multi-project.md                              |   4 +-
 .../__tests__/postgres/backend-resolver.test.ts    |  43 +++++-
 .../planning-lifecycle-advisory-lock.pg.test.ts    |  28 +++-
 packages/core/src/index.ts                         |   2 +
 packages/core/src/postgres/advisory-locks.ts       |   6 +-
 packages/core/src/postgres/backend-resolver.ts     |  29 +++-
 packages/core/src/postgres/index.ts                |   5 +
 ...ge-planning-lifecycle-transport-failure.test.ts | 159 +++++++++++++++++++++
 packages/engine/src/triage.ts                      | 100 +++++++++++--
 11 files changed, 360 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8911
Fusion-Task-Lineage: ac2ec0d6-f409-40ba-a678-6dd7da7006dd
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 15:24:21 -07:00
gsxdsm
3aa32a846c FN-8910: allow held tasks to remediate review findings
Allow pre-merge remediation to proceed under project-level merge holds while preserving task-level operator holds.

- Restrict remediation holds to operator-authored task-level auto-merge settings
- Record remediation and revision-budget refusals for parked review tasks
- Keep fire-and-forget remediation failures in their review lane
- Cover shared-branch recovery behavior and document the policy

Files changed:
 .changeset/fn-8910-premerge-remediation-hold.md    |  7 ++
 docs/workflow-steps.md                             |  2 +
 packages/core/src/__tests__/task-merge.test.ts     | 44 ++++++-------
 packages/core/src/merge/task-merge.ts              | 20 +++---
 .../__tests__/executor-graph-requeue-gate.test.ts  | 60 ++++++++++++++++-
 ...cutor-live-branch-group-auto-merge-hold.test.ts | 63 ++++++++++++++++--
 .../workflow-graph-optional-step-fix.test.ts       | 24 +++++--
 .../src/__tests__/workflow-task-runtime.test.ts    | 10 ++-
 packages/engine/src/executor.ts                    | 76 ++++++++++++++++++----
 9 files changed, 244 insertions(+), 62 deletions(-)

Fusion-Task-Id: FN-8910

Fusion-Task-Lineage: b5e10f87-67cf-4acf-b125-91be5ade17a8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 15:16:12 -07:00
gsxdsm
6bd178bdcf FN-8864: add durable agent activity stream
Add a persisted, project-scoped agent activity feed with query and live delivery surfaces.

- Store sequenced, attributed activity events with privacy-safe metadata and retention.

- Emit activity across agents, workflow execution, reviews, approvals, merges, and recovery.

- Provide paginated API history and resilient SSE tailing with coverage and documentation.

- Renumber the activity migration to 0049 after reconciling main’s 0048 GitHub check-state migration.

Files changed:

 .changeset/fn-8864-agent-activity-events.md        |   7 +
 docs/architecture.md                               |   8 +
 docs/diagnostics.md                                |   4 +
 docs/storage.md                                    |   1 +
 .../__tests__/agent-activity-attribution.test.ts   |  21 +
 .../agent-activity-metadata-hygiene.test.ts        |  60 +++
 .../src/__tests__/agent-activity-writers.test.ts   |  94 +++++
 .../postgres/agent-activity-events.pg.test.ts      |  57 +++
 .../src/__tests__/postgres/schema-applier.test.ts  |  34 +-
 packages/core/src/agents/agent-store.ts            |  24 ++
 packages/core/src/agents/approval-request-store.ts |  15 +-
 packages/core/src/index.ts                         |   4 +
 .../0049_fn_8864_agent_activity_events.sql         |  24 ++
 packages/core/src/postgres/schema-applier.ts       |  15 +-
 packages/core/src/postgres/schema/project.ts       |  19 +-
 packages/core/src/store.ts                         |  17 +
 .../core/src/task-store/agent-activity-outbox.ts   |  75 ++++
 .../src/task-store/async/async-agent-activity.ts   |  71 ++++
 packages/core/src/types.ts                         |   2 +
 packages/core/src/types/agents/agents.ts           |  79 ++++
 packages/dashboard/app/api.ts                      |  54 +++
 .../src/__tests__/agent-activity-route.test.ts     |  68 ++++
 .../src/__tests__/sse-agent-activity.test.ts       | 315 +++++++++++++++
 packages/dashboard/src/routes/README.md            |   2 +-
 .../src/routes/register-setup-activity-routes.ts   |  19 +-
 packages/dashboard/src/sse.ts                      | 139 ++++++-
 .../src/__tests__/agent-activity-writers.test.ts   | 442 +++++++++++++++++++++
 packages/engine/src/executor.ts                    | 110 ++++-
 packages/engine/src/merger.ts                      |  15 +-
 packages/engine/src/self-healing.ts                |  35 +-
 30 files changed, 1809 insertions(+), 21 deletions(-)

Fusion-Task-Id: FN-8864
Fusion-Task-Lineage: 4938f35b-a0bc-4eb3-905c-178fed859cc6
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 14:39:17 -07:00
gsxdsm
3ca5d4d643 FN-8913: prioritize older tasks in hold-release scheduling
Rank eligible hold-release candidates by priority, age, and task ID to prevent newer work from starving older peers.

- Reuse the core priority-age-ID comparator for hold-release evaluation.
- Add regression coverage for priority, age, dependency, and overlap scheduling behavior.
- Document the production hold-release fairness order and add a patch changeset.

Files changed:
 .changeset/fn-8913-older-first-scheduling.md       |   7 ++
 docs/architecture.md                               |   4 +-
 .../hold-release-priority-age-order.test.ts        | 113 +++++++++++++++++++++
 .../__tests__/scheduler-overlap-starvation.test.ts |  76 ++++++++++++++
 packages/engine/src/execution/hold-release.ts      |  17 +++-
 5 files changed, 212 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-8913

Fusion-Task-Lineage: 89910df9-9d3a-404c-85fa-f0797e8fa001

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 14:23:24 -07:00
gsxdsm
ad91795dac FN-8843: assign eligible executors to new tasks
Assign durable executor ownership during shared task intake.

- Resolve eligible executor owners for API, dashboard, and reserved-ID task creation.
- Preserve explicit assignments, reject invalid owners, and audit unresolved ownerless intake.
- Cover routing and PostgreSQL intake behavior with regression tests and document the contract.

Files changed:
 .changeset/fn-8843-intake-agent-assignment.md      |   7 +
 docs/architecture.md                               |   6 +
 docs/workflow-steps.md                             |  12 +-
 .../postgres/create-task-reserved-id.pg.test.ts    | 187 +++++++++++++++
 .../__tests__/task-intake-owner-resolver.test.ts   | 141 ++++++++++++
 packages/core/src/store.ts                         |  29 ++-
 packages/core/src/task-store/task-creation.ts      | 251 +++++++++++++++++----
 .../core/src/tasks/task-intake-owner-resolver.ts   | 239 ++++++++++++++++++++
 .../dashboard/src/__tests__/routes-tasks.test.ts   |  47 ++++
 .../__tests__/task-create-intake-owner.pg.test.ts  | 195 ++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    |  12 +-
 .../src/__tests__/workflow-agent-routing.test.ts   |  19 +-
 .../engine/src/agents/workflow-agent-router.ts     |  37 ++-
 13 files changed, 1120 insertions(+), 62 deletions(-)

Fusion-Task-Id: FN-8843

Fusion-Task-Lineage: b94728b4-d9e8-4a26-8fbc-7096eb797839

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 14:12:49 -07:00
gsxdsm
29bb6d0dc2 FN-8868: restore durable agent activity telemetry
Restore Activity telemetry for durable agent sessions.

- Emit session-start and usage events across durable agent lanes.
- Count durable agent sessions and user messages in Activity analytics.
- Cover lifecycle wiring and telemetry persistence with tests.

Files changed: .../fn-8868-durable-agent-activity-telemetry.md    |   7 +
 docs/dashboard-guide.md                            |   8 +-
 .../message-store-user-message-telemetry.test.ts   |  73 ++++++++++
 ...mmand-center-activity-durable-agents.pg.test.ts | 158 +++++++++++++++++++++
 packages/core/src/board/activity-analytics.ts      |  12 +-
 packages/core/src/stores/message-store.ts          |  16 +++
 packages/core/src/task-store/async/async-events.ts |  11 ++
 .../dashboard/src/__tests__/chat-manager.test.ts   |  88 ++++++++++++
 packages/dashboard/src/chat.ts                     |  17 +++
 .../__tests__/agent-usage-telemetry-lanes.test.ts  |  84 +++++++++++
 .../__tests__/agent-usage-telemetry-wiring.test.ts | 119 ++++++++++++++++
 .../src/__tests__/agent-usage-telemetry.test.ts    |  33 +++++
 .../engine/src/__tests__/executor-prompt.test.ts   |   8 ++
 packages/engine/src/__tests__/merger-ai.test.ts    |  11 ++
 .../src/__tests__/merger-merge-lifecycle.test.ts   |  21 ++-
 packages/engine/src/__tests__/reviewer.test.ts     |  58 +++++++-
 .../src/__tests__/step-session-executor.test.ts    |  37 ++++-
 packages/engine/src/__tests__/triage.test.ts       |  31 ++++
 packages/engine/src/agent-heartbeat.ts             |  43 ++++++
 packages/engine/src/agents/agent-logger.ts         |  30 +++-
 .../engine/src/agents/agent-usage-telemetry.ts     |  30 ++++
 packages/engine/src/execution/reviewer.ts          |  41 +++++-
 .../engine/src/execution/step-session-executor.ts  |  12 ++
 packages/engine/src/executor.ts                    |  27 +++-
 packages/engine/src/merge/merger-ai.ts             |   7 +
 packages/engine/src/merger.ts                      | 120 +++++++++++++++-
 packages/engine/src/triage.ts                      |   5 +
 27 files changed, 1085 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-8868

Fusion-Task-Lineage: 0aa2ee4e-4d40-4adc-a510-bf8f4b1c0233

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 10:28:24 -07:00
gsxdsm
c7c879905b FN-8903: add event-driven GitHub CI merge checks
Persist ingested GitHub CI signals and use them to assess merge readiness.

- Store project-scoped GitHub check states with retention maintenance.
- Resolve configured required checks from ingested signals during PR merge decisions.
- Add delivery, lifecycle, persistence, and retention coverage with operator documentation.

Files changed:
 .changeset/fn-8903-event-driven-checks.md          |   7 ++
 docs/architecture.md                               |   1 +
 docs/settings-reference.md                         |   2 +-
 docs/signals-connectors.md                         |   2 +-
 .../src/commands/__tests__/task-lifecycle.test.ts  |  50 ++++++++-
 packages/cli/src/commands/task-lifecycle.ts        |   7 +-
 .../core/src/__tests__/ingested-checks.test.ts     |  66 +++++++++++
 .../postgres/github-check-states.pg.test.ts        |  71 ++++++++++++
 packages/core/src/config/index.ts                  |   1 +
 packages/core/src/config/ingested-checks.ts        |  32 ++++++
 packages/core/src/index.ts                         |  10 ++
 .../0048_fn_8903_github_check_states.sql           |  32 ++++++
 packages/core/src/postgres/schema-applier.ts       |  15 ++-
 packages/core/src/postgres/schema/project.ts       |  29 ++++-
 .../core/src/task-store/async/async-ci-checks.ts   | 104 ++++++++++++++++++
 packages/core/src/task-store/async/index.ts        |   1 +
 packages/core/src/types.ts                         |   2 +
 packages/dashboard/src/__tests__/github.test.ts    | 121 ++++++++++++++++++++-
 .../src/__tests__/register-signal-routes.test.ts   |  81 +++++++++++++-
 packages/dashboard/src/github.ts                   |  74 +++++++++----
 .../dashboard/src/routes/register-git-github.ts    |  29 +++--
 .../dashboard/src/routes/register-signal-routes.ts |  10 +-
 .../src/routes/register-task-workflow-routes.ts    |  14 ++-
 packages/dashboard/src/signal-source.ts            |  23 ++++
 packages/dashboard/src/signal-sources/github.ts    |   2 +
 .../self-healing-github-check-retention.test.ts    | 121 +++++++++++++++++++++
 packages/engine/src/self-healing.ts                |  23 ++++
 27 files changed, 878 insertions(+), 52 deletions(-)

Fusion-Task-Id: FN-8903
Fusion-Task-Lineage: b2643587-c568-4b6c-8b3a-d50a6165963d
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 09:14:56 -07:00
gsxdsm
b6af36916e FN-8877: import GitHub issue images into planning mode
Planning Mode now preserves eligible GitHub issue and comment images through task creation.

- Capture image-bearing issue and cached comment bodies when starting Planning Mode.
- Persist validated image URLs with planning provenance and attach them after task creation.
- Bound browser transport and server downloads while covering the import flow with regression tests.

Files changed:
 .../fn-8877-planning-issue-image-attachments.md    |   7 ++
 docs/dashboard-guide.md                            |   4 +-
 .../dashboard/app/components/GitHubImportModal.tsx |  43 +++++--
 .../__tests__/GitHubImportModal.test.tsx           | 111 ++++++++++++++++++
 .../src/__tests__/issue-image-attachments.test.ts  |  33 +++++-
 .../planning-body-parser-integration.test.ts       |  58 ++++++++++
 .../__tests__/planning-e2e-plan-creation.test.ts   |  34 ++++++
 .../__tests__/routes-planning-issue-images.test.ts | 127 +++++++++++++++++++++
 .../src/__tests__/routes-planning-tracking.test.ts |   3 +
 packages/dashboard/src/issue-image-attachments.ts  |  37 ++++--
 packages/dashboard/src/issue-image-markup.ts       |   6 +
 packages/dashboard/src/planning.ts                 |  31 ++++-
 .../src/routes/register-planning-subtask-routes.ts |  28 ++++-
 packages/dashboard/src/server.ts                   |  33 ++++--
 14 files changed, 518 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-8877

Fusion-Task-Lineage: 057a8a2b-1c0f-4502-9fb3-7ee136d39563

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 08:31:26 -07:00
gsxdsm
661b2cf7b3 FN-8899: document unified AI merge path
Clarify that approved work is merged exclusively through the clean-room AI merge workflow.

- Replace the legacy merger entry point with runAiMerge in the architecture overview.
- Mark aiMergeTask as retained, soft-deprecated, and inert.

Files changed:
 docs/architecture.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Fusion-Task-Id: FN-8899

Fusion-Task-Lineage: 03436366-3f48-46c7-908e-ff97843b81d9

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 07:22:31 -07:00
gsxdsm
d09e3e5554 FN-8861: preserve GitHub issue context in planning
Preserve imported GitHub issue provenance through Planning Mode and source tracking.

- Pass structured GitHub issue context from import through planning task creation.
- Append source-issue metadata to planned tasks and safely link each source issue once.
- Cover provenance persistence, duplicate suppression, and planning UI handoff.

Files changed:
 .changeset/fn-8861-planning-source-issue.md        |   7 ++
 docs/dashboard-guide.md                            |   8 +-
 docs/settings-reference.md                         |   2 +-
 packages/dashboard/app/App.tsx                     |   4 +-
 packages/dashboard/app/api/planning/planning.ts    |   3 +-
 packages/dashboard/app/components/AppModals.tsx    |   2 +-
 .../dashboard/app/components/GitHubImportModal.tsx |  13 +--
 .../dashboard/app/components/PlanningModeModal.tsx |   5 +-
 .../__tests__/GitHubImportModal.test.tsx           |  34 ++++++
 .../app/components/dashboard/PlanningKeepAlive.tsx |   1 +
 .../dashboard/app/components/dashboard/types.ts    |   2 +-
 .../app/hooks/__tests__/useModalManager.test.ts    |  26 ++++-
 packages/dashboard/app/hooks/useModalManager.ts    |  17 ++-
 .../src/__tests__/github-tracking.test.ts          | 125 ++++++++++++++++++++-
 packages/dashboard/src/__tests__/github.test.ts    |  78 ++++++++++++-
 .../__tests__/planning-e2e-plan-creation.test.ts   |  49 +++++++-
 .../src/__tests__/planning-source-issue.test.ts    |  61 ++++++++++
 .../src/__tests__/routes-planning-tracking.test.ts | 118 ++++++++++++++++++-
 packages/dashboard/src/github-tracking.ts          | 112 ++++++++++++++++--
 packages/dashboard/src/github.ts                   |  50 +++++++++
 packages/dashboard/src/planning.ts                 |  48 +++++++-
 .../dashboard/src/routes/register-git-github.ts    |  31 +----
 .../src/routes/register-planning-subtask-routes.ts |  69 +++++++++++-
 23 files changed, 785 insertions(+), 80 deletions(-)

Fusion-Task-Id: FN-8861
Fusion-Task-Lineage: b2433f70-9c1b-47ef-bafa-0434861cd0a8
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 07:06:06 -07:00
gsxdsm
569d2eee91 FN-8885: add GitHub CI signal ingestion
Ingest signed GitHub CI webhook outcomes into Command Center incidents.

- Support check_suite, workflow_run, and status events with HMAC verification.
- Resolve the latest matching open incident for successful recovery events without creating tasks.
- Document GitHub signal configuration and add connector, route, and monitor-store coverage.

Files changed:
 .changeset/fn-8885-github-signals-connector.md     |   7 ++
 docs/dashboard-guide.md                            |   2 +-
 docs/settings-reference.md                         |   1 +
 docs/signals-connectors.md                         |  31 ++++-
 .../core/src/task-store/async/async-monitor.ts     |  30 ++---
 packages/dashboard/README.md                       |   5 +-
 .../src/__tests__/github-signal-source.test.ts     |  49 ++++++++
 .../src/__tests__/monitor-store.pg.test.ts         |  35 ++++++
 .../src/__tests__/register-signal-routes.test.ts   | 132 +++++++++++++++++++-
 packages/dashboard/src/monitor-store.ts            |  28 ++---
 .../dashboard/src/routes/register-signal-routes.ts |  25 ++++
 packages/dashboard/src/signal-source.ts            |  17 ++-
 packages/dashboard/src/signal-sources/github.ts    | 135 +++++++++++++++++++++
 13 files changed, 461 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-8885

Fusion-Task-Lineage: d2e9f6ed-95fe-4387-81bd-2ee67b2e1283

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 06:51:22 -07:00
gsxdsm
98ad663011 FN-8872: add structural mail reports from chat
Add a report-oriented mail workflow that turns completed chat responses into structured, reviewable messages.

- Render structural report items with dedicated visual treatment and tests across mail surfaces.
- Add report-mode composer fields and route Send as report handoffs from completed chat responses.
- Document the mail/chat workflow and publish a Fusion changeset.

Files changed:
 .changeset/fn-8872-structural-mail-ui.md           |   7 +
 docs/dashboard-guide.md                            |   3 +
 packages/dashboard/app/App.tsx                     |   9 +
 packages/dashboard/app/components/ChatView.tsx     |  36 ++--
 packages/dashboard/app/components/MailboxModal.tsx |  28 ++-
 .../app/components/MailboxStructuralItem.css       |  73 +++++++
 .../app/components/MailboxStructuralItem.tsx       | 100 ++++++++++
 packages/dashboard/app/components/MailboxView.tsx  |  50 ++++-
 .../dashboard/app/components/MessageComposer.css   |  18 ++
 .../dashboard/app/components/MessageComposer.tsx   |  57 +++++-
 .../__tests__/ChatMailReportRouting.test.tsx       | 144 ++++++++++++++
 .../__tests__/ChatView.send-as-report.test.tsx     |  96 +++++++++
 .../__tests__/MailboxStructuralItem.test.tsx       |  90 +++++++++
 .../MailboxStructuralMail.surfaces.test.tsx        | 217 +++++++++++++++++++++
 .../app/components/__tests__/MailboxView.test.tsx  |  28 +++
 .../__tests__/MessageComposer.report-mode.test.tsx | 106 ++++++++++
 .../components/__tests__/chatReportHandoff.test.ts |  26 +++
 .../dashboard/app/components/chatReportHandoff.ts  |  65 ++++++
 .../app/components/dashboard/MainContent.tsx       |   4 +
 .../dashboard/app/components/dashboard/types.ts    |   3 +
 20 files changed, 1135 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-8872

Fusion-Task-Lineage: 55e4bf5e-e7f3-48a5-8084-4090ab24710a

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 06:07:01 -07:00
gsxdsm
3d6a908b95 FN-8898: document inert prerebase settings
Clarify that legacy prerebase settings are inert on the production merge path.

- Mark retained prerebase configuration and audit events as legacy-only.
- Add a static validator and tests preventing new prerebase callers.
- Update merge architecture, testing, and settings documentation.

Files changed:
 AGENTS.md                                          |   2 +-
 docs/architecture.md                               |   3 +-
 docs/settings-reference.md                         |   6 +-
 docs/testing.md                                    |   2 +-
 package.json                                       |   6 +-
 packages/core/src/types/settings/settings-scope.ts |  32 +++--
 .../src/errors/transient-merge-error-classifier.ts |  12 +-
 packages/engine/src/merge/merger-auto-prerebase.ts |  12 +-
 packages/engine/src/util/run-audit.ts              |   2 +
 scripts/__tests__/check-prerebase-inert.test.mjs   |  73 +++++++++++
 scripts/__tests__/run-static-gate-checks.test.mjs  |   1 +
 scripts/__tests__/verify-fast.test.mjs             |   1 +
 scripts/check-prerebase-inert.mjs                  | 146 +++++++++++++++++++++
 scripts/lib/source-projection.mjs                  |  87 ++++++++++++
 14 files changed, 359 insertions(+), 26 deletions(-)

Fusion-Task-Id: FN-8898

Fusion-Task-Lineage: 9cfd836d-17c2-44a0-a076-56fef0917935

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 06:01:02 -07:00
gsxdsm
74b4de3d19 FN-8883: migrate executor tests to StepSessionExecutor seam
Route executor lifecycle tests through graph-owned StepSessionExecutor fixtures.

- Add reusable workflow routing, worktree refresh, and implementation-session test helpers
- Update executor prompt, step-session, pause, and completion assertions for graph-owned sessions
- Document the graph executor fixture seams for focused verification

Files changed:
 docs/testing.md                                    |   3 +
 .../__tests__/ephemeral-task-create-gate.test.ts   |  29 +-
 .../engine/src/__tests__/executor-prompt.test.ts   | 417 ++++++++++++---------
 .../src/__tests__/executor-review-verdicts.test.ts |   2 +-
 .../executor-step-numbering-zero-based.test.ts     |  23 +-
 .../src/__tests__/executor-step-session.test.ts    | 152 ++++++--
 .../executor-task-done-summary.test.ts             |  14 +-
 .../engine/src/__tests__/executor-test-helpers.ts  |  65 +++-
 8 files changed, 468 insertions(+), 237 deletions(-)

Fusion-Task-Id: FN-8883

Fusion-Task-Lineage: 7ebbee52-fe43-4e18-b0e9-2253911a0acb

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 04:59:15 -07:00
gsxdsm
2643f4e567 FN-8884: enable GitHub-native PR auto-merge
Enable opt-in GitHub-managed auto-merge for pull requests.

- Add a project setting and dashboard control for GitHub native auto-merge.
- Arm individual, group, dashboard, and workflow PRs with `gh pr merge --auto` or GraphQL, including while checks are pending.
- Preserve deferred PR reconciliation, unavailable-feature errors, project-scoped runtime configuration, tests, documentation, and a release changeset.

Files changed:
 .changeset/fn-8884-github-native-auto-merge.md     |   7 +
 docs/settings-reference.md                         |   5 +
 packages/cli/src/commands/__tests__/daemon.test.ts |  16 +++
 packages/cli/src/commands/__tests__/serve.test.ts  |  14 ++
 .../src/commands/__tests__/task-lifecycle.test.ts  | 158 +++++++++++++++++++++
 packages/cli/src/commands/daemon.ts                |  11 +-
 packages/cli/src/commands/dashboard.ts             |  11 +-
 packages/cli/src/commands/serve.ts                 |  11 +-
 packages/cli/src/commands/task-lifecycle.ts        |  45 ++++--
 .../core/src/__tests__/settings-defaults.test.ts   |   4 +
 packages/core/src/config/settings-schema.ts        |   1 +
 packages/core/src/types/settings/settings-scope.ts |   8 ++
 .../settings/__tests__/section-keys.test.ts        |   1 +
 .../app/components/settings/section-keys.ts        |   1 +
 .../components/settings/sections/MergeSection.tsx  |  14 +-
 .../settings-default-descriptions.test.tsx         |   1 +
 .../src/__tests__/github-native-auto-merge.test.ts | 114 +++++++++++++++
 .../src/__tests__/routes-pr-merge.test.ts          |  84 +++++++++++
 packages/dashboard/src/github.ts                   |  88 +++++++++++--
 packages/dashboard/src/index.ts                    |   2 +-
 .../dashboard/src/routes/register-git-github.ts    |  33 +++--
 .../project-engine-deferred-startup.test.ts        |  21 +++
 packages/engine/src/project-engine-manager.ts      |   2 +
 packages/engine/src/project-engine.ts              |   6 +
 packages/engine/src/project/project-runtime.ts     |   6 +
 packages/engine/src/runtimes/in-process-runtime.ts |   9 +-
 packages/i18n/locales/en/app.json                  |   4 +-
 27 files changed, 634 insertions(+), 43 deletions(-)

Fusion-Task-Id: FN-8884

Fusion-Task-Lineage: cf1b1ea4-7ef7-4050-bd87-25933456a5b6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 04:50:30 -07:00
gsxdsm
c60a11607f FN-8856: bound scheduler hold-release sweep work
Keep hold-release scheduling and dashboard health checks responsive under PostgreSQL load.

- Batch and cache workflow-selection reads for each hold-release pass.
- Bound sweep execution, prevent overlapping project passes, and expose sweep instrumentation.
- Time-bound PostgreSQL health probes and add regression coverage.

Files changed:
 .changeset/fn-8856-hold-release-sweep-bounded.md   |   7 +
 docs/architecture.md                               |   6 +
 docs/diagnostics.md                                |   4 +
 .../__tests__/workflow-ir-selection-cache.test.ts  |  77 ++++
 packages/core/src/index.ts                         |   2 +
 packages/core/src/store.ts                         |   6 +-
 .../core/src/task-store/workflow-definitions.ts    |  25 ++
 .../core/src/workflows/workflow-ir-resolver.ts     |  27 +-
 .../__tests__/dashboard-postgres-health.test.ts    |  76 ++++
 .../dashboard/src/dashboard-postgres-health.ts     |  34 +-
 .../__tests__/hold-release-instrumentation.test.ts |  34 ++
 .../hold-release-sweep-bounded-db-work.test.ts     | 467 +++++++++++++++++++++
 packages/engine/src/execution/hold-release.ts      | 391 +++++++++--------
 packages/engine/src/scheduler.ts                   |  56 ++-
 14 files changed, 1021 insertions(+), 191 deletions(-)

Fusion-Task-Id: FN-8856

Fusion-Task-Lineage: 5fa55d95-0760-4c4d-8c6c-6e1805109b3c

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 04:37:47 -07:00
gsxdsm
cf171bc4b2 FN-8900: rescue deterministic Kimi K3 catalog test
Rescue Kimi K3 route coverage with a deterministic bundled-catalog registry seam.

- Use pi-ai's real Kimi catalog without live registry refresh.
- Restore route merge and deduplication coverage and remove the paired quarantine records.
- Document the measured refresh stall and preserve the existing timeout budget.

Files changed:
 docs/testing.md                                    |  3 +-
 packages/dashboard/package.json                    |  1 +
 .../src/__tests__/_kimi-model-catalog-fixture.ts   | 40 +++++++++
 ...ister-model-routes-kimi-k3-supplemental.test.ts | 75 ++++++-----------
 packages/dashboard/vitest.config.ts                | 19 ++---
 pnpm-lock.yaml                                     | 98 +++++++++++++++++-----
 scripts/lib/test-quarantine.json                   |  5 --
 7 files changed, 153 insertions(+), 88 deletions(-)

Fusion-Task-Id: FN-8900

Fusion-Task-Lineage: 6d4986ed-bc93-479f-85fb-510d17ced4b5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 03:47:56 -07:00
gsxdsm
7745c59e63 FN-8880: align shared-member recovery consent tests
Align recovery expectations with the shared-member consent policy.

- Hold non-opted-in shared members when project auto-merge is off.
- Cover explicit per-task auto-merge opt-in during startup and self-healing recovery.
- Document the project-off consent rule for branch-group members.

Files changed:
 AGENTS.md                                          |  2 +-
 docs/architecture.md                               |  4 +-
 packages/engine/src/__tests__/project-engine.test.ts    | 41 +++++++++++------
 packages/engine/src/__tests__/self-healing.test.ts | 51 +++++++++++++++++++---
 4 files changed, 75 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-8880

Fusion-Task-Lineage: 3118064d-59ca-4c2e-89a8-442ee8876cf8

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 02:41:02 -07:00
gsxdsm
ef99dcd1b0 FN-8894: model advancing clocks in oversight tests
Ensure TaskDetailModal mutation fixtures mirror server update timestamps.

- Add an advancing-clock task fixture helper for mutation responses
- Update desktop and mobile oversight control mocks to use newer task snapshots
- Cover equal-clock merge behavior and document the fixture contract

Files changed:
 docs/testing.md                                    |  6 ++
 .../TaskDetailModal.oversight-controls.test.tsx    | 74 +++++++++++++++++++++-
 .../TaskDetailModal.oversight-mobile.test.tsx      |  3 +-
 .../__tests__/TaskDetailModal.test-helpers.ts      | 15 +++++
 4 files changed, 94 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-8894

Fusion-Task-Lineage: 614eb85a-0fbf-4f44-a08d-347f2511499b

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 02:23:54 -07:00
gsxdsm
ccf2ffe93d FN-8854: document rebase settings and configuration audits
Document the worktree rebase controls and configuration audit surfaces.

- Describe worktree rebase defaults, remote resolution, and legacy pipeline reachability
- Explain configuration revisions and Activity Log query contracts
- Add source-aligned documentation contract coverage

Files changed:
 docs/diagnostics.md                                | 22 ++++-
 docs/settings-reference.md                         | 15 ++++
 .../configuration-audit-documentation.test.ts      | 94 ++++++++++++++++++++++
 3 files changed, 130 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-8854

Fusion-Task-Lineage: 5807280f-e1da-4847-8337-1c27c8ed695f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-09 02:06:44 -07:00