Commit Graph

401 Commits

Author SHA1 Message Date
gsxdsm
68c4053a85 fix(droid): stop model-discovery process storm; read catalog from droid exec --help
discoverDroidModels ran `droid models`/`droid model list`, which aren't real
droid commands — they parse as a prompt and launch a persistent
`droid exec --stream-jsonrpc` agent session that never exits, leaking a process
per call. The dashboard reloads the droid extension on every chat-send, so these
piled into dozens of orphaned `droid` processes.

Switch discovery to parse `droid exec --help` (lists Available + Custom models,
exits cleanly) via new parseDroidModelsFromHelp, and add a SIGKILL-on-timeout
guard so a wedged spawn can never leak. Verified against the real binary: 46
models, 0 leaked processes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 03:40:56 -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
37c4cfa56e FN-6808: handle AI CLI probe spawn failures
Resolve synchronous AI CLI probe launch failures as unavailable auth states.

- Catch synchronous spawn failures in Claude and Droid probe helpers so fire-and-forget validation paths do not reject.
- Return unavailable/unauthenticated sentinels for Droid model discovery and CLI presence/auth checks.
- Add regression coverage for Claude and Droid presence/auth probes plus a patch changeset.

Files changed:
 .../fn-6808-cli-probe-unhandled-rejection.md       |  5 ++++
 .../src/__tests__/process-manager.test.ts          | 25 ++++++++++++++++++++
 .../src/__tests__/process-manager.test.ts          | 25 ++++++++++++++++++++
 packages/pi-claude-cli/src/process-manager.ts      | 12 +++++++++-
 .../src/process-manager.ts                         | 27 +++++++++++++++++++---
 5 files changed, 90 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-6808

Fusion-Task-Lineage: 79702ef2-e116-4313-a557-da17a6888c30
2026-06-20 21:32:43 -07:00
gsxdsm
8b5b9a75ad Build Compound Engineering plugin dist before its tests
dist-freshness.test.ts reads the plugin's compiled dist/settings.js and
dist/session/orchestrator.js to guard against stale dist (FN-6596), but the
plugin had no pretest build and was missing from ensure-test-artifacts.mjs.
On a fresh CI checkout dist/ does not exist, so the guard threw "dist/ is
missing" — failing the non-blocking Full Suite on every main commit.

Register the plugin's required artifacts in ensure-test-artifacts.mjs and add
a `pretest` hook that builds them, matching the dependency-graph / hermes /
openclaw plugins. Verified locally: with dist/ absent, `pnpm --filter
@fusion-plugin-examples/compound-engineering test` now builds dist via the
pretest and all 192 plugin tests pass (incl. the two dist-freshness cases).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 20:47:32 -07:00
gsxdsm
87f18f87ed FN-6705: add plugin activation analytics
Record plugin activation events and expose them to Command Center analytics.

- Add plugin activation persistence, aggregation helpers, and exports.
- Record load/reload activation events through the plugin loader and store APIs.
- Surface plugin activation counts in the Command Center Ecosystem area and API route.
- Cover migrations, aggregation behavior, plugin loader recording, route auth, UI rendering, and quarantined flaky suites.

Files changed:
 .changeset/fn-6705-plugin-activation-analytics.md  |   5 +
 docs/architecture.md                               |   2 +-
 docs/dashboard-guide.md                            |   2 +-
 packages/cli/vitest.config.ts                      |   8 +
 packages/core/src/__tests__/db-migrate.test.ts     |  34 ++---
 packages/core/src/__tests__/db.test.ts             |  59 ++++----
 packages/core/src/__tests__/goals-schema.test.ts   |   6 +-
 packages/core/src/__tests__/insight-store.test.ts  |  12 +-
 .../src/__tests__/merge-request-record.test.ts     |   3 +-
 packages/core/src/__tests__/mission-store.test.ts  |   6 +-
 .../__tests__/plugin-activation-analytics.test.ts  |  67 ++++++++
 packages/core/src/__tests__/plugin-loader.test.ts  | 168 ++++++++++++++++++++-
 packages/core/src/__tests__/run-audit.test.ts      |   6 +-
 .../core/src/__tests__/store-merge-queue.test.ts   |   3 +-
 .../src/__tests__/store-plugin-activations.test.ts |  52 +++++++
 packages/core/src/__tests__/task-documents.test.ts |   3 +-
 packages/core/src/db.ts                            |  35 ++++-
 packages/core/src/index.ts                         |   8 +
 packages/core/src/plugin-activation-analytics.ts   | 104 +++++++++++++
 packages/core/src/plugin-loader.ts                 |  27 ++++
 packages/core/src/store.ts                         |  24 ++-
 packages/core/src/types.ts                         |  22 +++
 packages/core/vitest.config.ts                     |  12 ++
 .../command-center/areas/EcosystemArea.tsx         |  40 +++--
 .../command-center/areas/__tests__/areas.test.tsx  |  52 ++++++-
 .../register-command-center-routes.auth.test.ts    |   1 +
 .../register-command-center-routes.test.ts         |  29 ++++
 .../src/routes/register-command-center-routes.ts   |  20 +++
 .../src/store/__tests__/roadmap-store.test.ts      |   9 +-
 scripts/boot-smoke.mjs                             |  24 ++-
 scripts/lib/test-quarantine.json                   |  55 +++++++
 31 files changed, 799 insertions(+), 99 deletions(-)

