Commit Graph

277 Commits

Author SHA1 Message Date
gsxdsm
8d394cd898 refactor(dashboard): graduate App.tsx off the line-count ratchet baseline
App.tsx dropped from 2,729 to 1,636 lines through the module-breakup refactor
(U1-U7), now well under the 2,000-line cap. Remove its grandfathered entry
from scripts/line-count-baseline.json so the file is subject to the cap going
forward and can never regress above 2,000. Scoped change: only the App.tsx
entry is removed; every other ceiling is untouched (a full `--update` would
have re-derived the whole baseline and re-raised ceilings for unrelated
grown files, which AGENTS.md forbids).

U8 (App.tsx module-breakup plan).
2026-06-23 22:15:56 -07:00
gsxdsm
58630683e1 FN-6948: refresh weekly test velocity baseline
Refresh the weekly test velocity report with the latest captured baseline.

- Update the latest baseline timestamp, metric deltas, quarantine counts, and #leads posting text.
- Append the 2026-06-23 test velocity history row with wall times and slowest test files.

Files changed:
 docs/test-velocity-baseline.md     |  20 +++----
 scripts/test-velocity-history.json | 111 +++++++++++++++++++++++++++++++++++++
 2 files changed, 121 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-6948

Fusion-Task-Lineage: 7b2d265a-b6c9-494c-aa87-31ae2c71c5f0
2026-06-23 01:22:54 -07:00
gsxdsm
8dc9973997 FN-6937: remove stale session cross-tab quarantine
Remove the orphaned session-cross-tab quarantine ledger entry after confirming the test remains active and rescued.

- Document FN-6937's rescue proof and ledger/config lockstep expectation in testing guidance.
- Keep the dashboard Vitest quarantine list empty with a note explaining the stale ledger-only cleanup.
- Remove the session-cross-tab row from the flaky-test quarantine ledger.

Files changed:
 docs/testing.md                     | 8 ++++++--
 packages/dashboard/vitest.config.ts | 3 +++
 scripts/lib/test-quarantine.json    | 8 +-------
 3 files changed, 10 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-6937
Fusion-Task-Lineage: 34a67bf3-2a7f-49ea-93ab-68fadc81f893
2026-06-23 00:26:16 -07:00
gsxdsm
9b440c3b35 FN-6917: re-ratchet line-count baseline
Re-ratchet the opt-in line-count audit baseline so current oversized files no longer fail the ceiling check.

- Document that the pnpm test blocker premise is stale because the guard is opt-in.
- Refresh grandfathered line-count ceilings to the current merged tree.
- Add TerminalModal.tsx to the grandfathered oversized-file baseline and drop entries that no longer need it.

Files changed:
 scripts/check-file-line-count.mjs |  3 ++
 scripts/line-count-baseline.json  | 80 +++++++++++++++++++--------------------
 2 files changed, 42 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-6917

Fusion-Task-Lineage: aaa018d8-f1a3-47a5-b63b-f18bac87b910
2026-06-22 19:42:38 -07:00
gsxdsm
ff06443bd7 FN-6921: refresh test velocity baseline
Refresh the weekly test velocity report with the latest measured results.

- Update the baseline capture timestamp, deltas, quarantine count, and #leads summary text.
- Record the latest velocity measurement row in the historical JSON log.
- Preserve already-landed branch changes by applying only the remaining FN-6921 measurement update after duplicate-commit detection.

Files changed:
 docs/test-velocity-baseline.md     |  22 ++++----
 scripts/test-velocity-history.json | 111 +++++++++++++++++++++++++++++++++++++
 2 files changed, 122 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-6921

Fusion-Task-Lineage: e0f08944-0709-43de-ba25-57903c4a58b6
2026-06-22 17:52:26 -07:00
gsxdsm
af06170a51 FN-6778: add agent artifact registry tools
Adds engine and chat tools for registering, discovering, and viewing artifacts with inbox notifications.

- Add fn_artifact_register, fn_artifact_list, and fn_artifact_view tools for heartbeat, executor, and chat sessions.
- Send best-effort dashboard system inbox notifications when artifacts are registered.
- Classify artifact tools for action gating and coordination exemptions, with coverage for executor, heartbeat, permanent agent, and chat flows.
- Document the artifact registry behavior and update package metadata, quarantine ledger, and line-count baseline.

