Commit Graph

242 Commits

Author SHA1 Message Date
Fusion Agent
286dd0a7ae fix(workspace): block completion only on main-checkout commits
Uncommitted edits in a sub-repo main checkout no longer refuse `fn_task_done`.
They emit `worktree:workspace-main-checkout-edit` with `outcome:"warned"`,
`reason:"uncommitted-only"`, and their evidence enum instead.

Two measured reasons. The workspace land path is the same `landOneRepo` /
`landSquash` mechanic as single-repo, with `projectRootDir` set to the sub-repo
main checkout, so a dirty tree there is already stashed (untracked included) ->
fast-forwarded -> restored under `merger.allowDirtyLocalCheckoutSync`; refusing
completion for a state the very next stage is built to absorb stops the board
for nothing. And an in-scope status entry carried no timing evidence at all, so
an operator editing the same feature was indistinguishable from an agent that
skipped `fn_acquire_repo_worktree` -- while the refusal named an operator-only
remedy in a message addressed to the agent, so the card could only loop.

The dangerous cases keep their refusals: a task-attributed commit still returns
`main_checkout_edit` (it would reach the shared branch unreviewed), and work
that exists only in a main checkout still fails the acquired-worktree
`no_commits` invariant that actually proves delivery.
2026-08-27 21:35:29 +00:00
Fusion Agent
8e8e3233c6 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	docs/dashboard-guide.md
#	packages/core/src/__tests__/postgres/schema-applier.test.ts
#	packages/core/src/__tests__/task-merge.test.ts
#	packages/core/src/merge/task-merge.ts
#	packages/core/src/postgres/schema-applier.ts
#	packages/core/src/task-store/merge-queue-ops.ts
#	packages/dashboard/app/__tests__/App.keyboard-shortcuts.test.tsx
#	packages/dashboard/app/components/ChatView.css
#	packages/dashboard/app/components/ChatView.tsx
#	packages/dashboard/app/components/__tests__/ChatView.core-contracts.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.core-interactions.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.core.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.draft.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.message-edit.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.mobile-render.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.mobile.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.new-chat-default.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.rooms.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.scroll-to-top.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.sessions-rooms.test.tsx
#	packages/dashboard/app/components/__tests__/ChatView.thinking-level.test.tsx
#	packages/engine/src/__tests__/executor-step-session.test.ts
#	packages/engine/src/__tests__/merge-abort-clears-transient-status.test.ts
#	packages/engine/src/__tests__/merger-ai-cleanup.test.ts
#	packages/engine/src/__tests__/merger-merge-lifecycle.test.ts
#	packages/engine/src/__tests__/workspace-merger.test.ts
#	packages/engine/src/merge/auto-merge-finalization.ts
#	packages/engine/src/merge/merger-ai.ts
#	packages/engine/src/project-engine.ts
#	packages/engine/src/run-audit/run-audit-catalogue.ts
#	packages/engine/src/self-healing.ts
#	packages/engine/src/worktree/review-diff-fingerprint.ts
#	packages/i18n/locales/es/app.json
#	packages/i18n/locales/fr/app.json
#	packages/i18n/locales/ko/app.json
#	packages/i18n/locales/pt-BR/app.json
#	packages/i18n/locales/zh-CN/app.json
#	packages/i18n/locales/zh-TW/app.json
2026-08-24 03:55:34 +00:00
gsxdsm
456f7b370b docs(test-failures): retract the connection-exhaustion cause, record the failed reproduction
Measured 14 backend connections against max_connections=100, so the api-lane
hook timeouts are not connection exhaustion; the PostgreSQL Failed query lines
are a torn-down reconciler polling after the fact. Full 15-lane run at 23,584
tests reproduced nothing, and the DDL admission gate never degraded, so that
mechanism is unsupported too. Records what a future attempt must capture.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 20:08:43 -07:00
gsxdsm
72f0bbb503 docs: record dashboard api-lane PostgreSQL contention as a suite-infrastructure flake pattern
Three consecutive full-lane runs on the same tree each failed a DIFFERENT file,
every one passing in isolation, with hook timeouts arriving alongside PostgreSQL
'Failed query' warnings from two api lanes sharing one database. That is the same
class FN-9131 investigated for core's loaded PostgreSQL directory.

Deliberately not quarantined: quarantine is file-level and the failing file moves,
so it would evict healthy coverage without touching the cause. Recorded with the
evidence so the next person does not re-derive it, and so the rescue is aimed at
the lane runner's connection/concurrency budget rather than at whichever test lost
the race that run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 18:45:31 -07:00
Fusion Agent
cb16f418c7 FN-183: ensure local integration branch readiness
Guarantee projects have a usable local integration branch ref across creation, import, and merge workflows.

- Add shared integration-branch readiness and repository initialization helpers.
- Wire project registration, CLI commands, central storage, and merge execution to establish the ref.
- Document the behavior and cover CLI, dashboard, core, and engine integration paths.

Files changed:
 .changeset/fn-183-integration-branch-readiness.md  |   7 +
 docs/architecture.md                               |   2 +-
 docs/cli-reference.md                              |   4 +-
 docs/getting-started.md                            |   2 +-
 docs/settings-reference.md                         |   2 +-
 .../auto-git-init-project-registration.md          |  21 +++
 docs/workspaces.md                                 |   2 +-
 packages/cli/src/commands/__tests__/init.test.ts   |  70 +++++--
 .../cli/src/commands/__tests__/project.test.ts     |  22 +++
 packages/cli/src/commands/init.ts                  |  26 ++-
 packages/cli/src/commands/project.ts               |  20 ++
 packages/core/src/__tests__/git-repository.test.ts | 190 +++++++++++++++++++
 .../__tests__/integration-branch-readiness.test.ts |  94 ++++++++++
 packages/core/src/central/central-core.ts          |  65 +++++--
 packages/core/src/git/git-repository.ts            | 112 ++++++++++--
 .../core/src/git/integration-branch-readiness.ts   | 201 +++++++++++++++++++++
 packages/core/src/index.gate.ts                    |  14 ++
 packages/core/src/index.ts                         |  14 ++
 packages/core/src/merge/task-merge.ts              |   2 +-
 .../register-project-git-readiness.test.ts         | 132 +++++++++++++-
 .../src/routes/register-project-routes.ts          |  31 +++-
 .../src/__tests__/integration-branch.test.ts       | 135 ++++++++++++++
 packages/engine/src/__tests__/merger-ai.test.ts    |  21 +++
 packages/engine/src/merge/integration-branch.ts    | 127 ++++++++++++-
 packages/engine/src/merge/merger-ai.ts             |  25 ++-
 25 files changed, 1273 insertions(+), 68 deletions(-)

Fusion-Task-Id: FN-183
Fusion-Task-Lineage: ee63d45a-3406-4064-b16f-a2fe6dc0ad86
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-24 01:20:23 +00:00
gsxdsm
5378bca7f6 test: fix the dashboard quality runner's self-spawning tests
Running the dashboard's REAL test command (`run-quality-tests.mjs`, which shards
into 15 lanes) surfaced two failures that a plain `vitest run` never shows —
worth noting on its own, since measuring around a package's own command is how
a suite gets called green on a number the project does not produce.

`scripts/__tests__/run-quality-tests.test.ts` spawns the package's own
`pnpm --filter @fusion/dashboard test` to prove the package-command wiring. Inside
a full lane run that child inherited a Corepack environment that stopped to ask
about downloading pnpm, so it never launched, the lane log came back empty, and
the assertion read 0 launched projects. It passed in isolation only because that
shell had already resolved pnpm. Both spawn sites now set
COREPACK_ENABLE_DOWNLOAD_PROMPT=0; nothing about the assertions changed.