Fusion-Task-Id: FN-6705
Fusion-Task-Lineage: 12ed6227-f935-4038-bbe9-a605a054850e
2026-06-19 16:47:33 -07:00
gsxdsm
62033e5ef7 FN-6733: render dependency graph edge styling
Render dependency graph connectors with CSS-resolvable styling so task dependencies are visible.

- Move dependency edge stroke, width, opacity, and arrowhead fill from SVG presentation attributes into inline styles.
- Cover highlighted, dimmed, empty, filtered, desktop, and mobile dependency graph edge rendering.
- Document the SVG custom-property requirement with an FNXC dependency graph comment.

Files changed:
 .../DependencyGraph.highlighting.test.tsx          | 39 ++++++++++++++++++++++
 .../src/__tests__/edges.test.tsx                   | 34 ++++++++++++++++---
 .../fusion-plugin-dependency-graph/src/edges.tsx   | 17 +++++++---
 3 files changed, 81 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-6733

Fusion-Task-Lineage: 167e7b56-f0eb-4b32-9f66-3b372ef27d60
2026-06-19 16:47:33 -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
4373946a07 chore(release): v0.44.0
Version bump via changesets.
2026-06-19 07:34:26 -07:00
gsxdsm
301ae7f0d3 FN-6636: rescue Paperclip spawn tests
Rescue the Paperclip CLI spawn coverage by making fake child events deterministic and re-enabling the suite.

- Route mintAgentApiKeyViaCli cases through the shared fake spawn helper so close and error events are emitted after listener registration.
- Document the async import/listener-order requirement that caused the quarantine.
- Remove paperclip-client.test.ts from the quarantine ledger and Vitest exclude list so the rescued tests run.

Files changed:
 .../src/__tests__/paperclip-client.test.ts         | 134 +++++++--------------
 .../vitest.config.ts                               |   2 -
 scripts/lib/test-quarantine.json                   |   5 -
 3 files changed, 44 insertions(+), 97 deletions(-)

Fusion-Task-Id: FN-6636

Fusion-Task-Lineage: 79038ab3-0aa6-465e-9c6e-f6bc83fcd407
2026-06-18 06:56:36 -07:00
gsxdsm
58a34e9cf0 FN-6631: fix Command Center completion gauges
Fix Command Center completion analytics and add futuristic activity visualizations.

- Compute SDLC completion rate as a triage cohort conversion capped between zero and one.
- Add a radial completion gauge plus a live activity strip with compact throughput sparkline styling.
- Cover the analytics and chart behavior with targeted tests, docs, and a patch changeset.

Files changed:
 .changeset/fn-6631-command-center-rate-gauge.md    |   5 +
 docs/dashboard-guide.md                            |   4 +-
 .../core/src/__tests__/activity-analytics.test.ts  |  32 +++++-
 packages/core/src/activity-analytics.ts            |  23 +++-
 .../components/command-center/CommandCenter.css    | 128 ++++++++++++++++++++-
 .../components/command-center/CommandCenter.tsx    |  45 +++++++-
 .../app/components/command-center/SdlcFunnel.tsx   |  17 ++-
 .../__tests__/CommandCenter.test.tsx               |  12 +-
 .../command-center/__tests__/SdlcFunnel.test.tsx   |   2 +
 .../command-center/__tests__/charts.test.tsx       |  26 ++++-
 .../command-center/charts/RadialGauge.tsx          |  50 ++++++++
 .../components/command-center/charts/charts.css    |  83 +++++++++++++
 .../vitest.config.ts                               |   2 +
 scripts/lib/test-quarantine.json                   |   8 +-
 14 files changed, 402 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-6631
Fusion-Task-Lineage: 0d09f18a-5f93-4dc8-8786-889f32eb63e8
2026-06-18 06:25:08 -07:00
gsxdsm
1020b3f83f FN-6606: restore CE sync lane coverage
Restore the compound-engineering broad lane tests after the timeout could not be reproduced on the stabilized shared test infrastructure.

- Re-enable the compound-engineering sync and work-bridge tests by clearing their Vitest quarantine excludes.
- Remove the stale quarantine ledger entries now that the broad package lane stayed stable under verification.

Files changed:
 plugins/fusion-plugin-compound-engineering/vitest.config.ts | 10 ++++------
 scripts/lib/test-quarantine.json                            | 13 +------------
 2 files changed, 5 insertions(+), 18 deletions(-)

Fusion-Task-Id: FN-6606

Fusion-Task-Lineage: f357c626-c181-44a7-a463-c53644566ca1
2026-06-17 20:19:55 -07:00
gsxdsm
48da420414 FN-6593: delete unresolved flaky test quarantines
Delete unresolved quarantined flaky tests under the deletion ratchet while preserving newer active quarantines.

