Commit Graph

139 Commits

Author SHA1 Message Date
gsxdsm
b07105dbfb fix(workflows): address workflow node PR feedback 2026-07-01 00:51:01 -07:00
gsxdsm
3a2f3b5ade refactor(workflow): extract node runner boundaries 2026-07-01 00:51:01 -07:00
Phil Larson
ddafada719 docs: add CE plan artifact for dashboard themes 2026-06-30 22:20:00 -07:00
gsxdsm
b169072224 fix(FN-7233): enforce workflow summary and done guards 2026-06-29 11:07:11 -07:00
gsxdsm
138d6447fb fix(workflows): address review feedback on recovery and docs 2026-06-29 00:10:27 -07:00
gsxdsm
d4b8032f28 feat(workflows): add optional plan review gate 2026-06-28 23:38:33 -07:00
gsxdsm
6ce0b44058 feat(workflows): make coding stepwise with final review 2026-06-28 23:24:29 -07:00
gsxdsm
7a3a9a9bb1 FN-7062: rename remote settings section
Rename the settings navigation entry so Remote Access is no longer conflated with Node Sync.

- Update the remote settings nav label to "Remote Access" while keeping the separate Node Sync section intact.
- Add coverage that rejects the old combined label and confirms both standalone entries render.
- Align the workflow settings plan and changeset with the clarified settings IA.

Files changed:
 .changeset/fn-7062-remote-access-rename.md               |  7 +++++++
 ...26-06-04-002-feat-workflow-settings-mechanism-plan.md |  2 +-
 packages/dashboard/app/components/SettingsModal.tsx      |  6 +++++-
 .../__tests__/SettingsModal.scheduling-merge.test.tsx    | 16 ++++++++++++++++
 4 files changed, 29 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-7062

Fusion-Task-Lineage: d50d47eb-aa15-4bf6-8f26-edaa79c8de9e
2026-06-26 10:18:04 -07:00
gsxdsm
12a0b24fe7 docs(FN-7039): revise graph-native workflow-steps plan after ce-doc-review
Six-reviewer doc review reshaped two foundational decisions:
- Results model: graph writes the existing task.workflowStepResults field
  keyed by node id (no new table) — avoids upgrade data-loss for in-review
  tasks and collapses U2/U3. Sibling-table spike reverted.
- Migration: reconcile with the existing migration-109 fragment scheme
  instead of infeasible node-injection into read-only built-in workflows.

Also folds in: store-fallback fail-closed (legacy execute calls not all dead),
watchdog re-entry contract, plugin-row migration from persisted fields,
full progress-bar render-state spec, and circular-dependency fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 22:17:44 -07:00
gsxdsm
dd1b9603bc fix(FN-7039): run enabled optional workflow steps via builtin:coding resolution
optionalGroupIdSet falls back to builtin:coding (mirroring the executor's
unselected-task resolution) so a toggled built-in group id like
browser-verification is no longer downgraded to a legacy WS-xxx step row the
graph executor never matches. Create-time optional-step controls resolve
builtin:coding when no project default workflow is set so the toggles render.

First unit of the graph-native workflow-step refactor (see
docs/plans/2026-06-25-001-refactor-workflow-steps-graph-native-plan.md).

Fusion-Task-Id: FN-7039

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 21:47:03 -07:00
gsxdsm
bc56ab287e fix: align tests with recent source changes on main
Fix 6 failing tests caused by intentional source changes that landed
without updating dependent test assertions:

- Core test-project: taskPrefix default changed from "FN" to undefined
  (commit 800f845e1, derived from project name at runtime)
- Dashboard ScriptsModal.css: replace banned --text-primary with --text
- CLI package-config: update expected pi dep version ^0.79.1 -> ^0.79.9
- CLI skill-sync: document 4 new engine tools in engine-tools.md
- CLI version: update expected release:version script to include
  run-ci-distill.mjs