Files changed:
 .changeset/fn-6778-artifact-agent-tools.md         |   5 +
 CONCEPTS.md                                        |   3 +
 docs/agents.md                                     |   1 +
 packages/core/src/db.ts                            |   1 +
 .../src/__tests__/session-error-recovery.test.ts   |   1 +
 .../session-persistence-roundtrip.test.ts          |   1 +
 .../src/__tests__/session-reconnect.test.ts        |   1 +
 .../src/__tests__/session-resume-history.test.ts   |   1 +
 packages/dashboard/src/chat.ts                     |   6 +-
 packages/dashboard/src/planning.ts                 |   4 +
 packages/dashboard/src/test/mockCoreEngine.ts      |   1 +
 .../engine/src/__tests__/agent-action-gate.test.ts |   3 +
 .../src/__tests__/agent-artifact-tools.test.ts     | 458 +++++++++++++++++++++
 .../src/__tests__/executor-step-session.test.ts    |  48 +++
 .../src/__tests__/gating-classifications.test.ts   |   3 +
 .../src/__tests__/heartbeat-executor.test.ts       |  40 +-
 .../src/__tests__/heartbeat-session-prompt.test.ts |  25 +-
 .../src/__tests__/permanent-agent-gating.test.ts   |   6 +
 packages/engine/src/agent-heartbeat.ts             |   6 +-
 packages/engine/src/agent-tools.ts                 | 288 ++++++++++++-
 packages/engine/src/executor.ts                    |  25 ++
 packages/engine/src/gating-classifications.ts      |   7 +
 packages/engine/src/index.ts                       |   9 +
 scripts/lib/test-quarantine.json                   |   8 +-
 scripts/line-count-baseline.json                   |  54 +--
 25 files changed, 945 insertions(+), 60 deletions(-)

Fusion-Task-Id: FN-6778
Fusion-Task-Lineage: 7eb4afcb-8140-4f86-9540-eb3b83e64148
2026-06-22 03:34:14 -07:00
gsxdsm
8f4897d3aa FN-6905: add build preflight to velocity measurement
Add a non-measured build setup step so velocity baselines do not misclassify missing dist artifacts as lane time.

- Run a default `pnpm build` preflight before measured test velocity lanes, with an explicit skip flag for pre-built CI.
- Add injectable command-runner coverage for preflight ordering, failure reporting, and skip behavior.
- Document the preflight behavior in the generated baseline report and testing docs.

Files changed:
 docs/test-velocity-baseline.md                    |   2 +
 docs/testing.md                                   |   4 +-
 scripts/__tests__/test-velocity-baseline.test.mjs | 159 ++++++++++++++++++++++
 scripts/test-velocity-baseline.mjs                |  38 +++++-
 4 files changed, 195 insertions(+), 8 deletions(-)

Fusion-Task-Id: FN-6905

Fusion-Task-Lineage: 3016a542-4395-4d06-9f2e-1a91f4939e07
2026-06-21 22:29:13 -07:00
gsxdsm
3817ada788 FN-6901: refresh weekly test velocity baseline
Refresh the weekly test velocity report with the latest captured baseline data.

- Advance the documented baseline from 2026-W25 to 2026-W26.
- Record the latest gate, changed-only test, quarantine, and boot-smoke measurement status.
- Append the new measurement row to the persisted test velocity history.

Files changed:
 docs/test-velocity-baseline.md     |  22 +++----
 scripts/test-velocity-history.json | 116 +++++++++++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-6901

Fusion-Task-Lineage: 06f42104-b3c5-4a26-86ee-fb2791f7006d
2026-06-21 21:48:40 -07:00
gsxdsm
1e81f99f72 FN-6877: stabilize dashboard changed-mode affected runs
Stabilize changed-mode affected runs by giving dashboard its own memory envelope.

- Generalize scoped affected memory-envelope handling beyond the engine lane.
- Run @fusion/dashboard changed-mode Vitest scopes in a 6144 MB, single-worker envelope.
- Cover dashboard and engine scoped partitioning/env contracts with script tests.
- Document the dashboard changed-mode OOM/SIGKILL guard and remeasurement expectations.

Files changed:
 docs/testing.md                         |   6 +-
 scripts/__tests__/test-changed.test.mjs | 112 +++++++++++++++++++++++++++-----
 scripts/test-changed.mjs                |  67 +++++++++++++++----
 3 files changed, 155 insertions(+), 30 deletions(-)

Fusion-Task-Id: FN-6877

Fusion-Task-Lineage: 084df464-ebda-4578-bfac-305800da5b6c
2026-06-21 16:48:20 -07:00
gsxdsm
ef4889585f FN-6779: add artifacts gallery to Documents
Adds a Documents-view artifact gallery backed by dashboard artifact registry APIs.

- Add artifact listing and media-serving endpoints with project scoping, validation, and safe artifact path resolution.
- Add client artifact API helpers, SWR caching, and a useArtifacts hook for background-refresh gallery data.
- Extend Documents view with an Artifacts tab, media previews, localized labels, documentation, tests, and a published package changeset.