- Remove four flaky test files that were not rescued before the ratchet follow-up.
- Drop their matching Vitest excludes and quarantine ledger entries.
- Preserve later sync, work-bridge, and core quarantine records from main.

Files changed:
 .../src/__tests__/github-tracking-hook.test.ts     | 592 ---------------------
 packages/dashboard/vitest.config.ts                |   8 +-
 .../src/__tests__/cli-agent-executor.test.ts       | 404 --------------
 packages/engine/vitest.config.ts                   |   5 +-
 .../src/__tests__/orchestrator-flow.test.ts        | 156 ------
 .../src/__tests__/skill-wiring.test.ts             | 101 ----
 .../vitest.config.ts                               |   6 +-
 scripts/lib/test-quarantine.json                   |  20 -
 8 files changed, 13 insertions(+), 1279 deletions(-)

Fusion-Task-Id: FN-6593

Fusion-Task-Lineage: 1165ba24-894a-4cc9-b678-50ae1625ba6b
2026-06-17 17:37:08 -07:00
gsxdsm
cc793987b2 FN-6596: guard compound engineering debug launches
Guard Compound Engineering debug stage launches against stale stage settings and artifacts.

- Add source-level coverage proving stale enabledStages snapshots do not block registered CE stages, including debug.
- Add dist freshness checks for the disabledStages opt-out launch model so stale compiled plugin artifacts fail fast.
- Mirror newly observed core suite-load flakes in the quarantine ledger and Vitest excludes.

Files changed:
 packages/core/vitest.config.ts                     |  5 ++
 .../src/__tests__/dist-freshness.test.ts           | 38 +++++++++++++++
 .../src/__tests__/stage-launch-guard.test.ts       | 57 ++++++++++++++++++++++
 scripts/lib/test-quarantine.json                   | 10 ++++
 4 files changed, 110 insertions(+)

Fusion-Task-Id: FN-6596

Fusion-Task-Lineage: 3cd75e5f-c6f8-4bde-8202-54eeac82b894
2026-06-17 17:21:22 -07:00
gsxdsm
822d5d1872 fix(FN-6587): stabilize test lanes under production env
Normalize spawned Vitest processes to NODE_ENV=test so React/jsdom lanes do not inherit release-shell production mode. Split the compound-engineering plugin Vitest projects so Node-only setup and teardown only run in Node lanes, and quarantine the remaining broad-lane CE timeout flakes under the deletion ratchet.
2026-06-17 17:13:13 -07:00
gsxdsm
d8b80d0bfe FN-6587: quarantine compound-engineering timeout flakes
Quarantine compound-engineering timeout flakes from the broad test workflow.

- Add the compound-engineering orchestrator and skill-wiring tests to the quarantine ledger.
- Exclude the quarantined tests from the compound-engineering node Vitest project without changing timeouts or retries.
- Document the quarantine requirement next to the Vitest excludes.

Files changed:
 .../fusion-plugin-compound-engineering/vitest.config.ts   | 15 ++++++++++++++-
 scripts/lib/test-quarantine.json                          | 10 ++++++++++
 2 files changed, 24 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6587

Fusion-Task-Lineage: 5aeb0202-8330-4a93-bdab-675c81b9cb54
2026-06-17 14:52:56 -07:00
gsxdsm
bbceb16d66 FN-6586: fix WhatsApp connection test mock constructor
Make the WhatsApp chat test double constructable under Vitest 4.

- Replace the arrow-backed WhatsAppConnection vi.fn mock with a named function implementation usable with new.
- Document the Vitest constructor-mock requirement near the test double.

Files changed:
 plugins/fusion-plugin-whatsapp-chat/src/__tests__/index.test.ts | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6586

Fusion-Task-Lineage: 54ed6d1a-c42a-430b-846e-251f8a27e188
2026-06-17 14:52:56 -07:00
gsxdsm
05fe6e5e0c FN-6575: make CE stage gating opt-out
Make Compound Engineering stage launch gating opt-out so registered stages like debug remain launchable by default.

- Replace enabledStages settings schema with disabledStages defaults and docs.
- Derive launchable stages from the live registry minus explicit disabled opt-outs.
- Update orchestrator gating, exports, tests, and plugin docs for the new setting.
- Add a patch changeset for the Compound Engineering plugin behavior fix.

Files changed:
 .changeset/fn-6575-ce-stage-optout.md              |  5 ++++
 docs/plugins/compound-engineering.md               |  4 +--
 .../fusion-plugin-compound-engineering/README.md   |  9 ++++--
 .../manifest.json                                  |  8 +++---
 .../src/__tests__/manifest.test.ts                 |  2 +-
 .../src/__tests__/settings.test.ts                 | 33 +++++++++++++---------
 .../src/__tests__/skill-wiring.test.ts             | 21 +++++++++++++-
 .../src/index.ts                                   |  1 +
 .../src/session/orchestrator.ts                    |  9 ++++--
 .../src/settings.ts                                | 33 ++++++++++++++--------
 10 files changed, 87 insertions(+), 38 deletions(-)

Fusion-Task-Id: FN-6575