Also records PlanningModeModal.planning-flow as a suite-only flake rather than
forcing it green: it fails only in lane `app:backfill-3` under four concurrent
6GB shards, passes 83/83 in isolation, and picked a DIFFERENT case on each of two
runs — a render-settle timing problem, not a product defect. Recorded as a first
sighting; a repeat of the same case is an on-sight quarantine.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 18:03:38 -07:00
gsxdsm
4475342145 docs: record a first-sighting PG setup-hook flake in the observed register
`handoff-to-review-atomicity.pg.test.ts` aborted its `beforeAll` at the 15s
budget on the first `pnpm test:gate` of a session; not reproduced in 8 later
runs across three shapes (gate x2, pg-gate x3, isolated x3).

Same mode as entries 6 and 7, but narrower: it happened under the capped
four-fork lane with two selected files, so fork oversubscription does not
explain it. Recorded the cold-cluster correlation as a hypothesis rather than a
finding — reproducing it means stopping the embedded cluster, and this host runs
a live Fusion instance.

Discloses that the failing run's full output was lost to a tail pipe, and that
inline quarantine was unavailable regardless (quarantinedCoreTests must stay
empty); eviction of a transactional-invariant gate file is owner-escalated.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 15:45:31 -07:00
gsxdsm
39812f4898 test: quarantine one suite-only flake, record another, fix the lockstep guard
Full engine suite at a97aa84a20: 3 failures out of 12,414. All three diagnosed:

- self-healing-pending-wedge-notification's marker-selection case fails ONLY in
  a full-suite run (expects 1 elapsed marker, sees 2) and passes deterministically
  alone. This is its SECOND sighting, so per AGENTS.md it is an on-sight
  quarantine with no further discretion: ledger entry + matching vitest exclude,
  same commit, 2026-09-06 deletion deadline.
- spec-drift-reconciler's exponential-backoff case shows the same shape on a
  FIRST sighting, so it is recorded in the observed register instead of evicting
  that file's other passing coverage. Both are timer-driven reconciler tests that
  only fail alongside other suites, pointing at cross-file fake-timer state.
- merge-orphan-durable-write-inventory drift was pure lineHint movement (19
  changed, zero newly unclassified entries) after product edits shifted lines.
  Regenerated.

Also fixes check-quarantine-ledger.mjs, which could not see the exclude I added:
its comment stripper treated the `/**` inside glob literals like "node_modules/**"
and "src/**/*.slow.test.ts" as a block-comment opener and deleted through to the
next "*/", swallowing whole array literals and every entry after them. It now
scans string-aware, so the lockstep check actually holds. Nothing was appeased:
no timeout widened, no retry added, no assertion relaxed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 15:43:00 -07:00
gsxdsm
324145c1e1 test: repair engine fixtures that predate shipped product guards
The engine suite's failures are not independent bugs; they are a handful of
systemic drifts where a guard shipped and its fixtures were never updated.

- Required pre-merge gates (FN-158): the door refuses a card whose enabled
  optional groups produced no result, and the built-in workflow enables Plan and
  Code Review by default. Merge-mechanics fixtures now declare an explicit empty
  list, stating the intent they always had. group-merge-coordinator's
  "post-Code-Review member" instead gets real PASSING workflowStepResults,
  because recording the pass is what that fixture actually means.
- Branch-write provenance: the shared reliability fixture creates a task with a
  branch, which now requires an explicit origin. It stands in for an
  engine-created branch, so it says so.
- updateTaskAtomic: a production write seam missing from several fake stores,
  copied from the faithful fake in merger-ai.test.ts.
- Durable-write inventory: eight unclassified TaskStore surfaces classified,
  including the two batched reads this branch added.
- workflow-graph-merge-region-collapse asserted completion-summary AFTER
  code-review; the IR wires it before, and production logs agree.

merger-ai.test.ts alone goes 37 -> 0. Engine failures 288 -> ~200.

Also records a first-sighting suite-only flake in the observed register per the
standing rule, rather than quarantining a file with substantial coverage.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 10:18:50 -07:00
Fusion Agent
e5ac9c385a FN-152: repair local PostgreSQL test provisioning
Repair embedded PostgreSQL test-server staging and diagnostics for reliable local and worktree test runs.

- Stage native PostgreSQL runtime files before startup and manage lifecycle state safely.
- Add provisioning diagnostics, harness integration, regression tests, and troubleshooting documentation.
- Expose PostgreSQL test-server lifecycle commands through package scripts.

Files changed:
 ...server-libdir-plpgsql-and-missing-login-role.md |  15 +
 docs/testing.md                                    |  10 +
 package.json                                       |   3 +
 .../__test-utils__/pg-provisioning-diagnostics.ts  |  25 ++
 .../core/src/__test-utils__/pg-test-harness.ts     |   5 +
 .../__tests__/pg-provisioning-diagnostics.test.ts  |  30 ++
 .../__tests__/reliability-interactions/_helpers.ts |  17 +-
 scripts/__tests__/pg-test-server.test.mjs         |  73 +++++
 scripts/pg-test-server.mjs                        | 332 +++++++++++++++++++++
 9 files changed, 505 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-152

Fusion-Task-Lineage: ead05f6e-00fc-42a0-8599-bf4cb2269527

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:36:12 +00:00
Fusion Agent
d42a60ea06 FN-142: fix plan confirmation read-back and no-op routing
Make plan persistence confirmations observe the filesystem-backed prompt and let valid no-op reviews terminate cleanly.\n\n- Verify PROMPT.md by querying the task after writes across planning and review surfaces.\n- Add coverage for workspace scope, duplicate plans, failed read-backs, and mirror failures.\n- Route CLOSE_NO_OP Plan Review outcomes through an explicit terminal workflow action.\n- Document the persistence failure mode and publish a patch changeset.\n\nFiles changed:\n .changeset/fn-142-prompt-write-read-back.md        |   7 ++\n .../prompt-write-read-back-queries-the-task-row.md |  51 +++++++++++\n .../core/src/__tests__/builtin-workflows.test.ts   |  22 +++++\n packages/core/src/workflows/builtin-workflows.ts   |  12 +++\n .../src/__tests__/agent-document-tools.test.ts     | 101 ++++++++++++++++++++-\n .../__tests__/plan-prompt-write-surfaces.test.ts   |  77 +++++++++++++++\n packages/engine/src/agent-tools.ts                 |  15 ++-\n 7 files changed, 283 insertions(+), 2 deletions(-)

Fusion-Task-Id: FN-142

Fusion-Task-Lineage: adddffb3-8786-4372-996a-eefef176f31b

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:36:12 +00:00
Fusion Agent
33f4797ceb FN-126: fix inert sync-lane validation
Prevent inert synchronization lanes from bypassing merge-gate validation while preserving task-lane cache and archive lifecycle behavior.

- Reject sync-resolved lane conversions in the static validator.
- Preserve task-lane cache emissions and active-session cleanup across task mutations and archival.
- Add regression coverage, baseline updates, documentation, and a release changeset.

Files changed:
 .changeset/fn-126-inert-sync-lane.md               |   7 +
 .../a-falling-count-is-not-evidence.md             |  12 +
 .../task-lane-cache-emitter-preservation.test.ts   | 269 +++++++++++++++++++++
 .../core/src/task-store/archive-lifecycle-2.ts     |   3 +-
 packages/core/src/task-store/moves.ts              |   3 +-
 packages/core/src/task-store/task-artifacts-ops.ts |   3 +-
 packages/core/src/task-store/task-update.ts       |   3 +-
 packages/core/src/task-store/update-task-deps.ts   |   3 +-
 ...xecutor-archive-releases-active-session.test.ts |  80 ++++++
 packages/engine/src/executor.ts                    |   4 +-
 .../src/executor/executor-side-effect-hosts.ts     |   2 +-
 .../executor/is-backward-move-out-of-planning.ts   |   7 +-
 .../src/executor/task-executor-graph-facades.ts    |   2 +-
 .../engine/src/executor/task-executor-imports.ts   |   1 -
 .../engine/src/executor/wire-executor-lifecycle.ts |  18 +-
 .../check-inert-sync-lane-conversions.test.mjs     |  83 +++++--
 scripts/check-inert-sync-lane-conversions.mjs      |  19 +-
 scripts/lib/inert-sync-lane-baseline.json          |   6 +-
 18 files changed, 479 insertions(+), 46 deletions(-)