Files changed:
 .changeset/fn-6779-artifacts-gallery.md            |   5 +
 docs/dashboard-guide.md                            |   6 +-
 packages/dashboard/app/api/legacy.ts               |  34 ++++
 .../dashboard/app/components/DocumentsView.css     | 142 ++++++++++++++++
 .../dashboard/app/components/DocumentsView.tsx     | 178 ++++++++++++++++++--
 .../components/__tests__/DocumentsView.test.tsx    | 163 +++++++++++++++++-
 .../app/hooks/__tests__/useArtifacts.test.ts       | 136 +++++++++++++++
 packages/dashboard/app/hooks/useArtifacts.ts       | 145 ++++++++++++++++
 packages/dashboard/app/utils/swrCache.ts           |   1 +
 .../src/routes/__tests__/artifacts-routes.test.ts  | 182 +++++++++++++++++++++
 .../src/routes/register-task-workflow-routes.ts    | 125 ++++++++++++++
 packages/i18n/locales/en/app.json                  |  22 ++-
 packages/i18n/locales/es/app.json                  |  27 ++-
 packages/i18n/locales/fr/app.json                  |  27 ++-
 packages/i18n/locales/ko/app.json                  |  27 ++-
 packages/i18n/locales/zh-CN/app.json               |  27 ++-
 packages/i18n/locales/zh-TW/app.json               |  27 ++-
 scripts/line-count-baseline.json                   |  16 +-
 18 files changed, 1255 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-6779

Fusion-Task-Lineage: 1d71e4be-4bfc-4706-9cbf-7214f91a79d1
2026-06-21 16:01:07 -07:00
gsxdsm
2ecf78af28 FN-6860: rescue dashboard quarantine coverage
Rescue dashboard process lifecycle coverage and clear stale quarantine state.

- Track dev server lifecycle work so stale probes and output parsing cannot race cleanup.
- Assert duplicate URL detection suppression and fallback probe cleanup across failure, restart, stop, and cleanup paths.
- Remove rescued dashboard tests from quarantine config and ledger, and document the loaded-shard proof.

Files changed:
 docs/testing.md                                    |  4 ++
 .../src/__tests__/dev-server-process.test.ts       | 28 +++++++-
 packages/dashboard/src/dev-server-process.ts       | 74 +++++++++++++++++-----
 packages/dashboard/vitest.config.ts                |  5 +-
 scripts/lib/test-quarantine.json                   | 13 +---
 5 files changed, 95 insertions(+), 29 deletions(-)

Fusion-Task-Id: FN-6860

Fusion-Task-Lineage: abd22a00-e08e-4f65-bebc-c663c715b40e
2026-06-21 13:25:41 -07:00
gsxdsm
ef44f6357f FN-6871: re-ratchet line-count baselines
Refresh the line-count audit baseline to match current repository drift.

- Update the grandfathered large-file baseline counts for current source and test files.
- Document that the line-count guard is now an opt-in audit rather than a pretest blocker.

Files changed:
 scripts/check-file-line-count.mjs |  3 +++
 scripts/line-count-baseline.json  | 22 +++++++++++-----------
 2 files changed, 14 insertions(+), 11 deletions(-)

Fusion-Task-Id: FN-6871

Fusion-Task-Lineage: d2fcf11e-2959-45a0-9bd1-1dc33b591ccf
2026-06-21 13:25:41 -07:00
gsxdsm
d57538581d FN-6854: isolate engine affected tests
Stabilize changed-test runs by giving the engine affected Vitest lane its own memory envelope.

- Split @fusion/engine out from other scoped affected-package Vitest runs.
- Apply a capped heap and single-worker settings to the isolated engine lane while preserving watchdog timing.
- Cover the partitioning and environment behavior with script tests and document the envelope.

Files changed:
 docs/testing.md                         |  3 +++
 scripts/__tests__/test-changed.test.mjs | 45 +++++++++++++++++++++++++++++++++
 scripts/test-changed.mjs                | 40 ++++++++++++++++++++++++++---
 3 files changed, 84 insertions(+), 4 deletions(-)

Fusion-Task-Id: FN-6854

Fusion-Task-Lineage: 144acf15-4ccb-4974-b06c-99cdcc2814dd
2026-06-21 13:25:41 -07:00
gsxdsm
9d31e88eca FN-6849: refresh line-count guardrail baseline
Refresh the line-count guardrail baseline so pretest accepts the current grandfathered source sizes.

- Document the FN-6849 maintenance re-ratchet in the line-count guard script.
- Regenerate the grandfathered line-count baseline for current oversized source and test files.
- Keep the guardrail active while unblocking unrelated pretest runs.

Files changed:
 scripts/check-file-line-count.mjs |  7 ++++
 scripts/line-count-baseline.json  | 74 +++++++++++++++++++--------------------
 2 files changed, 44 insertions(+), 37 deletions(-)

Fusion-Task-Id: FN-6849

Fusion-Task-Lineage: 07c04c2a-535c-43b0-9dd5-700ead4e06f0
2026-06-21 13:25:40 -07:00
gsxdsm
21df96cfbb fix(FN-5048): address PR feedback on test verification
Fusion-Task-Id: FN-5048
2026-06-21 10:53:08 -07:00
gsxdsm
ce90cc9b62 fix(FN-5048): keep Fusion test verification bounded 2026-06-21 10:05:12 -07:00
gsxdsm
f13aaa1a99 FN-6722: expose resolved GitHub issues
Expose resolved GitHub issue details in Command Center analytics and exports.