Fusion-Task-Lineage: 903732d7-4ffb-4c8f-ba3e-e517d88bc644
2026-06-17 14:52:55 -07:00
gsxdsm
8037ef15a3 Merge main into feature/factory-view: reconcile lazy-view inventory to 23
Resolves conflicts in the lazy-loaded heavy-views inventory. main independently
grew the curated list to 22 (adding AppModals lazy modals); this branch added the
Command Center view. Combined count is 23 — updated the AGENTS.md prose/inventory
and the lazy-loaded-views-docs test contract (count + length assertions) to 23,
keeping main's richer "App-level and AppModals" wording.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 11:46:31 -07:00
gsxdsm
89171e0f16 FN-6531: polish Compound Engineering dashboard UI
Align the bundled Compound Engineering plugin with Fusion dashboard spacing, radius, and control conventions.

- Apply shared dashboard card, button, icon button, and input classes to CE panels and controls.
- Replace ad-hoc CE layout spacing and radius values with dashboard design tokens across desktop and mobile surfaces.
- Document the plugin's theme consistency expectations and add tests that guard representative spacing, radius, and textarea token usage.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6531-compound-engineering-ui.md      |   5 +
 docs/plugins/compound-engineering.md               |   5 +
 .../src/dashboard/CeFlow.tsx                       |  10 +-
 .../src/dashboard/CompoundEngineeringView.css      | 203 ++++++++++++++-------
 .../src/dashboard/CompoundEngineeringView.tsx      |  11 +-
 .../src/dashboard/__tests__/theme-tokens.test.ts   |  46 +++++
 6 files changed, 215 insertions(+), 65 deletions(-)

Fusion-Task-Id: FN-6531

Fusion-Task-Lineage: be99bbaa-0842-4598-b0a1-4f41816b032b
2026-06-17 03:36:14 -07:00
gsxdsm
e353079829 FN-6506: add Compound Engineering debug sessions
Add a bundled CE debug stage and skill so operators can launch root-cause investigation sessions from Compound Engineering.

- Register the debug stage with stage metadata, default enabled settings, and dashboard coverage.
- Bundle the ce-debug skill and expose its trigger patterns with reachability and wiring tests.
- Document the new debug flow and add registry coverage for the stage catalog.

Files changed:
 .../fusion-plugin-compound-engineering/README.md   |   7 +-
 .../manifest.json                                  |   4 +-
 .../src/__tests__/manifest.test.ts                 |   1 +
 .../src/__tests__/skill-reachability.test.ts       |  31 +++--
 .../src/__tests__/skill-wiring.test.ts             |  65 ++++++----
 .../src/__tests__/stage-registry.test.ts           |  30 +++++
 .../src/dashboard/__tests__/StageLauncher.test.tsx |   7 +-
 .../src/session/stage-registry.ts                  |  13 ++
 .../src/skills.ts                                  |  13 ++
 .../src/skills/ce-debug/SKILL.md                   | 144 +++++++++++++++++++++
 10 files changed, 273 insertions(+), 42 deletions(-)

Fusion-Task-Id: FN-6506
Fusion-Task-Lineage: d65a238e-83a2-4664-9e97-01244c9df087
2026-06-16 20:28:02 -07:00
gsxdsm
84830595f2 FN-6485: remove synchronous CLI probes
Remove blocking execSync validation paths from CLI process managers while preserving async probe coverage.

- Drop synchronous Claude and Droid CLI presence/auth validators from process managers.
- Keep async spawn-based validation as the sole probing path for session startup.
- Replace sync validator tests with execSync guard coverage for both CLI integrations.

Files changed:
 .../droid-cli/src/__tests__/execsync-guard.test.ts | 17 ++++++++
 .../src/__tests__/process-manager.test.ts          | 46 +---------------------
 .../src/__tests__/execsync-guard.test.ts           | 14 +++++++
 .../src/__tests__/process-manager.test.ts          | 46 +---------------------
 .../pi-claude-cli/src/__tests__/provider.test.ts   |  1 -
 packages/pi-claude-cli/src/process-manager.ts      | 44 +++------------------
 .../src/process-manager.ts                         | 43 +++-----------------
 7 files changed, 45 insertions(+), 166 deletions(-)

Fusion-Task-Id: FN-6485

Fusion-Task-Lineage: e3f0f656-3445-4672-b597-a811924137e9
2026-06-16 15:08:24 -07:00
gsxdsm
f5bd86214f feat(monitor): U13 — monitor stage (deployments, incidents, MTTR) closes the loop
Adds deployments + incidents tables (db migration 119→120), real MTTR/deploy/
incident aggregation replacing the U7 seam, an auth-gated SSRF-safe deploy/
incident ingestion route, and a monitor trait that auto-opens a single fix task
on a regression signal. Storm guard groups by the U11 Signal groupingKey with a
threshold gate, cooldown absorption, per-window circuit breaker, and self-loop
guard. Also completes the otel test ActivityAnalytics fixture.
2026-06-15 20:59:57 -07:00
gsxdsm
0a87890bd8 feat(knowledge): U14 — persistent knowledge index
Adds knowledge_pages (db migration 118→119) + a deterministic, model-free
keyword index of task/PR history in packages/dashboard/src, incrementally
refreshed on task completion (task:moved→done listener) and queryable via an
auth-gated, project-scoped API. Complements the LLM-extracted insights/memory
surfaces rather than duplicating them.