Fusion-Task-Id: FN-126

Fusion-Task-Lineage: 0c7a1a3a-9446-44f8-955d-df6c402dfd31

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:36:12 +00:00
Fusion Agent
10c399d01e FN-120: fix workspace review evidence and landing recovery
Harden workspace review evidence and automatic landing recovery across workflow execution and merge paths.

- Preserve per-repository review evidence and reroute recoverable workspace review failures.
- Improve workflow lifecycle validation, continuation handling, and automatic recovery for workspace landing.
- Add regression coverage and document the updated workspace behavior.

Files changed:
 .changeset/fn-120-workspace-review-landing.md      |   7 ++
 docs/architecture.md                               |   4 +
 ...e-empty-merge-boundary-finalization-livelock.md |   4 +
 docs/testing.md                                    |   4 +
 docs/workflow-steps.md                             |   4 +
 docs/workspaces.md                                 |   6 +
 .../__tests__/builtin-coding-workflow-ir.test.ts   |  11 +-
 ...workspace-worktrees-concurrent-merge.pg.test.ts |  20 +++
 packages/core/src/db/legacy-adoption.ts            |   4 +
 packages/core/src/store.ts                         |   5 +-
 .../task-store/async/async-workflow-workitems.ts   |  21 ++++
 packages/core/src/task-store/task-mutation-ops.ts  |  20 ++-
 .../src/task-store/workflow-workitems-ops-2.ts     |   6 +-
 .../workflows/builtin-coding-ideas-workflow-ir.ts  |   9 +-
 .../src/workflows/builtin-coding-workflow-ir.ts    |  20 ++-
 .../builtin-stepwise-coding-workflow-ir.ts         |  21 +++-
 ...tin-stepwise-final-review-coding-workflow-ir.ts |  13 +-
 .../src/workflows/workflow-lifecycle-validation.ts |  28 ++++-
 .../__tests__/builtin-workflows-lifecycle.test.ts  |   4 +
 .../engine/src/__tests__/project-engine.test.ts    |  79 ++++++++++++
 .../graph-node-missing-worktree-recovery.test.ts   |  32 ++++-
 .../src/__tests__/reviewer-workspace.test.ts       |   2 +
 .../src/__tests__/task-pipeline-smoke.test.ts      |  10 +-
 .../src/__tests__/workflow-task-runtime.test.ts    |  10 +-
 .../engine/src/__tests__/workspace-e2e.test.ts     |  29 +++++
 .../engine/src/__tests__/workspace-merger.test.ts  |   4 +-
 .../__tests__/workspace-review-evidence.test.ts    |  58 +++++++++
 packages/engine/src/execution/reviewer.ts          |   2 +
 .../create-authoritative-workflow-seams.ts         |  59 +++++----
 .../engine/src/executor/execute-workflow-graph.ts  |  29 ++++-
 packages/engine/src/executor/graph-failure-pure.ts |   6 +
 .../engine/src/executor/handle-graph-failure.ts    |  26 ++++
 ...-unusable-worktree-graph-failure-to-recovery.ts |  22 +++-
 .../engine/src/executor/run-graph-custom-node.ts   |   4 +-
 .../src/executor/workspace-review-per-repo.ts      |  55 +++++----
 packages/engine/src/merge/merger-ai.ts             | 137 ++++++++++-----------
 .../engine/src/merge/workspace-review-reroute.ts   |  52 ++++++++
 packages/engine/src/project-engine.ts              |  47 +++++++
 .../self-healing/auto-recover-worktree-session.ts  |   2 +-
 .../src/workflows/workflow-graph-executor.ts       |  28 ++++-
 .../engine/src/workflows/workflow-merge-nodes.ts   |   6 +-
 .../src/worktree/workspace-review-evidence.ts      | 110 +++++++++++++++++
 .../engine/src/worktree/worktree-acquisition.ts    |  24 +++-
 43 files changed, 874 insertions(+), 170 deletions(-)
Fusion-Task-Id: FN-120
Fusion-Task-Lineage: 61c36613-89bd-44ca-8676-de77662bf53e
Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:36:12 +00:00
Fusion Agent
2430ce69b0 FN-112: capture workspace merge evidence from task worktrees
Capture workspace merge evidence from immutable acquisition baselines to persisted task branches so real linked task worktrees land reviewed changes reliably.

- Compare review fingerprints and landing ranges against the persisted task branch rather than the live worktree HEAD.
- Add linked-task-worktree regression coverage for per-repository landing proof and exactly-once finalization.
- Document the regression and publish the workspace merge fix in a patch changeset.

Files changed:
 .../fn-112-workspace-task-worktree-evidence.md     |  7 ++++
 docs/architecture.md                               |  1 +
 ...e-empty-merge-boundary-finalization-livelock.md |  8 +++-
 .../engine/src/__tests__/_workspace-fixture.ts     | 15 ++++++++
 .../engine/src/__tests__/workspace-e2e.test.ts     | 31 ++++++++++++---
 .../__tests__/workspace-merger-scope-gates.test.ts |  2 +-
 .../engine/src/__tests__/workspace-merger.test.ts  | 45 +++++++++++++++++++++-
 packages/engine/src/merge/merger-ai.ts             | 29 ++++++++++++--
 8 files changed, 125 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-112

Fusion-Task-Lineage: 66e8498e-13f2-461b-ae38-bf750383115b

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-23 01:35:06 +00:00
Fusion Agent
c91e5ce42d FN-106: prevent workspace finalization livelock
Repair workspace merge-boundary finalization so empty repository sets cannot loop indefinitely.

- Track workspace merge readiness and durable per-repository obligations.
- Gate landing and recovery on scope, blockers, leases, and checkout ownership.
- Preserve remediation state, add recovery paths, documentation, and regression coverage.

Files changed:
 .../fn-106-workspace-finalization-livelock.md      |  7 ++
 docs/architecture.md                               |  6 ++
 ...e-empty-merge-boundary-finalization-livelock.md | 40 ++++++++++
 docs/workflow-steps.md                             |  4 +
 packages/cli/src/commands/__tests__/task.test.ts   |  2 +
 ...workspace-worktrees-concurrent-merge.pg.test.ts | 23 ++++++
 packages/core/src/store.ts                         |  9 ++-
 packages/core/src/task-store/task-mutation-ops.ts  | 49 +++++++++++-
 packages/core/src/task-store/task-update.ts        |  6 +-
 packages/core/src/types/task/task-core.ts          |  7 ++
 .../engine/src/__tests__/executor-test-helpers.ts  |  6 ++
 .../executor-workspace-main-checkout-guard.test.ts |  8 +-
 .../executor-workspace-session-cwd.test.ts         | 37 +++++++++
 .../engine/src/__tests__/project-engine.test.ts    | 14 +++-
 .../src/__tests__/reviewer-workspace.test.ts       | 72 ++++++++++++++++-
 .../__tests__/workspace-merge-readiness.test.ts    | 46 +++++++++++
 .../workspace-merger-idempotency.slow.test.ts      | 15 ++--
 .../src/__tests__/workspace-merger-lease.test.ts   |  4 +-
 .../workspace-root-worktree-routing.test.ts        | 47 +++++++++++
 .../create-authoritative-workflow-seams.ts         |  2 +
 .../engine/src/executor/create-task-done-tool.ts   | 15 ++++
 .../executor/ensure-graph-custom-node-worktree.ts  |  8 ++
 .../request-pre-merge-optional-step-fix.ts         | 49 +++++++++++-
 .../engine/src/executor/run-graph-custom-node.ts   | 24 ++++--
 packages/engine/src/executor/run-implementation.ts |  9 +++
 packages/engine/src/executor/send-task-back-for-fix.ts  |  4 +-
 .../src/executor/workspace-main-checkout-guard.ts  | 26 +++++-
 .../src/executor/workspace-review-remediation.ts   | 54 +++++++++++++
 .../src/executor/worktree-verify-invariants.ts     |  2 +-
 packages/engine/src/merge/merger-ai.ts             | 93 +++++++++++++++++-----
 .../engine/src/merge/workspace-merge-readiness.ts  | 64 +++++++++++++++
 packages/engine/src/project-engine.ts              | 37 +++++++--
 packages/engine/src/self-healing.ts                | 54 ++++++++++---
 .../engine/src/worktree/worktree-acquisition.ts   | 20 ++++-
 34 files changed, 787 insertions(+), 76 deletions(-)