- Add resolved issue rows to local GitHub issue analytics with exact-vs-approximate timestamp metadata.
- Render a resolved issues table in the Command Center GitHub area without empty links when issue URLs are missing.
- Include resolved issue details in CSV export, route coverage, dashboard tests, docs, and the release changeset.
- Quarantine the unrelated dashboard dev-server process timer flake observed during workspace verification under the deletion ratchet.

Files changed:
 ...fn-6722-command-center-resolved-issue-detail.md |   5 +
 docs/dashboard-guide.md                            |   3 +-
 .../src/__tests__/github-issue-analytics.test.ts   | 109 +++++++++++++++++++--
 packages/core/src/github-issue-analytics.ts        |  45 ++++++++-
 packages/core/src/index.ts                         |   1 +
 .../__tests__/CommandCenter.mobile-scroll.test.tsx |   4 +-
 .../__tests__/CommandCenter.test.tsx               |   1 +
 .../components/command-center/areas/GithubArea.tsx |  67 +++++++++++++
 .../command-center/areas/__tests__/areas.test.tsx  |  55 +++++++++++
 .../register-command-center-routes.test.ts         |  61 +++++++++++-
 packages/dashboard/src/command-center-csv.ts       |  39 +++++++-
 packages/dashboard/vitest.config.ts                |   7 +-
 scripts/lib/test-quarantine.json                   |   5 +
 13 files changed, 382 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-6722
Fusion-Task-Lineage: 9fcbd8c2-f1bc-4b86-b5f5-593e5fd0e675
2026-06-21 09:00:40 -07:00
gsxdsm
c18e827b90 FN-6839: await CLI cached store shutdown
Rescue the retained CLI quarantine by making TaskStore shutdown deterministic before fixture cleanup.

- Await cached extension TaskStore closes and clear the cache before asynchronous shutdown drains.
- Update CLI fixtures to await direct and cached store closure, with a regression proving cached close is awaited.
- Remove rescued CLI quarantine entries/excludes and document the loaded-suite rescue with a patch changeset.

Files changed:
 .changeset/fn-6839-close-cached-stores.md          |  5 ++
 CLAUDE.md                                          |  1 +
 docs/testing.md                                    |  4 ++
 .../extension-agent-set-instructions.test.ts       |  2 +-
 .../__tests__/extension-goal-tools-audit.test.ts   |  2 +-
 .../cli/src/__tests__/extension-goal-tools.test.ts |  2 +-
 .../cli/src/__tests__/extension-insights.test.ts   |  6 +--
 .../__tests__/extension-mission-goal-tools.test.ts |  2 +-
 .../cli/src/__tests__/extension-task-tools.test.ts | 16 ++++---
 packages/cli/src/__tests__/extension.test.ts       | 56 +++++++++++-----------
 .../src/__tests__/research-extension-tools.test.ts |  4 +-
 packages/cli/src/extension.ts                      | 16 +++----
 packages/cli/vitest.config.ts                      |  6 +--
 scripts/lib/test-quarantine.json                   | 15 ------
 14 files changed, 68 insertions(+), 69 deletions(-)

Fusion-Task-Id: FN-6839