Follow-ups: no React view yet; PR-history page population attaches via U18.
2026-06-15 20:34:52 -07:00
gsxdsm
ab9fdc4136 feat(telemetry): U1 — queryable usage_events table + emitUsageEvent capture
Schema migration 117→118 adds usage_events; events captured via a dedicated
emitUsageEvent seam wired through AgentLogger tool hooks + executor session
context (model/provider/nodeId), not by widening log signatures. meta is
size-capped and carries only non-sensitive descriptors.
2026-06-15 19:20:38 -07:00
gsxdsm
5696d4497f fix(review): address PR #1681 feedback (acp.active accuracy + FNXC comments)
- Greptile P2: `acp.active` now reflects the ACTUAL dispatch determinant
  (FUSION_CLAUDE_ACP, which includes the operator force-override), not the
  experimental flag alone — so the status isn't misleading when forced on/off.
- CodeRabbit/Greptile P2: add FNXC:ClaudeAcp comments to the new code blocks
  per the AGENTS.md greppable-comment convention.

Already fixed in the prior commit (daa37d08c): the P1 "sticky env" / latch
(applyClaudeAcpEnable now recomputes each call + FUSION_CLAUDE_ACP_FORCE
override) and the enable->disable-on-same-env regression test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 12:34:44 -07:00
gsxdsm
642780220e chore(acp): apply subagent-review follow-ups (changeset, KTD10 tests, docs)
Two-reviewer pass (security + architecture) on KTD10 + the full Route A
increment: no code defects, no P0, merge-ready as a dormant increment. Applying
the P1 follow-ups:

- Add the feature changeset (@runfusion/fusion minor) — the one convention gap.
- KTD10 tests: fail-closed (bridge not resolved -> env stays unset -> -p) and
  idempotency (second onLoad keeps the first published path).
- Document the two intentional, parallel MCP-forwarding paths (U10 engine-adapter
  vs U11 provider-driver) so nobody double-forwards, and the known
  ACP-path-token-usage=0 residual so U12 doesn't treat it as a bug.

Reviewers confirmed: dormancy invariant holds end-to-end (nothing sets
FUSION_CLAUDE_ACP=1; both flag+path required; -p is the default); OAuth pi path
untouched. 206/206 plugin tests, 333/333 pi-claude-cli tests, typecheck clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 11:40:06 -07:00
gsxdsm
022bee5842 feat(acp): U11/KTD10 — publish bundled bridge path on plugin load
The acp-runtime plugin's onLoad now publishes the identity-pinned bundled
claude-code-cli-acp path to FUSION_CLAUDE_ACP_BRIDGE (when unset), so the
pi-claude-cli kill-switch resolves the bridge WITHOUT a manual env var — no
engine->plugin static coupling. Publishes the path only; the ACP transport stays
OFF until an operator sets FUSION_CLAUDE_ACP=1 (rollout gate). Explicit env
override wins; resolver is pinned to the plugin's node_modules/.bin shim.

204/204 plugin tests green (3 new KTD10 tests); typecheck clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-15 11:34:36 -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
a9815fb1ff FN-6457: add ACP ask runner and bundled Claude bridge setup
Route ACP-backed planning and validation through a read-only ask-once runner with a pinned Claude bridge foundation.

- Add askAcpOnce for single-turn ACP sessions with timeout handling, JSON recovery, clean stop validation, and disposal.
- Refactor validation seams to use ACP runtime prompts and require structured pass verdicts.
- Resolve the Claude ACP bridge from the plugin bundle and add setup checks for identity, environment, probing, and auth readiness.
- Document the ACP Route B plan and update tests for validator, session, runtime, and plugin setup behavior.

Files changed:
 CONCEPTS.md                                        |   6 +
 docs/acp-contract.md                               |  36 ++
 .../2026-06-14-001-feat-claude-acp-runtime-plan.md | 465 +++++++++++++++++++++
 .../engine/src/__tests__/cli-agent-ask.test.ts     | 104 +++++
 .../src/__tests__/cli-agent-validator.test.ts      | 137 +++---
 .../src/__tests__/interactive-ai-session.test.ts   |  96 +++--
 packages/engine/src/agent-runtime.ts               |   6 +-
 packages/engine/src/cli-agent-ask.ts               | 120 ++++++
 packages/engine/src/cli-agent-validator.ts         |  65 ++-
 .../cli-agent/__tests__/one-shot-session.test.ts   |  16 +-
 packages/engine/src/cli-agent/one-shot-session.ts  |  17 +-
 packages/engine/src/index.ts                       |   8 +-
 packages/engine/src/interactive-ai-session.ts      |  33 +-
 plugins/fusion-plugin-acp-runtime/AGENTS.md        |  14 +
 plugins/fusion-plugin-acp-runtime/CHANGELOG.md     |   6 +
 plugins/fusion-plugin-acp-runtime/README.md        |  13 +-
 plugins/fusion-plugin-acp-runtime/package.json     |   3 +-
 .../src/__tests__/index.test.ts                    |  51 ++-
 .../src/__tests__/process-manager.test.ts          |  32 +-
 .../src/__tests__/runtime-adapter.test.ts          |   4 +-
 .../src/__tests__/setup.test.ts                    |  71 ++++
 plugins/fusion-plugin-acp-runtime/src/cli-spawn.ts |  95 ++++-
 plugins/fusion-plugin-acp-runtime/src/index.ts     |  16 +-
 .../src/process-manager.ts                         |  26 +-
 .../src/runtime-adapter.ts                         |  11 +-
 plugins/fusion-plugin-acp-runtime/src/setup.ts     | 104 +++++
 plugins/fusion-plugin-acp-runtime/src/types.ts     |   6 +-
 pnpm-lock.yaml                                     | 139 ++++--
 28 files changed, 1502 insertions(+), 198 deletions(-)