Fusion-Task-Id: FN-106

Fusion-Task-Lineage: 70b5c13d-9e17-419d-90ac-7258697657ef

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-21 14:41:37 +00:00
Fusion Agent
e80fef3fe0 FN-040: fix chat source-link integrity and contrast
Harden chat source links across streaming providers while improving new-tab behavior and visual contrast.

- Preserve source-link metadata through streamed delta and event bridges.
- Open chat source links safely in new tabs across desktop and mobile surfaces.
- Improve source-link contrast and add regression coverage plus user-facing guidance.

Files changed:
 .changeset/fn-040-chat-source-links.md             |  7 +++
 docs/dashboard-guide.md                            |  3 +
 .../ui-bugs/chat-streamed-source-link-integrity.md | 53 ++++++++++++++++
 packages/dashboard/app/components/ChatView.css     | 24 ++++++++
 .../app/components/StandardChatSurface.tsx         |  8 ++-
 .../components/__tests__/ChatView.core.test.tsx    | 38 ++++++++++++
 .../components/__tests__/ChatView.mobile.test.tsx  | 70 ++++++++++++++++++++--
 .../__tests__/ChatView.sessions-rooms.test.tsx     | 49 +++++++++++++++
 ...andardChatSurface.nativeStructureEmbed.test.tsx | 52 +++++++++++++++-
 .../__tests__/TaskPlannerChatTab.test.tsx          | 48 +++++++++++++++
 .../engine/src/__tests__/streaming-delta.test.ts   | 36 +++++++++++
 packages/engine/src/execution/streaming-delta.ts   | 17 +++++-
 .../src/__tests__/event-bridge.test.ts             | 30 +++++++++-
 packages/pi-claude-cli/src/event-bridge.ts         | 14 +++--
 .../src/__tests__/event-bridge.test.ts             | 42 +++++++++++++
 .../fusion-plugin-acp-runtime/src/event-bridge.ts  |  8 ++-
 .../src/__tests__/provider.test.ts                 | 34 +++++++++++
 .../src/acp/event-bridge.ts                        |  8 ++-
 .../src/__tests__/event-bridge.test.ts             | 28 +++++++++
 .../src/event-bridge.ts                            | 14 +++--
 .../src/__tests__/provider.test.ts                 | 34 +++++++++++
 .../src/acp/event-bridge.ts                        |  8 ++-
 .../src/__tests__/runtime-adapter.test.ts          | 34 +++++++++++
 .../src/acp/event-bridge.ts                        |  8 ++-
 24 files changed, 642 insertions(+), 25 deletions(-)

Fusion-Task-Id: FN-040

Fusion-Task-Lineage: 364ad678-df3e-4fb2-b19c-29eb44d8a429

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:57:23 +00:00
Fusion Agent
561e0f4cd8 FN-015: remove legacy lane-columns CSS
Remove the retired lane compatibility selector while preserving live Board scrolling and overscroll behavior.

- Remove legacy .lane-columns styling from Lane.css.
- Update mobile Board regression fixtures and solution documentation for current workflow-column paths.
- Add a patch changeset documenting the internal cleanup.

Files changed:
 .changeset/fn-015-removal.md                       |  7 ++++
 ...-board-ios-horizontal-overscroll-containment.md | 32 +++++++++--------
 .../__tests__/board-mobile-column-swipe.test.ts    | 11 +++---
 .../__tests__/board-mobile-overscroll-containment.test.ts | 28 ++++++++-------
 packages/dashboard/app/components/Lane.css         | 41 +++-------------------
 5 files changed, 51 insertions(+), 68 deletions(-)

Fusion-Task-Id: FN-015

Fusion-Task-Lineage: 78128638-a319-4589-8cdd-a6497efe226f

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-20 03:55:38 +00:00
gsxdsm
179f08c2d4 FN-9158: recover Windows antivirus-blocked PostgreSQL payloads
Recover quarantined or truncated embedded PostgreSQL runtime files and explain Windows Defender remediation.

- Validate materialized payload inventory with v3 markers and repair mismatches atomically.
- Surface actionable error 4551 diagnostics through startup failures.
- Add regression coverage, operator documentation, and a patch changeset.

Files changed:
 ...-9158-windows-av-blocked-embedded-pg-payload.md |   7 +
 ...ndows-antivirus-blocks-embedded-postgres-dll.md |  27 +++
 docs/storage.md                                    |   4 +
 .../__tests__/postgres/embedded-lifecycle.test.ts  | 139 +++++++++++++-
 .../src/__tests__/postgres/startup-factory.test.ts |  19 ++
 packages/core/src/postgres/embedded-lifecycle.ts   | 208 ++++++++++++++++++++-
 packages/core/src/postgres/startup-factory.ts      |  30 +--
 7 files changed, 414 insertions(+), 20 deletions(-)

Fusion-Task-Id: FN-9158

Fusion-Task-Lineage: ec2c97d7-0797-49c1-b875-6b147ff26917

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 18:50:27 -07:00
gsxdsm
fb77eef7a9 FN-9150: Capture abandoned PostgreSQL timeout boundaries
Capture elapsed and join evidence for PostgreSQL test boundaries that Vitest abandons before settlement.

- emit unique boundary join keys, progress ladders, terminal records, and payload-free watchdog breaches
- classify ladder-only, breach, and unobservable lifecycle evidence in the loaded-failure census
- cover abandoned and superseded body windows and document the corrective campaign findings

Files changed:
 ...res-loaded-lane-unrelated-failure-population.md |  33 ++++++-
 docs/testing.md                                    |  14 ++-
 .../__test-utils__/pg-timeout-boundary-observer.ts | 108 ++++++++++++++++++---
 .../__tests__/pg-timeout-boundary-observer.test.ts |  98 ++++++++++++++++++-
 .../__tests__/pg-loaded-failure-census.test.mjs    |  30 ++++++
 scripts/pg-loaded-failure-census.mjs               |  71 ++++++++++++--
 6 files changed, 327 insertions(+), 27 deletions(-)

Fusion-Task-Id: FN-9150

Fusion-Task-Lineage: fc2e9f99-7739-4d86-99f4-713a78f53e57

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 10:10:39 -07:00
gsxdsm
a1977e052b FN-9149: Add PostgreSQL timeout-boundary diagnostics
Instrument the opt-in PostgreSQL test harness to attribute loaded-lane timeout failures without changing default behavior.

- Add bounded setup, body, and teardown watchdog probes with host, cluster, and template evidence.
- Wire observer records into the harness and loaded-failure census with explicit suppression and attribution handling.
- Cover observer inertness, boundary behavior, and census joins while documenting the 27-worker campaign findings.

Files changed:
 ...res-loaded-lane-unrelated-failure-population.md |  31 +-
 docs/testing.md                                    |  27 ++
 .../core/src/__test-utils__/pg-test-harness.ts     | 113 +++++-
 .../__test-utils__/pg-timeout-boundary-observer.ts | 451 +++++++++++++++++++++
 .../pg-test-harness-observer-inertness.test.ts     |  31 ++
 .../__tests__/pg-timeout-boundary-observer.test.ts | 177 ++++++++
 .../__tests__/pg-loaded-failure-census.test.mjs    |  31 ++
 scripts/pg-loaded-failure-census.mjs               | 101 ++++-
 8 files changed, 934 insertions(+), 28 deletions(-)

Fusion-Task-Id: FN-9149

Fusion-Task-Lineage: 4df4ee28-5369-41ae-bb0c-e7e9ae78d873

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 08:41:14 -07:00
gsxdsm
161edaa694 FN-9148: add PostgreSQL loaded-failure census
Add retained-log census tooling and evidence for PostgreSQL loaded-lane timeout investigations.