- CLI bundled-plugin-freshness: rebuild stale dist directories
2026-06-25 00:13:29 -07:00
gsxdsm
fd63260962 Merge branch 'main' into feature/refactor-apptsx 2026-06-24 20:31:59 -07:00
gsxdsm
3630da0658 feat: Better changelog — structured changesets + distilled release notes (#1750)
## Summary

Replaces dense, agent-authored technical changeset paragraphs with a
**structured, concise changeset schema** (end-user summary + category +
optional dev detail), enforced by a linter. Adds a **deterministic
distillation step** at version time that transforms a release's
collected changesets into clean, grouped, end-user-facing release notes.
Unifies both release paths (local `release.mjs` and CI `version.yml` /
`release.yml`) behind a single distilled artifact so the root
`CHANGELOG.md` and GitHub Release both carry the same user-facing notes.

## Changes

### Changeset format (`scripts/lib/changeset-schema.mjs`)
- Each changeset body now uses labeled fields: `summary` (required,
user-facing, max 120 chars), `category` (required:
feature/fix/breaking/security/performance/internal), `dev` (optional
developer detail)
- Legacy freeform changesets are detected and flagged for the transition
period

### Linter (`scripts/check-changeset-format.mjs`)
- Validates structured schema, summary length, category enum, and
frontmatter package scope
- Wired into `test:gate`, `pretest`, `pretest:full`, and `pr-checks.yml`
- Legacy changesets warn (exit 0) during transition; `--strict` flag
fails on them

### Distillation (`scripts/lib/distill-release-notes.mjs`)
- `distillDeterministic` builds grouped, end-user-facing release notes
by category (New, Fixed, Breaking, Security, Performance, Internal)
- `buildDistillationPrompt` and `DISTILLATION_SYSTEM_PROMPT` ready for
AI distillation via `createFnAgent` when model credentials are available
- Graceful fallback: deterministic bullet list when no model is
configured

### Release integration
- **Local path** (`scripts/release.mjs`): captures changeset entries
before `changeset version` deletes them, distills notes post-version,
replaces the version's CHANGELOG section with curated notes
- **CI path** (`scripts/ci-distill-release-notes.mjs`,
`scripts/run-ci-distill.mjs`): chained into `release:version` so both
flows get distilled notes
- **GitHub Release** (`release.yml`): uses curated CHANGELOG notes
instead of `generate_release_notes: true`

### Documentation
- `AGENTS.md`, `RELEASING.md`, `docs/contributing.md` updated with the
structured format guide
- `.changeset/README.md` template for `pnpm changeset` consumers

## Testing

- 54 new unit tests across changeset-schema, check-changeset-format,
distill-release-notes, and extract-version-notes
- `pnpm lint` clean
- `pnpm test:gate` green (371 tests)
- `pnpm check:changesets` passes (13 legacy warnings expected during
transition)

## Plan

Full implementation plan:
`docs/plans/2026-06-24-001-feat-better-changelog-plan.md`

<!-- stage-review-badge-begin -->

---

<a href="https://stagereview.app/Runfusion/Fusion/pull/1750">
  <picture>
<source media="(prefers-color-scheme: dark)"
srcset="https://stagereview.app/assets/gh-open-in-stage-dark.svg">
<img src="https://stagereview.app/assets/gh-open-in-stage-light.svg"
alt="Open in Stage">
  </picture>
</a>

<!-- stage-review-badge-end -->

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

## Summary by CodeRabbit

* **New Features**
* Added structured release-note guidance and validation for changeset
entries.
* Release notes now use curated, grouped changelog content instead of
auto-generated text.
* Added a fallback process to keep release notes consistent when
automated distillation isn’t available.

* **Bug Fixes**
  * Improved handling of legacy changesets and malformed entries.
* Ensured version-specific changelog sections are updated without
affecting older releases.

* **Tests**
* Added coverage for changeset validation, note grouping, and changelog
section replacement.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-24 19:31:18 -07:00
gsxdsm
2019e5a30f feat(changelog): U6 — docs, agent guidance, and structured changeset
Update AGENTS.md, RELEASING.md, contributing.md with the structured
changeset format guide. Add .changeset/README.md template. Add changeset
for this change. Update distill-release-notes.mjs with final version.
2026-06-24 19:25:51 -07:00
gsxdsm
5ae008b6fd Merge branch 'main' into feature/refactor-apptsx 2026-06-24 08:24:35 -07:00
gsxdsm
24a23dda99 docs(plans): add App.tsx module-breakup plan (completed)
Add the reviewed, completed plan for the dashboard App.tsx module-breakup
refactor (planning + two doc-review rounds). Status: completed — all 8
implementation units shipped on this branch.
2026-06-23 22:18:07 -07:00
gsxdsm
4a1fd88d57 Merge remote-tracking branch 'origin/main' into latest3-1718 2026-06-23 19:58:03 -07:00
gsxdsm
1293f3432d Merge remote-tracking branch 'origin/main' into latest-1718
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 17:41:30 -07:00
gsxdsm
0b111bbb03 Merge remote-tracking branch 'origin/main' into latest-1714
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 17:39:37 -07:00
gsxdsm
37b2cb38ac Merge branch 'main' into feature/workflow-branch-group 2026-06-23 17:16:16 -07:00
gsxdsm
9822fbd6a8 Merge remote-tracking branch 'origin/main' into conflict-resolution-1718
# Conflicts:
#	packages/engine/src/__tests__/executor-recovery.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/executor.ts
#	packages/engine/src/merger-ai.ts
#	packages/engine/src/project-engine.ts
#	packages/engine/src/run-audit.ts
#	packages/engine/src/self-healing.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 16:23:28 -07:00
gsxdsm
941343f483 Merge remote-tracking branch 'origin/main' into conflict-resolution-1714
# Conflicts:
#	packages/engine/src/__tests__/executor-recovery.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/executor.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 16:01:38 -07:00
gsxdsm
4faadd4f75 Merge remote-tracking branch 'origin/main' into conflict-resolution-1712
# Conflicts:
#	packages/dashboard/app/components/WorkflowNodeEditor.tsx
#	packages/engine/src/__tests__/executor-fast-mode-workflows.test.ts
2026-06-23 15:44:52 -07:00
gsxdsm
a8abecd043 Merge remote-tracking branch 'origin/main' into conflict-resolution-1711
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 15:37:29 -07:00
gsxdsm
65c4dc5438 fix(engine): harden workflow runtime cutover 2026-06-22 21:45:05 -07:00
gsxdsm
130fea2973 feat(onboarding): ask for optional first agent in setup 2026-06-22 03:48:08 -07:00
gsxdsm
b591430e12 docs(workspace): Phase D plan (U8/U9 self-healing + e2e), forks resolved 2026-06-22 01:19:29 -07:00
gsxdsm
f4a9c65509 fix(review): address PR #1714 review findings
- base-commit-capture: POSIX single-quote integration branch refs instead of
  JSON.stringify (double quotes are subject to $-expansion in the shell)
- executor: add per-repo no_commits guard to the workspace verifyWorktreeInvariants
  branch (parity with the singular path), gated by the same task-wide no-commit
  eligibility
- executor: reviewWorkspacePerRepo failure message now states the per-repo verdict
  list is partial (evaluation stops at first failure)
- worktree-acquisition: defensively wrap non-fatal/outer-catch logEntry/audit so a
  logging throw cannot promote a non-fatal error to fatal or mask the original error
- docs/plans: add code-fence language tags and fix MD028 blank-line-in-blockquote

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 00:21:49 -07:00
gsxdsm
accb32e9b6 fix(review): address PR #1711 review findings
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 00:19:15 -07:00
gsxdsm
edd79a87dc docs(workspace): Phase C plan — per-repo merge loop (U5/U6/U7), forks resolved 2026-06-21 23:15:38 -07:00
gsxdsm
0367fa54d9 docs(workspace): Phase B implementation plan (U3/U4) 2026-06-21 22:44:53 -07:00
gsxdsm
1fa3691f1f docs(workspace): Phase A implementation plan (U1/U2/U10) 2026-06-21 21:07:32 -07:00
gsxdsm
e4a810e9b4 fix(FN-6880): address PR review feedback (#1712)
- Reject failure-condition edges inside optional-group templates (the single-pass
  walk surfaces template failures as the group's outcome, so an internal failure
  edge was silently dead) — Greptile P2.
- flowToIr: a container/group node (foreach/loop/optional-group) is v2-only — its
  presence now forces v2 serialization (an inserted optional-group on a plain
  workflow no longer serializes as invalid v1) — CodeRabbit.
- Disabled optional-group bypass routes a plain success with no distinguishing
  value, so an outcome:* edge can't preempt success routing (inertness) — CodeRabbit.
- Downgrade heuristic: presence of a legacy optionalSteps key (incl. []) keeps v2.
- Resolver docblock corrected (config-less groups resolve to a fallback entry).
- Strengthen tests: assert both inserted groups + v2 round-trip; failure-edge
  rejection case.
- Changeset: bump to major (removed exported WorkflowOptionalStep type).
- Plan: record U7a as delivered in this cohort; only the workflow-step seam
  infra removal remains deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 20:47:31 -07:00
gsxdsm
0c031b8fe8 chore(FN-6880): changeset + record deferred legacy-retirement scope
Add the minor changeset for the optional-group feature (U1-U6) and document in
the plan why the full legacy optional-steps retirement (U7) is deferred: the
workflow-step seam is shared engine infrastructure across ~9 files and the
dashboard still carries the prior declaration authoring surface (~10 files), so
removing the core type without that cleanup breaks the build. The new model is
the live path; the legacy declaration surface is inert pending a focused follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 19:03:37 -07:00
gsxdsm
a6252e518d refactor(merger): unify on runAiMerge as the sole merge path (U0)
Make runAiMerge (the FN-5633 clean-room AI merge path, already the default)
the sole merge path; soft-deprecate the legacy aiMergeTask pipeline. Phase 0
of the workspace-mode master plan — a standalone merge-consolidation refactor
that lands first so downstream workspace work targets one merge function.

U1 — collapse the dispatch: project-engine.ts now calls runAiMerge
unconditionally; the two direct callers that bypassed the dispatch
(dashboard.ts onMergeImpl in --no-engine mode, task.ts runTaskMerge /
`fn task merge`) now route to runAiMerge too. Export runAiMerge from
@fusion/engine.

U2 — soft-deprecate: aiMergeTask is @deprecated (body retained for a later
deletion pass; shared helpers runAiMerge imports, e.g.
captureSingleCommitLandedMetadata, left intact). merger.mode "deterministic"
is annotated deprecated and made inert (type + field kept — published
@runfusion/fusion surface); the dispatch logs a one-time deprecation warning
and routes to runAiMerge. Changeset added (minor).

U3 — R7 workspace merge-boundary guard: shared @fusion/core predicate
assertNotWorkspaceTaskMerge(task) rejects tasks with populated
workspaceWorktrees at all four merge entry points (dispatch, store.mergeTask,
onMergeImpl, runTaskMerge) with an error naming master-plan U6. Covers the
window until per-repo merge support lands; U6 removes it.

U4 — deterministic-mode blast-radius audit: no production project, CI config,
or seeded setting pins merger.mode "deterministic"; only four engine tests
used it to drive the dispatch to aiMergeTask as a mockable seam — migrated to
mock runAiMerge instead. Other module-level aiMergeTask mocks were dead under
the default "ai" mode or test aiMergeTask directly (body retained), so they
are unaffected.

Also removes an unused acquireWorkspaceRepoWorktree import inherited from the
foundation branch (executor.ts) that was failing lint; master-plan U1 re-adds
it with its per-repo usage.

Merge gate green: lint, typecheck (29 projects), build, test:gate
(649 + 58), plus the migrated (114) and new predicate (4) tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 18:58:06 -07:00
gsxdsm
93ea54f77a feat(FN-6880): add optional-group container IR kind + validation (U1)
Introduce the `optional-group` node kind and `WorkflowOptionalGroupConfig`
(defaultOn + single-pass template subgraph), validated by mirroring the loop
template rules: non-empty template, single entry/exit, no nested groups, no
rework edges (single-pass guarantee), no template/top-level id collisions,
boolean defaultOn. Foundation for graph-native optional steps; additive and
inert until producers/consumers land in later units. Includes the plan.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 18:17:14 -07:00
gsxdsm
7e478fb473 Merge pull request #1703 from Runfusion/gsxdsm/workflow-optional-steps
feat(dashboard): workflow optional steps — authoring, full-modal parity, stepwise seam
2026-06-21 09:04:39 -07:00
gsxdsm
eafe6f7b28 Merge pull request #1696 from Runfusion/gsxdsm/ce-workflow-skill-loading
fix: make the compound-engineering workflow actually load skills and run the full CE flow
2026-06-21 02:04:17 -07:00
gsxdsm
40cea655b8 Merge main into validator behavioral verification
Resolve conflicts from main's analytics schema additions (plugin
activations, per-model token buckets) against the PR's contract-assertion
type column:
- db.ts: renumber behavioral-verification migration 124 -> 126, bump
  SCHEMA_VERSION to 126 so it follows main's migrations 124/125
- core/roadmap tests: adopt main's SCHEMA_VERSION-constant assertions
  instead of stale literal 124
- test-quarantine.json: keep all four quarantine entries from both sides

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 00:22:19 -07:00
gsxdsm
d4e91d4597 feat(core): add workflow-step seam + browser-verification optional step to stepwise workflow
The stepwise-coding IR had no workflow-step seam node, so a per-task
enabledWorkflowSteps entry (e.g. browser verification) would never execute.
Add the seam node on the success path (steps -> workflow-step -> review,
once post-foreach) and declare browser-verification as an optional step,
matching the coding workflow. Covers the dead-toggle gap with resolver and
engine execution-divergence tests.
2026-06-21 00:02:31 -07:00
gsxdsm
56ea618d72 docs(plans): add compound-engineering workflow skill-loading plan
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 23:01:09 -07:00
gsxdsm
9af9bf4fd9 docs(plans): add Full Suite engine/core watchdog-budget fix plan 2026-06-20 21:54:10 -07:00
copilot-swe-agent[bot]
78bd016743 fix(merge): resolve merge conflicts with origin/main
- Renumber behavioral verification schema migration from 118→124
  (main added migrations 118-123 for usage_events, knowledge_pages,
  deployments/incidents, token usage, source-issue closure, LOC stats)
- Combine backend + timeoutMsOverride params in verification-utils.ts
- Accept main's quarantine rescue for AI-merge suites (FN-6433)
- Update schema version assertions to 124 across test files
2026-06-19 23:47:20 +00:00
gsxdsm
8051e89e74 docs(plan): Command Center dashboard + SDLC gap-fill plan 2026-06-15 19:05:15 -07:00
gsxdsm
799e590e3e Merge pull request #1580 from Runfusion/feature/workflow-owned-merge-s07-completion-handoff-merge-work
refactor(workflow): S07 completion handoff creates merge work
2026-06-16 04:30:22 +08:00
gsxdsm
1b5b8708a6 Merge pull request #1579 from Runfusion/feature/workflow-owned-merge-s06-git-merge-capabilities
refactor(workflow): S06 git and merge capability extraction
2026-06-16 04:28:26 +08:00
gsxdsm
2bffad1784 Merge remote-tracking branch 'origin/main' into fix/test-timeout-failures
# Conflicts:
#	scripts/test-changed.mjs
2026-06-15 12:13:40 -07:00
gsxdsm
03d12b6289 docs(acp): record U11 implementation design (ready to execute)
Reverse-engineered the streamViaCli contract and locked the U11 build plan:
AssistantMessageEventStream shape to match, the kill-switch branch point in
streamSimple, the KTD10 injection seam (pi-claude-cli adds @agentclientprotocol/sdk;
bridge path injected like mcpConfigPath), MCP-server construction reusing
ensureMcpConfig, full-history prompting (R13), ACP->pi event translation
paralleling event-bridge.ts, and live-bridge verification via the U9 harness.

No transport change yet — the live `claude -p` path is untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 05:56:47 -07:00
gsxdsm
079844e1c1 feat(acp): forward MCP servers on session/new (U10) + record U9 GO / R17
Route A unblock + the first Route A code increment.

- U9 verdict recorded (plan OQ1 + docs/acp-contract.md): in an authenticated
  interactive session the pinned claude-code-cli-acp 0.1.1 bridge forwards
  session/new mcpServers to Claude, Claude invokes the forwarded Fusion tool,
  and the call traverses the ACP permission gate (session/request_permission).
  Both security-critical answers resolve positively — overturns the headless
  NOT-GO chain (FN-6466/6467/6473/6476), whose only blocker was running
  detached from the login keychain session.
- R17 (daemon auth) recorded and closed for the supported setup: creds are
  macOS Keychain-only; the user's login-session fn daemon has keychain access
  (the existing claude -p provider authenticates there), so the bridge does too.
- U10: thread an optional mcpServers list through the ACP runtime contract.
  newAcpSession now forwards it (was hardcoded []); AgentRuntimeOptions (engine
  + plugin-local copy) gains the field; defaults to [] to preserve Route B's
  read-only ask posture. Tool calls still route through the U5 permission floor.

Plugin typechecks clean; provider-session tests 12/12 (incl. 2 new forwarding
tests). U11-U13 (provider transport swap, picker/auth, workflow verify) remain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 05:56:47 -07:00
gsxdsm
56d4fd24b3 FN-6476: record ACP auth rerun blockage
Document the authenticated ACP bridge rerun attempt and preserve the Route A blocked verdict.

- Update the ACP contract with FN-6476 readiness proof results showing the pinned bridge still reports an unauthenticated Claude session.
- Keep OQ1 answers unresolved because no forwarded Fusion tool invocation or permission-gate traversal was observed.
- Add FN-6476 status notes to the Claude ACP runtime plan so U9 remains NOT GO without a claude -p fallback.

Files changed:
 docs/acp-contract.md                                      | 11 ++++++++++-
 docs/plans/2026-06-14-001-feat-claude-acp-runtime-plan.md |  3 +++
 2 files changed, 13 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6476

Fusion-Task-Lineage: f37dcc62-9758-47af-bb50-169e902211a5
2026-06-15 02:30:41 -07:00