Fusion-Task-Id: FN-6457
Fusion-Task-Lineage: a3364ed7-cb28-4a2b-b898-6ccd0d95fb92
2026-06-15 02:30:41 -07:00
gsxdsm
8d228fc212 Merge pull request #1679 from Runfusion/fix/full-suite-schema-and-cancel-error
fix: repair two post-merge Full Suite failures
2026-06-15 16:57:35 +08:00
gsxdsm
f80b301af2 chore(release): v0.43.1
Version bump via changesets.
2026-06-14 22:43:49 -07:00
gsxdsm
62335f8814 fix: repair two post-merge Full Suite failures
The non-blocking Full Suite tier on main was red on shards 2 and 4:

- roadmap-store schema assertion lagged core's SCHEMA_VERSION bump to 117
  (landed in FN-6277), so it still expected 116.
- useCeSessions "cancel surfaces a transport error" failed deterministically:
  a session with an in-flight status keeps the poll fallback running, and a
  successful background list refresh called setError(undefined), wiping the
  cancel error before it could be observed. Background refreshes (poll + push)
  now leave action errors intact; only user-initiated/initial refreshes clear.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 15:56:26 -07:00
gsxdsm
4482425d4b chore(release): v0.43.0
Version bump via changesets.
2026-06-14 00:43:13 -07:00
gsxdsm
dd0ceec7dd Merge main: keep ce-* agent install alongside stale-session recovery; address PR review
Resolves the onLoad conflict in the compound-engineering plugin by keeping both
the bundled ce-* persona-def install (this branch) and main's
recoverStaleSessionsForContext call.

Also addresses PR #1672 review feedback:
- executor: sentinel resume now guards on !live.paused (mirrors
  runAwaitInputNode) so a still-paused task can't consume a reply and re-enter
  the skill early.
- TaskCard: make the Answer-questions button text/title/aria-label fallbacks
  consistent ("Answer questions") for label-in-name a11y; update test.
- ce-work: replace the unshipped `skill: ce-worktree` reference with the real
  git worktree commands so Option B can't dead-end.
- ce-resolve-pr-feedback: invoke bundled scripts by absolute path via the new
  FUSION_CE_SKILLS_DIR env (sessions run with cwd=projectRoot); add the Fusion
  await-input sentinel path instead of AskUserQuestion for workflow steps;
  normalize whitespace-only review bodies like PR comments.
- plugin: expose FUSION_CE_SKILLS_DIR (installed skills root) to step sessions.
- plan doc: add language to fenced block (markdownlint MD040).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 16:08:51 -07:00
gsxdsm
4797eac348 Merge origin/main into feat/validator-behavioral-verification
Resolve conflicts from concurrent main work:
- db.ts: renumber behavioral-verification migration 115 -> 118 after main's
  workflow-work-items (115), graphResumeRetryCount (116), autoMergeProvenance (117);
  SCHEMA_VERSION = 118. Update all schema-version test assertions to 118
  (keep SCHEMA_VERSION constant where used).
- vitest.config / test-quarantine.json: union both branches' quarantine sets
  (FN-6206 behavioral-verification files + main's merger-ai-cleanup/merger-ai/
  QuickEntryBox/soft-delete-blocker-residue/routes-settings entries).
- settings-sync routes: keep workflowId-qualified field keys + persisted global
  pull; drop duplicate workflowApplyResult from auto-merge interleave.
- Keep behavioral-verification changes in mission-execution-loop imports,
  useNodeSettingsSync, save-split, driver, and sync tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 15:48:54 -07:00