- Parse complete Vitest logs and optional diagnostics without opening PostgreSQL or running tests.
- Classify failing files, lifecycle positions, failure shapes, backend headroom, waits, and watchdog data.
- Cover high-failure, healthy, malformed-diagnostics, and truncated-log cases with fixtures.
- Document the reproduced population, unsupported remedies, and successor measurement requirements.

Files changed:
 ...res-loaded-lane-unrelated-failure-population.md |  80 ++++++++++
 docs/testing.md                                    |   8 +
 .../fixtures/pg-loaded-failure-census/high-run.txt |  77 +++++++++
 .../fixtures/pg-loaded-failure-census/high.jsonl   |   4 +
 .../fixtures/pg-loaded-failure-census/low-run.txt  |   4 +
 .../pg-loaded-failure-census/truncated-run.txt     |   2 +
 .../__tests__/pg-loaded-failure-census.test.mjs    |  65 ++++++++
 scripts/pg-loaded-failure-census.mjs               | 172 +++++++++++++++++++++
 8 files changed, 412 insertions(+)

Fusion-Task-Id: FN-9148

Fusion-Task-Lineage: c632a9d0-b823-4416-ab46-0d834e850007

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 06:24:01 -07:00
gsxdsm
687990c0a6 FN-9146: document PostgreSQL flake campaign evidence
Document the bounded investigation results for active core PostgreSQL suite-only flakes.

- Record per-lane outcomes and sampled cluster-capacity evidence for entries 1, 2, and 7.
- Clarify reproduced, unreproduced, and unattributed statuses without changing quarantine policy.
- Ratchet campaign completeness, ownership, and documentation-link coverage in the register tests.

Files changed:
 .../suite-only-flakes-observed-register.md         | 71 +++++++++++++++++-
 docs/testing.md                                    |  4 +
 scripts/__tests__/observed-flake-register.test.mjs | 85 ++++++++++++++++++++--
 3 files changed, 148 insertions(+), 12 deletions(-)

Fusion-Task-Id: FN-9146

Fusion-Task-Lineage: d5de3fac-48d6-4ee7-ae09-173007d234e5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 05:38:54 -07:00
gsxdsm
ed2cbd08a1 FN-9145: clarify active flake register states
Reorganize the suite-only flake register around its current decision state.

- Separate active observations, gate evictions, and archived closed records while preserving entry anchors.
- Mark entry 1 as an escalated second sighting and restore FN-9126/FN-9131, FN-9128, and FN-9127 ownership.
- Add regression checks for active counts, exact states and owners, and testing-guide anchors.

Files changed:
 .../suite-only-flakes-observed-register.md         | 189 +++++++++++++--------
 scripts/__tests__/observed-flake-register.test.mjs |  65 +++++++
 2 files changed, 181 insertions(+), 73 deletions(-)

Fusion-Task-Id: FN-9145