Fusion-Task-Lineage: ea0c7c77-bb59-4db4-931d-5e052a1043e5
2026-06-21 09:00:40 -07:00
gsxdsm
275e97edc1 Merge pull request #1699 from Runfusion/codex/start-engines-by-default
[codex] Start Fusion engines by default
2026-06-21 02:35:13 -07:00
gsxdsm
5de224e51e Merge pull request #1698 from Runfusion/gsxdsm/smaller-files
chore(ci): add file line-count guardrail to pretest
2026-06-21 02:23:47 -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
b7182da349 Address PR review feedback (#1698)
- Import URL from node:url to clear ESLint no-undef (coderabbit)
- Throw on unreadable tracked files instead of silently skipping, so a
  file can't evade the cap and false-pass (coderabbit)
- Emit the "baseline can be tightened" note for deleted-only stale entries
  too, with a correct count (greptile)
- Add FNXC:CI comments to the guard and its test per AGENTS.md (greptile)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 00:05:41 -07:00
gsxdsm
2d6ba99caf chore(ci): add file line-count guardrail to pretest
Add a pretest guard that caps new source files at 2,000 lines to stop
god-files from being born, following the existing check-no-* guard pattern.

Existing oversized files (106 of them) are grandfathered via a ratchet
baseline (scripts/line-count-baseline.json): each is pinned to its current
line count and may shrink but never grow. Files refactored under the cap
drop out of the baseline and cannot regress. Generated, lock, locale, and
.d.ts files are out of scope via the source-extension filter.

Wired into pretest and pretest:full; covered by 11 unit tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 23:57:59 -07:00
gsxdsm
7ef381762a feat: start engines by default 2026-06-20 23:57:37 -07:00
gsxdsm
fdccca9d27 fix(review): apply autofix feedback
- Reformat shard-floor justification as an FNXC:TestInfrastructure comment
  (project-standards: AGENTS.md FNXC_LOG convention).
- Clarify that the shard and dashboard-lane 15min floors are not coupled and
  may diverge (maintainability: avoid implying an unenforced contract).
- Add a regression-guard test pinning shard.floor=15min and asserting a 525s
  derived budget clamps up to the floor, so an accidental revert to the old
  5min floor fails loudly (correctness + testing + project-standards).
2026-06-20 21:53:31 -07:00
gsxdsm
74e056ed99 fix(ci): raise shard watchdog floor to 15min to stop false-kills
The Full Suite (non-blocking) workflow has been red for 30+ runs on main.
Diagnosis: the @fusion/engine [1/2], [2/2] and @fusion/core [2/2] shard
slices were SIGKILLed at their watchdog budgets (405s/405s/338s), not because
they hang but because those budgets are too tight for current wall-clock.

Local baselines (this machine, all pass, exit 0):
  - engine [2/2]: 145s wall / 309 files
  - core   [2/2]: 283s wall / 172 files  (old budget was only 338s!)

deriveBudgetMs tightens the budget to expected*3.5 whenever the committed
scripts/test-timings.json is <30d old. The snapshot (2026-06-03) undercounts
the import- and real-git-subprocess overhead of these heavy slices, so the
'fresh' snapshot produced a too-tight, false-kill budget on slower CI runners
-- the exact failure mode the floor/ceiling band exists to prevent.

Fix (plan KTD-2): raise the shard band floor 5min -> 15min so the heaviest
slices can't be tightened into a false-kill, while a true hang is still bounded
far under the job's 60min ceiling. Mirrors the dashboard-lane heavy-lane floor.
Follow-up: refresh scripts/test-timings.json from a default-branch CI run.
2026-06-20 21:48:14 -07:00
gsxdsm
c0d78f19c5 FN-6795: update quarantine ledger after rescue triage
Refresh the test quarantine records after loaded-lane rescue verification.

- document the FN-6795 CLI and core quarantine triage outcomes
- rescue passing core and CLI test files by removing their ledger/config excludes
- retain CLI package-lane-only timeout quarantines and add the newly observed bin test flake

Files changed:
 docs/testing.md                  |  4 ++++
 packages/cli/vitest.config.ts    | 10 +++++++---
 packages/core/vitest.config.ts   |  4 +++-
 scripts/lib/test-quarantine.json | 25 +++++--------------------
 4 files changed, 19 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-6795
Fusion-Task-Lineage: b4460fc7-848f-4d54-89b4-cfd4d4533d57
2026-06-20 10:28:25 -07:00
gsxdsm
3bda46dbd5 FN-6775: ignore synced mobile assets in lint
Keep generated Capacitor Android web assets out of ESLint while preserving source lint coverage.

- Add an ESLint flat-config ignore for Capacitor-synced Android public assets.
- Add a node:test regression guard proving synced mobile assets are ignored and real package source remains linted.

Files changed:
 eslint.config.mjs                                  |  6 ++++
 .../eslint-ignores-mobile-synced-assets.test.mjs   | 39 ++++++++++++++++++++++
 2 files changed, 45 insertions(+)

Fusion-Task-Id: FN-6775

Fusion-Task-Lineage: 4bab7695-70b5-4a8c-b7de-6e0055ff4b9f
2026-06-20 04:11:33 -07:00
gsxdsm
6e2e5c6b62 WIP: scope affected test runs to changed-related tests (vitest --changed)
Affected packages with a vitest config now run `vitest run --changed <base>`
(only tests in the changed files' module graph) under the tight "changed"
watchdog, instead of each package's ENTIRE suite under a 60-min backstop.
Packages without a vitest config fall back to their full `test` script. The
curated gate suite still runs as the cross-cutting safety net.

Measured: a dashboard hub-component change drops from 822 files (5-8min) to
40 files (~98s wall incl. gate). Common/leaf changes scope to far fewer.
NOT yet <60s for hub-component changes — the fixed jsdom/setup floor still
dominates (needs the overhead-reduction follow-up), and one scoped-run test
failure needs isolation triage before this gates verification.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 22:05:09 -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
24ff12471f Stop quarantine-list edits from forcing pnpm test into gate mode
scripts/lib/test-quarantine.json is runtime data (which tests are
quarantined), not executable test infra, but it tripped the shared-infra
catch-all in isSharedInfraChange. That forced mode=gate, which runs only
the fixed engine-core + cli-shape gate suite and returns before the
affected packages -- so a dev's real changes (e.g. @fusion/core,
@fusion/dashboard) got zero coverage whenever they also touched the
quarantine list. Classify the file as test-irrelevant so the diff stays
in changed mode and the affected packages run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-19 19:05:49 -07:00
gsxdsm
1a565a368b FN-6744: rescue WorkflowNodeEditor merge seam guard
Rescue the WorkflowNodeEditor quarantine by making duplicate merge seam detection reliable during initial canvas load.

- Derive fragment seam conflicts from the loaded workflow IR until React Flow nodes materialize.
- Treat IR merge nodes as merge seams so duplicate merge fragments are rejected consistently.
- Cover desktop and mobile duplicate merge fragment insertion paths and remove the test from quarantine.
- Document the FN-6744 rescue evidence and deletion-ratchet update.

Files changed:
 docs/testing.md                                    |  6 +++-
 .../app/components/WorkflowNodeEditor.tsx          | 11 +++++--
 .../__tests__/WorkflowNodeEditor.test.tsx          | 34 ++++++++++++++++------
 .../app/components/workflow-flow-mapping.ts        | 10 +++++++
 packages/dashboard/vitest.config.ts                |  8 +++--
 scripts/lib/test-quarantine.json                   |  5 ----
 6 files changed, 54 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-6744

Fusion-Task-Lineage: 0f5b167a-8efc-4458-ac9d-e719320b751f
2026-06-19 18:38:17 -07:00
gsxdsm
d06d1052db FN-6743: rescue QuickEntryBox focus restoration
Restore reliable QuickEntryBox post-submit focus and return its test to the dashboard suite.

- Replace the ref-gated focus effect with a state-driven post-submit focus request.
- Cover desktop Enter, Save, duplicate-confirmed submit, mobile non-focus, and failed-submit draft preservation.
- Remove QuickEntryBox from dashboard quarantine while keeping the remaining workflow editor quarantine.

Files changed:
 .../dashboard/app/components/QuickEntryBox.tsx     | 46 +++++++++++++++++-----
 .../components/__tests__/QuickEntryBox.test.tsx    | 29 +++++++++++++-
 packages/dashboard/vitest.config.ts                |  5 ++-
 scripts/lib/test-quarantine.json                   |  5 ---
 4 files changed, 69 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-6743

Fusion-Task-Lineage: 2d458631-3ff3-4d96-8d91-bc2a17538be2
2026-06-19 17:49:06 -07:00
gsxdsm
f01ede2523 FN-6742: rescue session cross-tab tests
Rescue the dashboard session cross-tab test before its deletion-ratchet deadline.

- Dispose the API router and session cleanup scheduler before closing test stores.
- Hide unused TaskStore EventEmitter hooks in the route-only harness to avoid background route subscribers reopening temp fixtures.
- Remove the session-cross-tab quarantine ledger entry and dashboard Vitest exclude in lockstep.
- Document the rescue evidence and teardown pattern for future dashboard session tests.

Files changed:
 docs/testing.md                                    |  6 ++++-
 .../src/__tests__/session-cross-tab.test.ts        | 30 +++++++++++++++++++---
 packages/dashboard/vitest.config.ts                |  5 +++-
 scripts/lib/test-quarantine.json                   |  5 ----
 4 files changed, 36 insertions(+), 10 deletions(-)

Fusion-Task-Id: FN-6742

Fusion-Task-Lineage: e26d70eb-f139-45f7-8ddd-bde2d172c291
2026-06-19 16:47:34 -07:00
gsxdsm
8d2b396e85 FN-6741: rescue core quarantine entries
Rescue the loaded @fusion/core quarantine batch while keeping the remaining lock flake quarantined.

- Remove rescued core test files from the quarantine ledger and Vitest exclude list.
- Close the settings-export TaskStore before fixture cleanup to release resources deterministically.
- Re-quarantine the store-concurrent-writes broad-lane SQLite lock flake observed during merge verification.
- Document the rescue evidence and remaining deletion-ratchet follow-up.

Files changed:
 docs/testing.md                                    |  8 ++++++-
 .../core/src/__tests__/settings-export.test.ts     |  5 ++++
 packages/core/vitest.config.ts                     | 11 +++++----
 scripts/lib/test-quarantine.json                   | 27 +---------------------
 4 files changed, 19 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-6741

Fusion-Task-Lineage: 064367a6-f1c4-4685-a766-37bf2204a42c
2026-06-19 16:47:34 -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
8927173ae0 FN-6726: prevent Command Center token totals from overflowing
Contain Command Center token totals so large formatted values stay inside their stat surfaces.

- Add shrink and wrap containment to stat and live metric value styles.
- Cover large comma-grouped token totals across Overview, Tokens, and Team surfaces.
- Guard the emitted CSS declarations and quarantine an unrelated WorkflowNodeEditor flake observed during verification.

Files changed:
 .../components/command-center/CommandCenter.css    | 10 +++++
 .../__tests__/CommandCenter.test.tsx               |  9 ++++
 .../CommandCenter.token-validity.css.test.ts       | 21 ++++++++++
 .../command-center/areas/__tests__/areas.test.tsx  | 48 ++++++++++++++++++----
 packages/dashboard/vitest.config.ts                |  5 +++
 scripts/lib/test-quarantine.json                   |  5 +++
 6 files changed, 89 insertions(+), 9 deletions(-)

Fusion-Task-Id: FN-6726

Fusion-Task-Lineage: 8a26ca5c-fdbe-4e68-a9d2-ae93340fe685
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
c16c9fd234 FN-6697: preserve terminal shortcut keyboard focus
Preserve xterm focus while terminal shortcut buttons send control and literal input.

- Prevent shortcut button mousedown from stealing focus away from the xterm helper textarea.
- Refocus the terminal after modifier, literal, arrow, and Ctrl/Alt shortcut actions.
- Add desktop and touch-primary regression coverage for shortcut byte delivery with hardware-keyboard focus.
- Quarantine an unrelated QuickEntryBox focus-timing flake observed during workspace verification.

Files changed:
 .../dashboard/app/components/TerminalModal.tsx     |  79 ++++++++---
 .../components/__tests__/TerminalModal.test.tsx    | 151 +++++++++++++++++++++
 packages/dashboard/vitest.config.ts                |   9 +-
 scripts/lib/test-quarantine.json                   |   5 +
 4 files changed, 225 insertions(+), 19 deletions(-)

Fusion-Task-Id: FN-6697
Fusion-Task-Lineage: 558cfb44-ca48-4223-97d1-c3b6bc39b2fd
2026-06-19 05:25:02 -07:00
gsxdsm
3383a095b7 FN-6694: add workflow reliability release-check harness
Add an on-demand executable release-check lane for custom workflow reliability signoff.

- Add a manifest-backed release-check runner with dry-run, JSON output, validation, and targeted Vitest command planning.
- Define the custom workflow reliability checklist seams and cover runner validation, planning, reporting, and failure behavior with node tests.
- Document the QA signoff command and manifest mapping while keeping the lane out of the merge gate.

Files changed:
 docs/custom-workflow-reliability-acceptance-map.md |  29 +-
 docs/testing.md                                    |   3 +
 package.json                                       |   1 +
 .../workflow-reliability-release-check.test.mjs    | 138 +++++++++
 .../lib/workflow-reliability-release-check.json    | 102 +++++++
 scripts/workflow-reliability-release-check.mjs     | 312 +++++++++++++++++++++
 6 files changed, 579 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-6694

Fusion-Task-Lineage: 21d45bb5-6c45-4cb7-8b29-9eaea8b29ad4
2026-06-19 05:13:39 -07:00
gsxdsm
9d07e85232 FN-6690: preload lazy-view CSS chunks
Ensure persisted lazy dashboard views request their extracted CSS before first paint.

- Carry CSS asset paths through the Vite view chunk manifest.
- Inject stylesheet links alongside modulepreload links for persisted lazy views.
- Cover Command Center CSS preloading and served CSS availability in dashboard tests.
- Quarantine the unrelated session cross-tab cleanup flake observed during verification.

Files changed:
 .changeset/fn-6690-lazy-view-css.md                |   5 +
 .../__tests__/board-mobile-initial-render.test.tsx |  16 ++-
 .../src/__tests__/server-view-preload.test.ts      | 152 ++++++++++++++++++++-
 .../src/__tests__/view-chunk-manifest.test.ts      |  57 ++++++--
 packages/dashboard/src/server.ts                   |  16 ++-
 packages/dashboard/src/view-chunk-manifest.ts      |  26 +++-
 packages/dashboard/vitest.config.ts                |   6 +-
 scripts/lib/test-quarantine.json                   |   5 +
 8 files changed, 253 insertions(+), 30 deletions(-)

Fusion-Task-Id: FN-6690

Fusion-Task-Lineage: 6ac0d06f-14db-4302-98f8-0e742172ed7f
2026-06-19 03:49:56 -07:00
gsxdsm
deb1717812 FN-6667: add real iOS Safari acceptance harness
Add a real iOS Safari acceptance harness and documentation for terminal verification gates.

- Add an `ios:acceptance` script with check, dry-run, and real WebDriver session modes.
- Support BrowserStack, Sauce Labs, and LambdaTest credential discovery with redacted capability planning.
- Document the real-iOS provisioning workflow and link it from testing docs.
- Cover credential selection, URL validation, capability shaping, and CLI behavior with node tests.

Files changed:
 docs/README.md                            |   1 +
 docs/ios-acceptance.md                    | 144 ++++++++++++++++
 docs/testing.md                           |   3 +
 package.json                              |   1 +
 scripts/__tests__/ios-acceptance.test.mjs | 131 +++++++++++++++
 scripts/ios-acceptance.mjs                | 264 ++++++++++++++++++++++++++++++
 scripts/lib/ios-acceptance.mjs            | 243 +++++++++++++++++++++++++++
 7 files changed, 787 insertions(+)

Fusion-Task-Id: FN-6667

Fusion-Task-Lineage: 9eee6dbe-646e-4fff-a1da-fd59cdd2cb59
2026-06-18 16:47:09 -07:00
gsxdsm
538bf42e32 fix(dev): rebuild core+engine+dashboard on dev/local startup + stale-dist check
pnpm dev/local dashboard prebuild now rebuilds @fusion/core and @fusion/engine alongside the dashboard UI (was client-only), and startup warns loudly when built dist/ is older than src/. Prevents the FN-6638 class where landed engine fixes silently never run because the process loads stale dist.
2026-06-18 13:41:37 -07:00
gsxdsm
b480699e06 FN-6642: rescue dashboard flaky test coverage
Rescue the dashboard quarantine candidates by restoring stable shared mocks and refreshing quarantine evidence.

- Remove QuickEntryBox and chat-routes from the dashboard quarantine config and ledger.
- Add iterable chat task document tool mocks across dashboard session test helpers.
- Refresh the test velocity baseline and history with zero quarantined tests.

Files changed:
 docs/test-velocity-baseline.md                     |  20 ++--
 .../src/__tests__/session-error-recovery.test.ts   |   2 +
 .../session-persistence-roundtrip.test.ts          |   2 +
 .../src/__tests__/session-reconnect.test.ts        |   2 +
 .../src/__tests__/session-resume-history.test.ts   |   2 +
 packages/dashboard/src/test/mockCoreEngine.ts      |   6 ++
 packages/dashboard/vitest.config.ts                |  13 ++-
 scripts/lib/test-quarantine.json                   |  10 --
 scripts/test-velocity-history.json                 | 111 +++++++++++++++++++++
 9 files changed, 144 insertions(+), 24 deletions(-)

Fusion-Task-Id: FN-6642

Fusion-Task-Lineage: 76e51d76-ce9a-4e68-9aa0-ad83cdf351a9
2026-06-18 09:16:32 -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
dae0bde6f1 FN-6633: guide chat agents to ask questions for options
Encourage dashboard chat agents to turn option sets into selectable ask-question cards.

- Expand chat-lane prompt guidance so options, choices, and alternatives use `fn_ask_question` instead of prose-only lists.
- Cover the guidance in chat manager tests and assert the prompt is passed to resolved sessions.
- Record the patch changeset and quarantine unrelated flaky dashboard tests observed during verification.

Files changed:
 .changeset/fn-6633-chat-question-guidance.md          |  5 +++++
 packages/dashboard/src/__tests__/chat-manager.test.ts | 14 +++++++++++++-
 packages/dashboard/src/chat.ts                        |  5 ++++-
 packages/dashboard/vitest.config.ts                   |  9 ++++++++-
 scripts/lib/test-quarantine.json                      | 10 ++++++++++
 5 files changed, 40 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-6633
Fusion-Task-Lineage: e59371d3-b198-4fe8-a70c-b94994060c59
2026-06-18 06:31:26 -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
fbd9ad2f3b FN-6617: add weekly test velocity baseline
Adds a report-only weekly baseline for test feedback-loop velocity.

- Add a test:velocity script that measures gate, boot smoke, and changed-only test durations and regenerates a #leads-ready report.
- Track committed baseline history, slowest-file summaries, and quarantine deletion-clock counts.
- Document the weekly refresh workflow in testing guidance and agent instructions.

Files changed:
 AGENTS.md                                         |   4 +-
 docs/test-velocity-baseline.md                    |  92 ++++++
 docs/testing.md                                   |  18 ++
 package.json                                      |   1 +
 scripts/__tests__/test-velocity-baseline.test.mjs | 121 ++++++++
 scripts/test-velocity-baseline.mjs                | 339 ++++++++++++++++++++++
 scripts/test-velocity-history.json                | 231 +++++++++++++++
 7 files changed, 805 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-6617

Fusion-Task-Lineage: 50a07298-74ec-4481-b288-4fadb7d3d29b
2026-06-17 20:09:05 -07:00
gsxdsm
f150a176b4 FN-6612: add test feedback-loop baseline reporting
Add a weekly baseline workflow for tracking test feedback-loop speed and flake pressure.

- Add a stdlib-only script to record gate and pnpm test timings alongside slowest test files and quarantine counts.
- Publish generated markdown and JSON baseline artifacts for #leads reporting.
- Document the weekly refresh process and add package scripts plus coverage for the baseline helper.

Files changed:
 docs/test-feedback-loop-baseline.md               |  48 ++++++
 docs/test-feedback-loop-baselines.json            | 122 ++++++++++++++
 docs/testing.md                                   |  12 ++
 package.json                                      |   1 +
 scripts/__tests__/test-feedback-baseline.test.mjs |  90 ++++++++++
 scripts/test-feedback-baseline.mjs                | 192 ++++++++++++++++++++++
 6 files changed, 465 insertions(+)

Fusion-Task-Id: FN-6612

Fusion-Task-Lineage: 72bdc070-50e3-4e6b-a07d-3b8aeb9c2e92
2026-06-17 19:25:06 -07:00