gsxdsm
1bb8cea9f9 Address PR review feedback (#1666)
- mission-execution-loop: preserve judge "blocked" verdict (don't downgrade to fail), clear validation timeout, backfill omitted linked assertions, notify autopilot "blocked" on exhausted retry budget
- mission-verification: pass selected sandbox backend explicitly to fix concurrent global-override race (fail-closed isolation); distinguish infra outcomes (timeout/abort) from real test failures so they stay inconclusive
- mission-store: validate run-to-feature ownership before fix-feature dedup/creation
- settings-sync routes: persist pulled global settings via store; qualify workflow field keys with workflowId
- useNodeSettingsSync: drop redundant ?? {} guard (backend always emits diff.workflowSettings)
- driver(agent-browser): map only Playwright TimeoutError to "absent" in observe(); other faults -> inconclusive
- vitest.config: remove redundant engine-core exclude (quarantine lives in engine-default)
- tests: tighten timeout verdict assertion to inconclusive; remove duplicate schema-version assertions
- save-split: document why customProviders is excluded (persisted via dedicated provider routes)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 15:25:27 -07:00
gsxdsm
69ddee0d92 Merge pull request #1671 from plarson/fix/ce-recover-stale-active-sessions
fix(ce): recover stale active sessions
2026-06-13 14:52:27 -07:00
gsxdsm
43c54290a9 chore(release): v0.42.0
Version bump via changesets.
2026-06-13 12:11:05 -07:00
Phil Larson
65a4c51c98 fix(ce): recover stale active sessions
Recover persisted Compound Engineering active/launching sessions that outlived their live agent handles on plugin load and session reads.
2026-06-13 10:59:32 -07:00
gsxdsm
e24a3e8150 feat(skills): teach ce-plan/ce-work/ce-code-review the Fusion step conventions (U5)
In a Fusion workflow step (FUSION_WORKFLOW_STEP set), the skills now:
- emit a ===FUSION_AWAIT_INPUT=== block instead of calling AskUserQuestion
  into the void (Fusion pauses the task + surfaces it on the card; U6/U7),
  and take the assumptions path when FUSION_HEADLESS is set;
- dispatch sub-agents via fn_spawn_agent with systemPromptOverride read
  from FUSION_CE_AGENTS_DIR/<persona>.md (U2/U3), falling back to inline
  single-agent work when the dir/def is absent.

This is the keystone that makes the U1/U2/U3 plumbing actually used.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 08:59:35 -07:00
gsxdsm
5104e67935 feat(plugin): install ce-* persona defs + expose dir to step sessions (U3)
Vendor the 43 ce-* persona definitions (from compound-engineering 3.9.4),
add installBundledCeAgents() mirroring the skill installer (pinned,
plugin-local, idempotent, never a global ~/.claude/agents), install them
in onLoad, and expose the install dir to executor/step sessions via an
executorRuntimeEnv hook (FUSION_CE_AGENTS_DIR).

Together with U2's systemPromptOverride this gives the lightweight
subagent path: a CE skill reads a persona def from FUSION_CE_AGENTS_DIR
and passes its body to fn_spawn_agent. Installer test added (19 plugin
tests green).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 08:56:25 -07:00
gsxdsm
c850a30cde feat(workflow): headless step signal + bundle CE shipping skills (U1, U8)
U1: workflow-step sessions now carry FUSION_WORKFLOW_STEP=1 (scoped to
the step session, not the main executor) so skills detect autonomous
context and surface questions via await-input instead of a dead blocking
tool.

U8: bundle ce-commit, ce-commit-push-pr, and ce-resolve-pr-feedback
(vendored from compound-engineering 3.9.4) so the CE merge/PR flow has
its skills. Registered in COMPOUND_ENGINEERING_SKILLS; manifest test
updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 06:56:22 -07:00
gsxdsm
9b17355018 FN-6348: align roadmap schema-version test with core
Updates the roadmap store schema-version expectation to match the current core migration level.

- Rename the schema-version test from 114 to 116.
- Assert the roadmap store database schema version is 116 after init.

Files changed:
 .../fusion-plugin-roadmap/src/store/__tests__/roadmap-store.test.ts   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-6348

Fusion-Task-Lineage: 0db4a46d-1d75-4eb1-bfeb-0483eeddb689
2026-06-13 03:42:47 -07:00
gsxdsm
4c587d6a80 FN-6285: replace CE cancel buttons with trash icons
Update Compound Engineering cancellation controls to use compact icon-only affordances while preserving accessible labels.

- Render session-list and flow cancel actions as red trash-can icon buttons.
- Add hover, focus, disabled, and inline layout styling for the compact cancel controls.
- Update README wording and tests to assert icon-only accessible cancel buttons.

Files changed:
 .../fusion-plugin-compound-engineering/README.md   |  2 +-
 .../src/dashboard/CeFlow.tsx                       |  7 +++-
 .../src/dashboard/CompoundEngineeringView.css      | 46 ++++++++++++++++++++--
 .../src/dashboard/CompoundEngineeringView.tsx      |  6 ++-
 .../src/dashboard/__tests__/CeFlow.test.tsx        |  8 +++-
 .../__tests__/CompoundEngineeringView.test.tsx     |  9 ++++-
 6 files changed, 68 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-6285

Fusion-Task-Lineage: 307d96e0-a234-4a3b-a13f-98342374eb38
2026-06-12 07:52:04 -07:00
gsxdsm
89654b2a90 FN-6282: isolate vitest worker temp roots
Use per-invocation Vitest worker roots to keep compound-engineering tests from timing out on stale temp fixtures.

- Allocate a fresh FUSION_TEST_WORKER_ROOT during Vitest global setup and remove it during teardown.
- Preserve per-worker fallback root creation when global setup is not available.
- Clean compound-engineering harness project roots on close and cover the setup invariants with regression tests.

Files changed:
 packages/core/src/__test-utils__/vitest-setup.ts   | 20 +++++++---
 .../core/src/__test-utils__/vitest-teardown.ts     | 38 +++++++++++--------
 .../src/__tests__/_harness.ts                      |  7 +++-
 .../src/__tests__/setup-invariant.test.ts          | 43 ++++++++++++++++++++++
 4 files changed, 85 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-6282

Fusion-Task-Lineage: 8b842dd0-4f51-44de-b2db-8e8bfa97239c
2026-06-12 04:19:42 -07:00
gsxdsm
3f2197be20 feat(agent-browser): real navigate/interact/observe driver (U8)
Replaces the metadata/probe stub with a playwright-core driver (no bundled
browser download; uses a probe-discovered Chrome) exposing navigate/click/type/
observe + idempotent dispose. Browser-unavailable and un-exercisable assertions
return inconclusive (never a false pass/fail); a missing selector returns a
distinct 'absent' negative observation. Driver is a direct export scoped to the
verification run, not registered as a coding-agent tool.
2026-06-12 02:11:04 -07:00
gsxdsm
0522cbccc4 feat(core): add behavioral/static type to contract assertions (U1)
Adds a persisted `type` field (behavioral|static) to MissionContractAssertion,
the schema column + migration 115 + version-sweep, and store population with a
conservative static default so existing rows preserve legacy judging. Foundation
for scoping the validator's default-to-fail / verification posture.
2026-06-11 23:22:07 -07:00
gsxdsm
2efa833357 FN-6250: add Compound Engineering session cancellation
Add cancel controls and backend support for preserving interrupted Compound Engineering sessions.

- Add an orchestrator cancel path and POST route that stops live work without deleting session history.
- Wire dashboard APIs, hooks, and UI buttons to cancel active, launching, or awaiting-input sessions.
- Cover cancellation behavior across orchestrator, routes, hooks, flow controls, and session panel tests.
- Document the cancel versus discard workflow in plugin docs and README.

Files changed:
 docs/plugins/compound-engineering.md               |  13 ++-
 .../fusion-plugin-compound-engineering/README.md   |  11 ++-
 .../src/__tests__/orchestrator-cancel.test.ts      | 101 +++++++++++++++++++++
 .../src/__tests__/session-routes.test.ts           |  35 +++++++
 .../src/dashboard/CeFlow.tsx                       |  16 +++-
 .../src/dashboard/CompoundEngineeringView.css      |  20 ++++
 .../src/dashboard/CompoundEngineeringView.tsx      |  40 +++++++-
 .../src/dashboard/__tests__/CeFlow.test.tsx        |  20 ++++
 .../__tests__/CompoundEngineeringView.test.tsx     |  53 ++++++++++-
 .../hooks/__tests__/useCeSessions.test.tsx         |  44 ++++++++-
 .../src/dashboard/hooks/api.ts                     |  10 ++
 .../src/dashboard/hooks/useCeSessions.ts           |  23 ++++-
 .../src/routes/session-routes.ts                   |  11 +++
 .../src/session/orchestrator.ts                    |  20 ++++
 14 files changed, 404 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6250

Fusion-Task-Lineage: e9997056-364c-44e1-b846-00b08a1ff8fc
2026-06-11 22:42:21 -07:00
gsxdsm
4fc00b6e1f FN-6251: rehydrate compound answers before resuming
Allow interrupted compound engineering sessions to answer pending questions after the live handle is lost.

- Rehydrate missing live session handles before sending answer turns.
- Keep detached answer resumes active while background rehydration completes.
- Cover route and orchestrator resume paths for old interrupted sessions.
- Document the resume behavior and add a patch changeset.

Files changed:
 .changeset/fn-6251-ce-answer-rehydrate.md          |   5 +
 .../fusion-plugin-compound-engineering/README.md   |   5 +-
 .../orchestrator-interrupt-resume.test.ts          | 156 ++++++++++++++++++++-
 .../src/__tests__/session-routes.test.ts           |  72 +++++++++-
 .../src/session/orchestrator.ts                    |  52 +++++--
 5 files changed, 276 insertions(+), 14 deletions(-)

Fusion-Task-Id: FN-6251
Fusion-Task-Lineage: b6930c72-6106-4da9-a0c3-4bcf882f20da
2026-06-11 21:37:10 -07:00
gsxdsm
b0967984b3 FN-6249: theme Compound Engineering textareas
Compound Engineering plugin textareas now use dashboard theme input styling.

- Apply dashboard surface, text, border, radius, font, focus, and placeholder tokens to CE free-text and guidance textareas.
- Add CSS token coverage for standard, degraded fallback, guidance, focus, and placeholder textarea states.

Files changed:
 .../src/dashboard/CompoundEngineeringView.css      | 19 ++++++
 .../src/dashboard/__tests__/theme-tokens.test.ts   | 71 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

Fusion-Task-Id: FN-6249

Fusion-Task-Lineage: d3c4dd30-1a94-4af2-a672-a2b814eb2c0d
2026-06-11 21:32:02 -07:00