Fusion-Task-Lineage: 39b3292a-db48-4be4-878c-7d2b026abae3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-19 04:16:48 -07:00
ischindl
72877c8cf9 fix(RUFU-074): idle backoff + jitter for the task-deleted outbox consumer (#3471)
**Problem:** Each dashboard/engine project consumer polled
`task_deleted` outbox on a fixed 5s setInterval, so ~44 per-project
consumers thundered together on the same cadence — an idle DB query
storm and CPU hot-spot even when projects were paused/idle.

**Fix:** The outbox consumer reschedules itself from each poll outcome:
an idle poll (zero events) grows the next delay by
`TASK_DELETED_OUTBOX_BACKOFF_STEP_MS` toward `MAX_POLL_MS`, with ±20%
jitter so the consumers de-synchronize; a poll that delivered events
resets to the fast base. A paused/idle project drains its outbox and
backoff alone drops the DB load.

**Includes:** regression test (bounded jitter + idle growth),
performance changeset, solution doc, deploy handoff script.

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

- **Performance**
- Reduced unnecessary idle polling by gradually increasing the polling
interval, up to 60 seconds, with bounded timing variation.
- Restored the faster 5-second polling cadence when new events, waits,
or transient errors occur.
- Preserved event ordering, delivery guarantees, acknowledgements, and
independent behavior across concurrent consumers.

- **Documentation**
- Added guidance on polling behavior, deployment verification, and
monitoring targets.

- **Tests**
- Added coverage for backoff growth, jitter limits, event bursts,
concurrent consumers, error handling, retries, and clean shutdown.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-18 22:11:47 -07:00
gsxdsm
b18c9d7594 FN-9144: Preserve test velocity measurement verdicts
Make test-velocity investigation notes durable across report regeneration and concurrent history updates.

- add idempotent note targeting for historical measurement entries
- serialize history mutations with bounded stale-lock recovery
- render all annotated cycles and record the W33 gate variance verdict
- document the generated-report workflow and cover retention/concurrency behavior

Files changed:
 .../merge-gate-w33-walltime-regression.md          |  15 ++
 docs/test-velocity-baseline.md                     |  12 ++
 docs/testing.md                                    |   2 +
 scripts/__tests__/test-velocity-baseline.test.mjs  | 153 +++++++++++++-
 scripts/test-velocity-baseline.mjs                 | 221 +++++++++++++++------
 scripts/test-velocity-history.json                 |   6 +
 6 files changed, 349 insertions(+), 60 deletions(-)

Fusion-Task-Id: FN-9144

Fusion-Task-Lineage: e3869e40-2cbc-4e5b-844e-9091da96b652

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-18 08:08:24 -07:00
ischindl
0540686599 fix(RUFU-073): thread a per-tick task workflow-selection cache through scheduler reads (#3470)
**Problem:** Scheduler was re-reading each task's
`task_workflow_selection` once per park-resolution (sweep, hold-release,
moved, unpause/wake), causing a nonstop PostgreSQL query storm (~232
idx_scan/s) on idle polling — a major engine CPU hot-spot.

**Fix:** Memoize the workflow selection per scheduler tick/event —
thread a shared, per-event selection cache through
`resolveWorkflowIrForTask` and all park-resolution handlers, then throw
it away. Each task resolves its parked columns with at most one read of
`task_workflow_selection` per tick. A selection write is always observed
on the next event's fresh cache (never a global/infinite LRU).

**Includes:** regression test asserting the once-per-tick read
invariant, performance changeset + per-tick-cache solution doc,
deploy+verify handoff script, and the parallel quarantine-ledger merge
(origin FN-9125 + RUFU-072 OOM entries both retained).

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

* **Performance Improvements**
* Reduced repeated workflow-selection reads during scheduler ticks and
related event processing.
* Improved scheduler and health API responsiveness through per-operation
caching and read deduplication.
* Preserved existing behavior, including retry handling for failed reads
and synchronous data-store support.

* **Documentation**
* Added architectural guidance covering workflow-selection performance,
caching behavior, and verification criteria.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-08-18 00:10:46 -07:00
gsxdsm
2b99b365de FN-9141: rescue plugin-runner tests and enforce quarantine lockstep
Rescue the plugin-runner suite before deletion while making quarantine records mechanically consistent.

- preserve logger assertions across worker-reused mock cleanup with a stable hoisted logger
- remove the rescued suite from the quarantine ledger and Vitest exclusion
- enforce ledger-to-exclude lockstep and cover missing or dangling quarantine entries
- document the reproduction evidence, rescue disposition, and strict checker behavior

Files changed:
 .../suite-only-flakes-observed-register.md         |  14 +-
 docs/testing.md                                    |  17 +-
 .../engine/src/__tests__/plugin-runner.test.ts     |  37 ++--
 packages/engine/vitest.config.ts                   |  14 +-
 scripts/__tests__/check-quarantine-ledger.test.mjs | 217 +++++++++---------
 scripts/__tests__/ci-test-shard-timings.test.mjs   |   5 +-
 scripts/check-quarantine-ledger.mjs                | 245 +++++++++++++--------
 scripts/lib/test-quarantine.json                   |  10 +-
 8 files changed, 314 insertions(+), 245 deletions(-)

Fusion-Task-Id: FN-9141

Fusion-Task-Lineage: 5b0549bf-3cc6-495e-bf99-a30a2dffb029

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-17 05:25:17 -07:00
gsxdsm
6d7b4a3ac3 FN-9140: make Vitest timeout ownership surveys deterministic
Replace ambiguous setup-boundary observations with calibrated, repeatable timeout ownership evidence.

- record fixture lifecycle events in an append-only JSONL ledger with process-safe ordering
- classify four timeout-budget arms across repeated isolate-mode cells and fail closed on incomplete evidence
- expand connectionless unit coverage and document the terminal insufficient-data survey result

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |   2 +
 .../vitest-setup-boundary-timeout-ownership.md     |  37 +++
 docs/testing.md                                    |   2 +-
 scripts/__tests__/pg-setup-boundary-probe.test.mjs | 195 ++++++++----
 scripts/pg-setup-boundary-probe.mjs                | 341 ++++++++++++---------
 5 files changed, 371 insertions(+), 206 deletions(-)

Fusion-Task-Id: FN-9140

Fusion-Task-Lineage: 9c6970b8-af80-400a-b2b2-49718d4fe87f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 22:47:53 -07:00
gsxdsm
2c3a47368f FN-9136: Characterize PostgreSQL fork database reuse
Characterize safe per-fork PostgreSQL database reuse while documenting why the production experiment remains reverted.

- add a bounded pool primitive with reset, verification, discard, and ownership fencing
- cover recycling, poison handling, capacity, and reclaim namespace behavior
- align PostgreSQL campaign documentation with the dead-fork leak rejection

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |   4 +-
 .../suite-only-flakes-observed-register.md         |   4 +-
 docs/testing.md                                    |   4 +-
 .../core/src/__test-utils__/pg-fork-db-pool.ts     | 184 +++++++++++++++++++++
 .../__tests__/pg-fork-db-pool-ownership.test.ts    |  36 ++++
 .../core/src/__tests__/pg-fork-db-pool.test.ts     |  60 +++++++
 6 files changed, 287 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9136

Fusion-Task-Lineage: 9e14e0eb-d957-4207-977e-2d913e78750f

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 22:06:38 -07:00
gsxdsm
1a3e68de5d FN-9139: add bounded PostgreSQL pre-admission measurement
Establish an inert PostgreSQL setup signal and repeatable evidence tooling without changing harness behavior.

- add explicit setup participation semantics and inertness coverage
- survey Vitest setup boundaries with isolated report-only fixtures
- bound interleaved campaigns by process group and campaign deadline
- reject missing backend samples and enable candidate diagnostics
- document the rejected boundary result and successor protocol

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |  15 ++
 docs/testing.md                                    |  10 ++
 packages/core/package.json                         |   2 +-
 .../src/__test-utils__/pg-setup-participation.ts   |  22 +++
 .../src/__tests__/pg-setup-participation.test.ts   |  21 +++
 .../__tests__/vitest-setup-pg-inertness.test.ts    |  10 ++
 packages/core/vitest.pg.config.ts                  |  10 ++
 .../__tests__/pg-preadmission-campaign.test.mjs    |  63 +++++++
 scripts/__tests__/pg-setup-boundary-probe.test.mjs |  92 ++++++++++
 scripts/pg-preadmission-campaign.mjs               | 194 +++++++++++++++++++++
 scripts/pg-setup-boundary-probe.mjs                | 182 +++++++++++++++++++
 11 files changed, 620 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9139

Fusion-Task-Lineage: 2cf8ccbf-37f9-4fdc-8e8f-326df823e1cd

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 21:09:58 -07:00
gsxdsm
8bb56a2185 FN-9134: add drift-resistant PostgreSQL DDL lane metric
Add a report-only acceptance metric and terminal evidence for PostgreSQL DDL structural experiments.

- require seven ordered control/candidate pairs with green Vitest summaries and zero leaked databases
- reject missing tests, failed summaries, nonzero exits, and unhandled runner errors
- document the no-improvement campaign result and retain the next candidate direction
- cover timing statistics, ordering, leak rejection, and runner-log validation

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |   8 ++
 .../suite-only-flakes-observed-register.md         |   2 +-
 docs/testing.md                                    |  24 ++++
 scripts/__tests__/pg-ddl-lane-metric.test.mjs      |  62 +++++++++
 scripts/pg-ddl-lane-metric.mjs                     | 139 +++++++++++++++++++++
 5 files changed, 234 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9134

Fusion-Task-Lineage: 3466ebf8-7125-475b-9574-6c4c92198bb3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 20:17:12 -07:00
gsxdsm
ae507afc37 FN-9131: Add PostgreSQL harness budget characterization
Characterize cluster-shared PostgreSQL connection admission while keeping regressive harness wiring disabled.

- add advisory-lock slot budgeting, bootstrap gating, and local allocation accounting
- cover budget arithmetic, queueing, degradation, and PostgreSQL lock behavior
- document loaded-lane failures and the terminal-negative lifecycle boundary
- clarify that the active harness neither admits nor clamps against the experimental budget

Files changed:
 .../test-failures/pg-harness-connection-budget.md  |  21 +
 .../suite-only-flakes-observed-register.md         |   2 +
 docs/testing.md                                    |   6 +
 .../__tests__/pg-connection-budget.test.ts         | 146 ++++++
 .../src/__test-utils__/pg-connection-budget.ts     | 492 +++++++++++++++++++++
 .../core/src/__test-utils__/pg-test-harness.ts     |   8 +
 .../postgres/pg-connection-budget.pg.test.ts       |  36 ++
 7 files changed, 711 insertions(+)

Fusion-Task-Id: FN-9131

Fusion-Task-Lineage: c83611ad-95f9-44ef-a0fd-1f182a26725d

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 19:29:05 -07:00
gsxdsm
c709ed06d9 FN-9135: retain plugin runner quarantine through deadline
Preserve the quarantined plugin-runner coverage while recording the inconclusive reproduction campaign.

- Record two loaded-suite runs at each of 2, 6, and 8 workers.
- Keep all 82 plugin-runner tests, the ledger entry, and the default-lane exclusion through 2026-08-30.
- Clarify that opt-in strict checks do not block normal PR lanes.

Files changed:
 .../test-failures/suite-only-flakes-observed-register.md    | 13 ++++++++++++-
 docs/testing.md                                             |  3 +++
 2 files changed, 15 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9135

Fusion-Task-Lineage: 239425e5-7393-4b8a-a114-0a14f0065847

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 17:38:53 -07:00
gsxdsm
1d7dd3e7b8 FN-9133: Use bounded PostgreSQL DDL for reliability fixtures
Reliability fixtures now manage PostgreSQL databases through owned, deadline-bounded maintenance connections.

- Replace psql child-process DDL with postgres.js maintenance clients and forced cleanup.
- Remove redundant pre-create drops and preserve idempotent teardown behavior.
- Add a live-connection cleanup contract test and document audit measurements and policy.

Files changed:
 .../postgres-reliability-helper-ddl-audit.md       | 48 +++++++++++
 docs/testing.md                                    |  2 +-
 packages/engine/package.json                       |  5 +-
 .../_helpers-pg-ddl-contract.pg.test.ts            | 66 +++++++++++++++
 .../__tests__/reliability-interactions/_helpers.ts | 93 +++++++++++++---------
 pnpm-lock.yaml                                     |  3 +
 6 files changed, 176 insertions(+), 41 deletions(-)

Fusion-Task-Id: FN-9133

Fusion-Task-Lineage: 5a7f511d-abb4-4468-a97a-04331f60d245

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 16:11:21 -07:00
gsxdsm
2160f7500c FN-9132: order approval audits by lifecycle on timestamp ties
Ensure approval audit histories preserve lifecycle chronology when events share a timestamp.

- rank tied audit events by the declared approval lifecycle before audit ID
- cover tied and distinct timestamps through module and public store surfaces
- document the diagnosed satellite assertion and add a patch changeset

Files changed:
 .changeset/fn-9132-approval-audit-order.md         |  7 +++
 .../suite-only-flakes-observed-register.md         | 27 +++++++++++
 ...oval-request-audit-project-isolation.pg.test.ts |  2 +-
 .../postgres/approval-request-lifecycle.pg.test.ts | 53 +++++++++++++++++++++-
 .../async-stores/async-approval-request-store.ts   | 17 +++++--
 5 files changed, 100 insertions(+), 6 deletions(-)

Fusion-Task-Id: FN-9132

Fusion-Task-Lineage: 2f49e896-69bf-48c8-b813-4b1b2b72fc65

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 16:04:18 -07:00
gsxdsm
a453245715 FN-9130: Add guarded PostgreSQL DDL admission infrastructure
Document and test PostgreSQL DDL admission experiments while preserving the direct harness after measured regressions.

- add advisory-slot admission with local slot accounting, degradation telemetry, and fail-closed reentrancy
- cover cross-fork bounds, session loss, timeouts, spawned nested work, and cleanup invariants
- make concurrent lifecycle coverage settle all creates and clean up every successful database in finally
- record loaded-core measurements and retain the existing PostgreSQL worker cap

Files changed:
 .../test-failures/postgres-ddl-admission-bound.md  |  34 ++
 .../suite-only-flakes-observed-register.md         |   2 +-
 docs/testing.md                                    |   8 +
 .../core/src/__test-utils__/pg-ddl-admission.ts    | 351 +++++++++++++++++++++
 .../core/src/__test-utils__/pg-test-harness.ts     |  44 ++-
 .../core/src/__tests__/pg-ddl-admission.test.ts    | 294 +++++++++++++++++
 .../postgres/pg-harness-ddl-concurrency.pg.test.ts |  56 ++++
 packages/core/vitest.pg.config.ts                  |   5 +
 8 files changed, 778 insertions(+), 16 deletions(-)

Fusion-Task-Id: FN-9130

Fusion-Task-Lineage: e28777cd-cd7c-4598-9db6-c4622cb9fa33

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 15:57:36 -07:00
gsxdsm
b31be1ba7c FN-9126: Record project-identity flake reproduction
Document the second sighting of the project-identity PostgreSQL timeout and hand off structural diagnosis.

- Record the sterile 27-worker reproduction against the integration SHA
- Preserve pass, failure, and skip counters for both PostgreSQL-directory runs
- Mark quarantine as policy-forbidden and assign root-cause follow-up to FN-9131

Files changed:
 .../solutions/test-failures/suite-only-flakes-observed-register.md | 7 +++++++
 1 file changed, 7 insertions(+)

Fusion-Task-Id: FN-9126

Fusion-Task-Lineage: 9e31b00f-268b-46fa-af7a-58973c93d8fc

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 14:07:57 -07:00
gsxdsm
3c235ce275 FN-9129: fence revision attribution assertions by identity
Make settings revision attribution tests select only immutable revisions owned by each test.

- Resolve reset-ordering failures by querying revision IDs from unique targets and payloads.
- Prove late background system writes cannot contaminate actor assertions.
- Document the loaded-lane diagnosis, evidence, and remediation.

Files changed:
 .../suite-only-flakes-observed-register.md         |  26 ++++++
 .../settings-revision-attribution.test.ts          | 104 ++++++++++++++++-----
 2 files changed, 107 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-9129

Fusion-Task-Lineage: ae336ed2-0870-400c-9599-37adb588e283

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 13:47:12 -07:00
gsxdsm
1c9e4dfccd FN-9127: instrument PostgreSQL teardown diagnostics
Add opt-in evidence capture for loaded PostgreSQL teardown stalls without changing teardown behavior.

- Add bounded phase and hook watchdogs with capped pg_stat_activity snapshots.
- Instrument the shared PostgreSQL test harness and cover diagnostic behavior with focused tests.
- Document the diagnostic workflow, measured flake campaign, and corrected mission-store gate scope.

Files changed:
 .../suite-only-flakes-observed-register.md         |  12 ++
 docs/testing.md                                    |  19 ++
 .../src/__test-utils__/pg-teardown-diagnostics.ts  | 237 +++++++++++++++++++++
 .../core/src/__test-utils__/pg-test-harness.ts     | 120 ++++++++---
 .../src/__tests__/pg-teardown-diagnostics.test.ts  | 162 ++++++++++++++
 .../__tests__/postgres/mission-store.pg.test.ts    |   8 +-
 6 files changed, 526 insertions(+), 32 deletions(-)

Fusion-Task-Id: FN-9127
Fusion-Task-Lineage: 2488b7c0-f12f-4560-9a99-41aaca9d1526
Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 12:59:23 -07:00
gsxdsm
5e5422de6e FN-9128: isolate schema-applier PostgreSQL fixtures
Use shared PostgreSQL harness fixtures to reduce repeated schema DDL while preserving migration coverage.

- replace private database lifecycle helpers with shared empty and baselined fixtures
- add regression coverage for fixture-state selection and idempotent schema application
- document PostgreSQL bootstrap guidance and the resolved flake investigation

Files changed:
 .../suite-only-flakes-observed-register.md         |  13 +-
 docs/testing.md                                    |   3 +
 .../postgres/schema-applier-isolation.test.ts      |  54 +++++++
 .../src/__tests__/postgres/schema-applier.test.ts  | 160 +++++++--------------
 4 files changed, 119 insertions(+), 111 deletions(-)

Fusion-Task-Id: FN-9128

Fusion-Task-Lineage: 036c9011-8973-4211-a77a-42bf0eb9fa5e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 12:27:35 -07:00
gsxdsm
beb8ae67db FN-9125: document flake findings and quarantine plugin runner
Classify the suite-only failures by actual PostgreSQL dependency and preserve unresolved evidence for follow-up.

- Record non-reproduction results and assign PostgreSQL investigations to focused follow-up tasks.
- Quarantine the independent in-memory plugin runner test under the deletion ratchet.
- Document evidence requirements for future PostgreSQL flake diagnosis.

Files changed:
 .../suite-only-flakes-observed-register.md         | 32 ++++++++++++++++++++--
 docs/testing.md                                    |  4 +++
 packages/engine/vitest.config.ts                   | 10 +++++++
 scripts/lib/test-quarantine.json                   |  8 +++++-
 4 files changed, 51 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-9125

Fusion-Task-Lineage: 1dc80163-a0dc-4241-bab1-75a2cafb9abe

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 11:46:39 -07:00
gsxdsm
53acaf96c3 FN-9123: Repair script test contract drift
Repair script-test contracts to match the current repository policies and live workflow coverage.

- Align static-gate and pretest mirrors with authoritative validator chains.
- Update the merger-rule floor and parameterized flake registration.
- Repoint workflow reliability evidence to the surviving dispatch test.

Files changed:
 .../test-failures/suite-only-flakes-observed-register.md       |  4 +++-
 scripts/__tests__/agents-md-invariants.test.mjs                | 10 ++++++++--
 scripts/__tests__/engine-vitest-gate-policy.test.mjs           |  6 ++++++
 scripts/__tests__/run-static-gate-checks.test.mjs              |  7 +++++++
 scripts/__tests__/verify-fast.test.mjs                         |  6 ++++++
 scripts/lib/workflow-reliability-release-check.json            |  4 ++--
 6 files changed, 32 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9123

Fusion-Task-Lineage: 1a3dad24-69e3-423e-a159-56fd3f1085a3

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 04:05:45 -07:00
gsxdsm
fe910fcce7 FN-9122: align merge gate timing and policy baselines
Re-establish a trustworthy W33 merge-gate timing baseline without weakening blocking coverage.

- Document the controlled W33 re-measurement and future regression protocol.
- Align static-validator test ledgers with all 15 canonical gate checks.
- Correct gate composition, engine-core inventory, and bundle metrics in testing guidance.

Files changed:
 .../merge-gate-w33-walltime-regression.md          | 82 ++++++++++++++++++++++
 docs/testing.md                                    | 12 ++--
 .../__tests__/engine-vitest-gate-policy.test.mjs   | 12 ++++
 scripts/__tests__/run-static-gate-checks.test.mjs  |  2 +
 scripts/__tests__/verify-fast.test.mjs             |  8 +++
 5 files changed, 111 insertions(+), 5 deletions(-)

Fusion-Task-Id: FN-9122

Fusion-Task-Lineage: 47ace0d7-902d-4ea5-848d-3d2386867c42

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 03:49:28 -07:00
gsxdsm
111c6c96cc FN-9117: Preserve Planning Mode answers across session hydration
Keep visible Planning Mode controls bound to the current turn during asynchronous refreshes.

- preserve active question and plan-review workspaces during same-session hydration
- submit from live session state and retain dirty answers across response identity changes
- add desktop and mobile regression coverage for deferred hydration and stale Stop polling
- document the ownership race and add a patch changeset

Files changed:
 .changeset/fn-9117-planning-turn-ownership.md      |   7 +
 .../suite-only-flakes-observed-register.md         |  24 ++++
 .../dashboard/app/components/PlanningModeModal.tsx | 141 ++++++++++++---------
 .../PlanningModeModal.planning-flow.test.tsx       | 132 +++++++++++++++++++
 .../PlanningModeModal.ui-interactions.test.tsx     |  20 +++
 5 files changed, 265 insertions(+), 59 deletions(-)

Fusion-Task-Id: FN-9117

Fusion-Task-Lineage: 18d63f63-b532-49eb-a6d1-241e31c5b2c7

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 02:26:42 -07:00
gsxdsm
3272affbb3 FN-9120: Fence Create Room agent roster loads
Keep Create Room picker state accurate across overlapping agent roster requests.

- Track explicit idle, loading, loaded, and failed picker phases.
- Ignore stale close, reopen, project-change, and unmount request completions.
- Reconcile selected members and cover ordering, failure, empty, duplicate, desktop, and mobile states.
- Document the loaded-lane flake investigation and add a patch changeset.

Files changed:
 .changeset/fn-9120-create-room-picker.md           |   7 ++
 .../suite-only-flakes-observed-register.md         |  17 +++
 .../dashboard/app/components/CreateRoomModal.tsx   |  50 ++++++--
 .../components/__tests__/CreateRoomModal.test.tsx  | 126 ++++++++++++++++-----
 4 files changed, 165 insertions(+), 35 deletions(-)

Fusion-Task-Id: FN-9120

Fusion-Task-Lineage: 5c9ff011-7653-40ab-a7c1-e3464ca3eaf5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 01:50:38 -07:00
gsxdsm
7527d2651f FN-9116: fence planning reconciliation by turn ownership
Prevent stale Planning Mode snapshots and recovery callbacks from replacing a newer interview turn.

- track session-load and turn epochs across response reconciliation, polling, streaming, and automatic retry
- fence loading-poll fetches at launch so accepted SSE questions and newer responses retain ownership
- add desktop and mobile race-ordering coverage and document the resolved suite-only flake
- publish a patch changeset for the operator-visible recovery fix

Files changed:
 .changeset/fn-9116-planning-reconciliation.md      |   7 +
 .../suite-only-flakes-observed-register.md         |  19 +
 .../dashboard/app/components/PlanningModeModal.tsx | 109 ++++-
 .../PlanningModeModal.planning-flow.test.tsx       | 502 ++++++++++++++++++++-
 4 files changed, 614 insertions(+), 23 deletions(-)

Fusion-Task-Id: FN-9116

Fusion-Task-Lineage: b861176e-9104-4caf-8b6c-e645972aa5f6

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-16 00:59:48 -07:00
gsxdsm
c59afeb15f docs: record PlanningModeModal duplicate-response flake sighting (register entry 8)
One clean solo-lane sighting of the parametrized duplicate-response
reconciliation test (mobile row; the desktop row failed once earlier
under a contaminated concurrent run, recorded as context). Third
distinct flaky test in this suite plus one prior FN-8936 stabilization
— the AGENTS.md repeated-quarantine rule calls that a subsystem
product-race smell, so the product-path audit is filed as FN-9116
rather than stabilizing a fourth time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 22:52:18 -07:00
gsxdsm
920bf8b022 FN-9105: document boot-smoke anomaly remeasurement
Confirm the W33 spike as cold-start variance and preserve a repeatable diagnosis protocol.

- Record five sequential phase-timed samples and the 20.5-second median threshold.
- Link the controlled remeasurement protocol from the testing guide.
- Explain the timing snapshot handoff and why incomplete CI artifacts were not published.
- Preserve the no-appeasement requirement beside boot-smoke phase timing.

Files changed:
 .../boot-smoke-w33-walltime-anomaly.md             | 100 +++++++++++++++++++++
 docs/testing.md                                    |   2 +-
 scripts/boot-smoke.mjs                             |   7 ++
 3 files changed, 108 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-9105

Fusion-Task-Lineage: 6956b037-db0f-4560-bb04-136080a975b5

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 16:59:37 -07:00
gsxdsm
6a2de64381 fix: normalize Anthropic storage ids at the ModelRuntime.login choke point
Third incident of the same class (#1857/FN-7391, FN-9101, GitHub #3462):
Fusion's Anthropic auth-card/storage ids (anthropic-subscription,
anthropic-api-key) leaking into pi, which only registers the execution
provider 'anthropic'. FusionAuthStorage.login is the single seam that hands
a provider id to ModelRuntime.login; it now normalizes via
toExecutionModelProviderId so a future caller bug degrades to a correct
upstream anthropic login instead of a hard 'Unknown provider' failure, with
a regression test pinning the seam. The invariant, incident history, and
guard inventory are captured in
docs/solutions/integration-issues/anthropic-storage-ids-are-never-pi-provider-ids.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-15 14:52:38 -07:00
gsxdsm
284feeaf11 FN-9092: prevent model menus from dismissing host dialogs
Keep portaled model-menu interaction from propagating to host dialog dismissal.

- Mark model-menu portal surfaces and stop their pointer events from reaching dialog backdrops.
- Apply the dismissal guard across agent, chat, floating-window, and model-selection dialogs.
- Close enabled overlays on valid touch taps while suppressing duplicate compatibility mouse closes.
- Add desktop and mobile regression coverage for portal-host dismissal behavior.

Files changed:
 .../fn-9092-model-filter-dialog-dismissal.md       |   7 +
 .../ui-bugs/portaled-model-menu-host-dismissal.md  |  19 +++
 packages/dashboard/app/components/AgentsView.tsx   |   6 +
 .../app/components/ChatThinkingLevelControl.tsx    |  17 ++-
 packages/dashboard/app/components/ChatView.tsx     |  38 +++--
 .../app/components/CustomModelDropdown.tsx         |  13 +-
 .../dashboard/app/components/FloatingWindow.tsx    |  17 +--
 .../app/components/ModelSelectionModal.tsx         |  17 +--
 .../dashboard/app/components/NewAgentDialog.tsx    |  12 +-
 .../dashboard/app/components/QuickEntryBox.tsx     |   5 +-
 .../ChatThinkingLevelControl.portal.test.tsx       |   9 ++
 .../__tests__/CustomModelDropdown.test.tsx         |  24 ++-
 .../__tests__/ModelSelectionModal.test.tsx         |   3 +-
 .../NewAgentDialog.portal-dismissal.test.tsx       |  77 ++++++++++
 .../components/__tests__/NewAgentDialog.test.tsx   |  11 ++
 .../model-menu-filter-host-dismissal.test.tsx      | 163 +++++++++++++++++++++
 .../app/hooks/__tests__/useOverlayDismiss.test.tsx |   7 +-
 packages/dashboard/app/hooks/useOverlayDismiss.ts  |  26 +++-
 .../app/utils/__tests__/portalSurfaces.test.ts     |  31 ++++
 packages/dashboard/app/utils/portalSurfaces.ts     |  31 ++++
 20 files changed, 469 insertions(+), 64 deletions(-)

Fusion-Task-Id: FN-9092

Fusion-Task-Lineage: a0d0b84d-2efe-4a67-9485-77c08f7cc57e

Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
2026-08-15 06:42:39 -07:00