Commit Graph

2809 Commits

Author SHA1 Message Date
gsxdsm
207d2b899a test: remove real-time waits from slow test files (FN-5048)
Replace real wall-clock waits and per-test rebuilds in the slowest test files
with deterministic seams. No assertions weakened, no timeouts widened, no
retries added — anti-pattern removal only.

- insights-routes.test.ts: boot the server + store ONCE in beforeAll (was a full
  createServer + TaskStore.init per test x24), reset insight tables per test for
  isolation, drive the sweeper via fake timers. Test-execution time ~3.7s -> ~0.8s.
- db.test.ts: convert the fixed 150ms write-lock hold to manual stdin signal-
  release; keeps the real OS-lock contention under test, removes 2x150ms dead
  wait. Fixed a real EPIPE on redundant release. 152 pass, non-flaky over 8 runs.
- mission-store.test.ts / agent-store.test.ts: replace real setTimeout sleeps
  used only to force distinct timestamps with a controlled clock (vi.setSystemTime
  / injected renewedAt). agent-store assertions strengthened to pin exact values.
- in-process-runtime.test.ts: fake the one real 25ms sleep, drop its inflated
  30s per-test timeout.

Honest note: the timestamp-sleep removals are small absolute wins (the headline
per-file durations were full-suite shard contention, not in-file dead time) but
eliminate the FN-5048 real-wait anti-pattern. workflow-routes.test.ts was
evaluated for splitting and deliberately NOT split — measured A/B showed the
split regressed wall-clock (the file is import/transform-bound, already amortized
by installInMemoryDbSnapshot), so splitting only multiplies fixed import cost.

Verified: core 612/612, dashboard 24/24, engine 78/78; typecheck + eslint clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 22:08:41 -07:00
gsxdsm
b6b5583f01 FN-7039: apply execution-lane models to workflow steps
Route workflow and automation prompt steps through the execution-lane model hierarchy.

- Use executor session model resolution for task workflow prompt steps while preserving per-step overrides.
- Use execution settings model resolution for scheduled and manual AI-prompt automation runs.
- Document the model precedence and add regression coverage plus a patch changeset.

Files changed:
 .changeset/fn-7039-workflow-execution-model.md     |   7 +
 docs/settings-reference.md                         |   2 +
 .../core/src/__tests__/model-resolution.test.ts    |  12 ++
 packages/dashboard/src/routes.ts                   |   6 +-
 .../engine/src/__tests__/executor-test-helpers.ts  |  11 +-
 .../__tests__/executor-workflow-step-model.test.ts | 234 +++++++++++++++++++++
 packages/engine/src/cron-runner.ts                 |   7 +-
 packages/engine/src/executor.ts                    |  23 +-
 8 files changed, 285 insertions(+), 17 deletions(-)

Fusion-Task-Id: FN-7039

Fusion-Task-Lineage: f27c4be8-7793-4212-b9ee-679f50193406
2026-06-25 21:05:33 -07:00
gsxdsm
b663eebcb3 FN-7035: split oversized test suites
Split oversized ChatView and notifier suites while updating the line-count baseline.

- Move ChatView core contract and interaction coverage into focused sibling test files.
- Move notifier runtime coverage into its own suite and share setup through a test harness.
- Document the line-count guard decision and ratchet baseline entries for existing growth.

Files changed:
 .../__tests__/ChatView.core-contracts.test.tsx     |  623 ++++++++
 .../__tests__/ChatView.core-interactions.test.tsx  | 1261 +++++++++++++++
 .../components/__tests__/ChatView.core.test.tsx    | 1652 +-------------------
 .../engine/src/__tests__/notifier.runtime.test.ts  |  810 ++++++++++
 .../engine/src/__tests__/notifier.test-harness.ts  |   71 +
 packages/engine/src/__tests__/notifier.test.ts     |  847 +---------
 scripts/check-file-line-count.mjs                  |    3 +
 scripts/line-count-baseline.json                   |   12 +-
 8 files changed, 2778 insertions(+), 2501 deletions(-)

Fusion-Task-Id: FN-7035
Fusion-Task-Lineage: 14cebb57-925b-41c7-9c8b-472f34b76fe2
2026-06-25 20:50:30 -07:00
gsxdsm
c0958bfd4f FN-7029: split AI merge prompts and worktree helpers
Split the clean-room AI merger into smaller focused modules while preserving its public behavior.

- Extract prompt builders and review verdict parsing into merger-ai-prompts.
- Extract AI merge worktree lifecycle and cleanup helpers into merger-ai-worktree.
- Re-export the extracted APIs from merger-ai and cover prompt/verdict behavior with tests.
- Remove the merger-ai line-count baseline now that the file is under the guardrail.

Files changed:
 .../engine/src/__tests__/merger-ai-prompts.test.ts |  86 ++++
 packages/engine/src/merger-ai-prompts.ts           | 312 ++++++++++++
 packages/engine/src/merger-ai-worktree.ts          | 287 +++++++++++
 packages/engine/src/merger-ai.ts                   | 555 ++-------------------
 scripts/line-count-baseline.json                   |   1 -
 5 files changed, 723 insertions(+), 518 deletions(-)

Fusion-Task-Id: FN-7029

Fusion-Task-Lineage: 59adc31f-7386-4008-b74f-8fb9bbae078a
2026-06-25 20:12:20 -07:00
gsxdsm
f5b588cab6 FN-7018: retry transient ntfy notification failures
Ntfy sends now retry bounded transient failures before giving up.

- Add per-attempt timeouts and bounded retries for ntfy network, timeout, 5xx, and 429 failures.\n- Preserve best-effort abort behavior while retrying only retryable publish failures.\n- Cover retry, timeout, abort, payload, and non-retryable failure behavior in notifier tests.\n- Add a patch changeset for the published Fusion package.\n\nFiles changed:\n .changeset/fn-7018-ntfy-retry.md               |   7 +\n packages/engine/src/__tests__/notifier.test.ts | 259 ++++++++++++++++++++++++-\n packages/engine/src/notifier.ts                | 173 +++++++++++++----\n 3 files changed, 399 insertions(+), 40 deletions(-)

Fusion-Task-Id: FN-7018

Fusion-Task-Lineage: 0d0b7313-532a-4583-8bb7-67fc4b2e98bf
2026-06-25 19:35:05 -07:00
gsxdsm
55b9c548ad test: quarantine 3 failing CI full-suite tests (#1775)
## Summary

Quarantine 3 test files consistently failing on the non-blocking
full-suite CI on `main`. Per the AGENTS.md deletion-ratchet policy, each
is added to `scripts/lib/test-quarantine.json` with a matching exclude
in its package's vitest config. Tests will be deleted after 14 days
unless rescued with a root-cause fix.

## Quarantined Tests

| File | Shard | Failure | CI Run |
|------|-------|---------|--------|
|
`engine/src/__tests__/self-healing-fn-5488-fast-path-regressions.test.ts`
| 1/4 | `expected +0 to be 1` + `parseFileScopeFromPrompt is not a
function` | [run
28206337202](https://github.com/Runfusion/Fusion/actions/runs/28206337202)
|
| `engine/src/__tests__/in-review-merge-stall-deadlock-recovery.test.ts`
| 2/4 | `expected 'FN-5485' to be null` | [run
28206337202](https://github.com/Runfusion/Fusion/actions/runs/28206337202)
|
| `dashboard/app/components/__tests__/DevServerView.mobile.test.tsx` |
4/4 | `expected +0 to be 1` (mobile CSS structure) | [run
28206337202](https://github.com/Runfusion/Fusion/actions/runs/28206337202)
|

## Verification

- `pnpm test:gate` passes (313 core + 58 ci-shape tests)
- `pnpm lint` clean


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

---

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

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

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

## Summary by CodeRabbit

* **Chores**
* Updated the test quarantine list to exclude several flaky or failing
tests from routine dashboard and engine test runs.
* Added records for newly quarantined tests, including the date they
were marked and the CI issue they were linked to.
* Continued using the quarantine list across relevant test projects to
keep CI runs more stable.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-25 17:22:23 -07:00
gsxdsm
5ce577842e test: quarantine 3 failing CI full-suite tests
Quarantine three test files consistently failing on the non-blocking
full-suite CI on main, per the AGENTS.md deletion-ratchet policy:

- engine self-healing-fn-5488-fast-path-regressions.test.ts (shard 1)
- engine in-review-merge-stall-deadlock-recovery.test.ts (shard 2)
- dashboard DevServerView.mobile.test.tsx (shard 4)

Each has a matching entry in scripts/lib/test-quarantine.json with
the failing CI run link and quarantinedAt date. Tests will be deleted
after 14 days unless rescued with a root-cause fix.
2026-06-25 17:02:29 -07:00
gsxdsm
a9193df997 docs(verification): instruct agents not to use allowFullSuite unless necessary
Strengthen the fn_run_verification allowFullSuite parameter description, add an
AGENTS.md standing rule, and update docs/testing.md so agents default to a
file-scoped verification command and reserve allowFullSuite for genuinely full
runs with no targetable test set. allowFullSuite is the main way verification
balloons past its budget; the thin merge gate is the cross-cutting safety net.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:22:40 -07:00
gsxdsm
744aa2cc05 feat(engine): scope verification to changed files + scope-aware timeout
Diff-proportional verification (deriveFileScopedPnpmTestCommand) + scope-aware
verification timeout, so merge/step checks finish in seconds. Propagated to this
worktree directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 16:11:45 -07:00
gsxdsm
5c9f8b0040 test(engine): update sandbox-wiring timeout assertion for scope-aware default
echo ok is workspace-scoped, so the default verification budget is now 900s
(VERIFICATION_TIMEOUT_WORKSPACE_MS) rather than the retired flat 600s. Assert via
defaultVerificationTimeoutMs so the expectation tracks the scope-aware default.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 14:59:31 -07:00
gsxdsm
efa5d9b5f6 fix(engine): make merge/step verification timeout scope-aware
The merger and executor verification gate (shared runVerificationCommand) used
a flat 10-min default (VERIFICATION_COMMAND_TIMEOUT_MS) for any configured
test/build command, while the fn_run_verification tool already derived its
default from command scope. A workspace-scoped command (a full suite, ~10+ min)
hit the flat 10-min wall and was killed as an infra timeout; a package-scoped
command got a too-generous bound.

Derive the default from command scope to match the tool: package-scoped
(pnpm --filter/-F ...) → 300s, workspace-scoped (root command like pnpm test)
→ 900s. An explicit project verificationCommandTimeoutMs still overrides, and
the 30-min hard cap still clamps the result. Covers both the merger and the
executor per-step auto-gate, which share runVerificationCommand.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-25 14:43:41 -07:00
Phil Larson
b62b4b0e30 fix(FN-798): scope engine vitest fork pool
Fusion-Task-Id: FN-798
2026-06-25 11:21:46 -07:00
Phil Larson
fa8e9fa817 fix(FN-798): stabilize engine vitest gate pool
Fusion-Task-Id: FN-798

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-25 10:56:43 -07:00
gsxdsm
9fabc9d750 FN-6962: ignore hidden overlap paths by default
Hidden dot paths no longer create file-overlap blockers unless operators opt back into legacy behavior.

- Add the ignoreHiddenOverlapPaths project setting, schema default, API sanitization, and Settings UI toggle.
- Filter hidden dot segments from scheduler, gridlock, and self-healing overlap checks by default while preserving explicit ignore paths.
- Cover default and opt-out behavior across core parity, dashboard settings routes, scheduler, gridlock, and self-healing tests.
- Document the setting and add a patch changeset for the published CLI package.

Files changed:
 .changeset/fn-6962-hidden-overlap-paths.md         |   7 ++
 docs/settings-reference.md                         |   1 +
 .../core/src/__tests__/settings-parity.test.ts     |   7 ++
 packages/core/src/settings-schema.ts               |   1 +
 packages/core/src/types.ts                         |   7 ++
 .../dashboard/app/components/SettingsModal.tsx     |   4 +-
 .../components/__tests__/SettingsModal.test.tsx    |  69 ++++++++++++++
 .../settings/sections/SchedulingSection.tsx        |  10 ++
 .../src/__tests__/routes-settings.test.ts          |  30 ++++++
 packages/dashboard/src/routes.ts                   |   9 ++
 .../src/routes/register-settings-memory-routes.ts  |   6 +-
 .../engine/src/__tests__/gridlock-detector.test.ts |  32 +++++++
 .../__tests__/scheduler-overlap-starvation.test.ts | 102 ++++++++++++++++++++-
 packages/engine/src/__tests__/self-healing.test.ts |  24 +++++
 packages/engine/src/gridlock-detector.ts           |   5 +-
 packages/engine/src/scheduler.ts                   |  40 +++++---
 packages/engine/src/self-healing.ts                |   2 +-
 packages/i18n/locales/en/app.json                  |   2 +
 packages/i18n/locales/es/app.json                  |  11 ++-
 packages/i18n/locales/fr/app.json                  |  11 ++-
 packages/i18n/locales/ko/app.json                  |  11 ++-
 packages/i18n/locales/zh-CN/app.json               |  11 ++-
 packages/i18n/locales/zh-TW/app.json               |  11 ++-
 packages/i18n/src/resources.d.ts                   |   2 +
 24 files changed, 379 insertions(+), 36 deletions(-)

Fusion-Task-Id: FN-6962
Fusion-Task-Lineage: c79120d3-fd9e-439d-b2cf-439f9e2e6952
2026-06-25 08:35:44 -07:00
gsxdsm
93fdc073e3 FN-7004: expect merge abort errors in dependency install test
Align the dependency-install abort regression test with the merge layer's canonical abort error.

- Update the dependency-sync abort expectation from AbortError to MergeAbortedError.
- Document why landOneRepo normalizes inner AbortError values through throwIfAborted.

Files changed:
 .../engine/src/__tests__/merger-ai-dependency-install.slow.test.ts  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Fusion-Task-Id: FN-7004

Fusion-Task-Lineage: 7b8a515a-cbbf-4e57-91cd-05a9a1001fd5
2026-06-25 08:35:44 -07:00
gsxdsm
f5e1b966ab FN-6943: add worktree file copy settings
Add configurable file-copy seeding for new task worktrees.

- Add the worktreeCopyFiles setting to project settings, schema validation, and dashboard settings UI.
- Copy selected files into acquired worktrees after checkout and record audit events for copied/skipped files.
- Document the new Worktrees setting and cover it with core, dashboard, and engine tests.

Files changed:
 .changeset/fn-6943-worktree-copy-files.md          |   7 +
 docs/dashboard-guide.md                            |   4 +
 docs/settings-reference.md                         |   1 +
 packages/core/src/__tests__/store-settings.test.ts |  24 ++++
 packages/core/src/settings-schema.ts               |   5 +
 packages/core/src/types.ts                         |   7 +
 .../app/__tests__/settings-sections.test.tsx       |  66 +++++++++
 .../dashboard/app/components/SettingsModal.tsx     | 146 ++++++++++++++++++++
 .../components/__tests__/SettingsModal.test.tsx    |  91 +++++++++++++
 .../settings/sections/WorktreesSection.tsx         |  51 ++++++-
 .../src/__tests__/worktree-acquisition.test.ts     |  69 +++++++++-
 .../src/__tests__/worktree-copy-files.test.ts      | 112 ++++++++++++++++
 packages/engine/src/run-audit.ts                   |   6 +
 packages/engine/src/worktree-acquisition.ts        |  32 ++++-
 packages/engine/src/worktree-copy-files.ts         | 147 +++++++++++++++++++++
 15 files changed, 765 insertions(+), 3 deletions(-)

Fusion-Task-Id: FN-6943

Fusion-Task-Lineage: fd1ded06-25f9-4496-8f50-6416446d2f29
2026-06-25 08:34:44 -07:00
Phil Larson
7cd660f558 fix(FN-783): address overlap repair review blockers 2026-06-25 05:08:04 -07:00
Phil Larson
e2a84d4dd6 feat(FN-783): complete Step 4 — reconcile stale overlap blockers safely
Fusion-Task-Id: FN-783

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-25 03:44:22 -07:00
Phil Larson
41d1d5b74b feat(FN-783): complete Step 3 — shared write-scope classification
Fusion-Task-Id: FN-783

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-25 03:44:21 -07:00
Phil Larson
c8be19f9e6 test(FN-783): cover poisoned write-scope metadata
Fusion-Task-Id: FN-783

Co-authored-by: Fusion <noreply@runfusion.ai>
2026-06-25 03:44:21 -07:00
gsxdsm
079c428af9 chore(release): v0.48.0
Version bump via changesets.
2026-06-24 23:56:23 -07:00
gsxdsm
eb3833a542 FN-6971: retire dual-observe cutover gating
Remove stale dual-observe prerequisites from workflow-authoritative readiness while preserving parity-summary safeguards.

- Require the authoritative flag plus clean populated parity summaries for interpreter cutover readiness.
- Keep persisted workflowInterpreterDualObserve values inert in runtime tests and documentation.
- Update cutover, parity, and graph-executor tests to reflect retired shadow observation behavior.
- Add a formatted patch changeset for the operator-facing cutover readiness fix.

Files changed:
 .changeset/fn-6971-workflow-cutover-readiness.md   |  7 ++
 docs/architecture.md                               |  2 +-
 docs/settings-reference.md                         |  4 +-
 docs/workflow-steps.md                             | 19 +++--
 .../core/src/__tests__/workflow-cutover.test.ts    | 19 +++--
 packages/core/src/workflow-cutover.ts              |  9 +--
 .../workflow-interpreter-cutover.test.ts           | 87 +++++++++++++++++++---
 .../workflow-interpreter-dual-observe.test.ts      | 76 ++++++-------------
 .../src/__tests__/stepwise-workflow-parity.test.ts | 25 ++++---
 .../engine/src/workflow-authoritative-driver.ts    | 10 +--
 10 files changed, 152 insertions(+), 106 deletions(-)

Fusion-Task-Id: FN-6971
Fusion-Task-Lineage: 363a441d-62e5-403c-9389-75fcf788352a
2026-06-24 23:32:52 -07:00
gsxdsm
8c734fe230 FN-6973: stabilize engine liveness tests
Stabilize engine tests around executor liveness cleanup and scheduler handoff expectations.

- Assert task-move cleanup clears active session registry entries for agent, step, and workflow-step sessions.
- Reset active session registry module state between executor tests alongside executing task locks.
- Relax brittle worktree and scheduler assertions to match current merge-base and handoff behavior.

Files changed:
 .../engine/src/__tests__/executor-pause.test.ts    | 52 +++++++++++++++++++---
 .../engine/src/__tests__/executor-test-helpers.ts  |  8 ++--
 .../engine/src/__tests__/executor-worktree.test.ts |  2 +-
 .../owning-node-unavailable-interactions.test.ts   |  2 +-
 .../src/__tests__/restart.integration.test.ts      |  8 +++-
 5 files changed, 59 insertions(+), 13 deletions(-)

Fusion-Task-Id: FN-6973

Fusion-Task-Lineage: 37c7d4b3-7ff5-4339-bd3f-6b10f507883e
2026-06-24 23:32:52 -07:00
gsxdsm
2ba81c25b4 chore(release): v0.47.0
Version bump via changesets.
2026-06-24 19:32:59 -07:00
gsxdsm
9dc228549c fix(workspace): make per-repo land resilient to a sub-repo dependency-sync failure
A workspace land squash-merges each sub-repo via a clean room that first runs the
configured/inferred install (npm/pnpm/yarn). The install hard-fails by design so
merge verification never runs against an uninstalled checkout — but that let ONE
sub-repo with a manifest npm refuses to install (e.g. a corrupt `-@0.0.1`
lockfile entry rejected by npm 11) block landing every other sub-repo.

landWorkspaceTask now passes nonFatalDependencySync to landOneRepo: a clean-room
install failure is caught, logged + audited as a non-fatal degradation, and the
land proceeds (the git squash needs no installed deps; only dep-dependent
verification degrades for that repo). A real abort signal still propagates. The
single-repo land path keeps the documented hard-fail (flag defaults off).

Tests: new workspace-merger-deps-resilient asserts both the resilient workspace
land (all repos land despite install throwing) and the preserved single-repo
hard-fail. Also fix a pre-existing getTask mock gap in workspace-merger.test
(mergeAndReview reads getTask().comments) that broke 3 tests at the land step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 17:15:38 -07:00
gsxdsm
93cfb88e64 fix(workspace): remove false reattach banner, silence ai-merge ENOENT prune
- dashboard: remove the "Branch needs reattachment" banner. It fired for any
  in-review task with a null singular task.branch — the NORMAL state for a
  workspace task (attachment is per-sub-repo worktrees in workspaceWorktrees), so
  it was a permanent false positive. Genuine lost bindings are already reattached
  automatically by self-healing's reconcileInReviewBranchRebind (event-driven on
  move-to-in-review + sweep), so no manual user action is needed. Delete the
  now-obsolete rebind-banner test + its registry entry.
- engine/self-healing: reconcileInReviewBranchRebind now explicitly skips
  workspace tasks (never rebind candidates — their fusion/<id> branches live in
  the sub-repos, not the non-git browse root; null root branch is healthy).
- engine/merger-ai: pre-merge prune treats an absent ai-merge search root (ENOENT)
  as "nothing to prune" instead of warning on every workspace merge.
- test: add ToggleRight to the TaskDetailModal lucide mock (pre-existing gap from
  FN-6880 that broke the whole suite at import).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 16:25:23 -07:00
gsxdsm
f06281961e fix(workspace): persist workspaceWorktrees and isolate concurrent session leases
Multiworkspace tasks could not complete due to two independent bugs:

1. task.workspaceWorktrees had no SQLite column / rowToTask mapping, so
   fn_acquire_repo_worktree's updateTask write was dropped on every persist
   (applyTaskPatch writes the DB-round-tripped task back to task.json). Every
   later getTask returned undefined, so fn_task_done's scope verifier read {}
   and blocked with "acquired no sub-repo worktrees", and isWorkspaceTask()
   consumers misfired. Persist it mirroring mergeDetails (schema column + v129
   migration + db-migrate + defineTaskColumn + TaskRow + rowToTask).

2. In workspace mode every task ran rooted at the shared browse-only root, and
   setActiveSession registered that path keyed only by path — so a second
   concurrent workspace task was rejected by the foreign-task guard
   ("active-session path ... is held by ..."). Give each task a task-scoped
   synthetic session key (sessionRegistryPath), applied at all register and
   unregister sites; the in-memory worktree Set still holds the real root.

Regression tests assert the persistence invariant across getTask/listTasks/
store-reopen and concurrent session registration across all three session
surfaces; both verified to fail without the fix.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:13:43 -07:00
gsxdsm
038ac3060b FN-6963: disable tool output log details by default
Agent logs now keep tool timeline rows while requiring an explicit opt-in to persist verbose tool payloads.

- Default persistAgentToolOutput to false in global settings and direct AgentLogger construction.
- Update the settings UI, API expectations, documentation, and changeset to describe opt-in tool payload persistence.
- Adjust engine and dashboard tests for the new default-off behavior while preserving explicit opt-in coverage.

Files changed:
 .changeset/FN-6963-tool-output-default-off.md      |  5 ++++
 docs/settings-reference.md                         |  2 +-
 packages/core/src/settings-schema.ts               |  6 ++++-
 .../components/__tests__/SettingsModal.test.tsx    | 22 +++++++++++++---
 .../settings/sections/GlobalGeneralSection.tsx     |  2 +-
 .../src/__tests__/routes-settings.test.ts          |  4 +--
 packages/engine/src/__tests__/agent-logger.test.ts | 30 ++++++++++++++++++----
 .../src/__tests__/heartbeat-executor.test.ts       |  4 +--
 .../src/__tests__/merger-merge-details.test.ts     |  2 +-
 .../src/__tests__/merger-verification.test.ts      |  2 +-
 .../src/__tests__/step-session-executor.test.ts    |  4 +--
 packages/engine/src/__tests__/triage.test.ts       |  2 +-
 packages/engine/src/agent-logger.ts                |  8 ++++--
 13 files changed, 71 insertions(+), 22 deletions(-)

Fusion-Task-Id: FN-6963

Fusion-Task-Lineage: 7db32871-f539-4a27-a324-02c55ce5bd04
2026-06-23 23:35:33 -07:00
gsxdsm
59d5e81a95 Merge remote-tracking branch 'origin/main' into latest4-1718
# Conflicts:
#	packages/engine/src/__tests__/merge-error-recovery.test.ts
#	packages/engine/src/merger-ai.ts
2026-06-23 20:58:31 -07:00
gsxdsm
b464f7d7d4 Merge remote-tracking branch 'origin/main' into latest3-1717 2026-06-23 19:58:12 -07:00
gsxdsm
4a1fd88d57 Merge remote-tracking branch 'origin/main' into latest3-1718 2026-06-23 19:58:03 -07:00
gsxdsm
216f910524 Merge remote-tracking branch 'origin/main' into latest2-1718
# Conflicts:
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 18:15:24 -07:00
gsxdsm
cd178261ec Merge remote-tracking branch 'origin/main' into latest2-1717
# Conflicts:
#	packages/engine/src/__tests__/executor-workspace.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/base-commit-capture.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 18:13:41 -07:00
gsxdsm
078723febb Merge remote-tracking branch 'origin/main' into latest2-1714
# Conflicts:
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/base-commit-capture.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 18:11:26 -07:00
gsxdsm
0ebc9ea252 Merge branch 'main' into feature/add-request-headers-x-session-id-and-x-session-a 2026-06-23 18:03:33 -07:00
gsxdsm
1293f3432d Merge remote-tracking branch 'origin/main' into latest-1718
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 17:41:30 -07:00
gsxdsm
9fbc93c8b1 Merge remote-tracking branch 'origin/main' into latest-1717
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 17:40:35 -07:00
gsxdsm
0b111bbb03 Merge remote-tracking branch 'origin/main' into latest-1714
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 17:39:37 -07:00
gsxdsm
fa622721e8 Merge remote-tracking branch 'origin/main' into latest-1713
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 17:38:37 -07:00
gsxdsm
8d343b87b3 Merge branch 'main' into feature/add-request-headers-x-session-id-and-x-session-a 2026-06-23 17:37:57 -07:00
gsxdsm
e17e9bc867 feat(#1675): add X-Session-Id and X-Session-Affinity routing headers to LLM requests
Add X-Session-Id and X-Session-Affinity headers to all outbound LLM chat
completion requests so LLM gateways can sticky-route consecutive requests
from the same conversation and observability tools (Langfuse, Arize) can
group stateless API calls into a single multi-turn trace.

The headers carry a stable identifier: the task id when available (stable
across pause/resume), otherwise the pi session id. The implementation wraps
modelRegistry.getApiKeyAndHeaders -- the single chokepoint pi-coding-agent
uses for both the main stream and compaction -- merging routing headers into
the resolved output. This covers all HTTP-based providers (built-in, custom,
and HTTP-streaming extensions) without disturbing auth resolution.

Also propagates taskId to four secondary executor sessions (retry,
verification-fix, workflow-step, child-agent) that previously fell back to
a per-instance pi id, fragmenting per-task observability grouping.

Closes #1675
2026-06-23 17:31:52 -07:00
gsxdsm
37b2cb38ac Merge branch 'main' into feature/workflow-branch-group 2026-06-23 17:16:16 -07:00
gsxdsm
9822fbd6a8 Merge remote-tracking branch 'origin/main' into conflict-resolution-1718
# Conflicts:
#	packages/engine/src/__tests__/executor-recovery.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/executor.ts
#	packages/engine/src/merger-ai.ts
#	packages/engine/src/project-engine.ts
#	packages/engine/src/run-audit.ts
#	packages/engine/src/self-healing.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 16:23:28 -07:00
gsxdsm
0dea25061d Merge remote-tracking branch 'origin/main' into conflict-resolution-1717
# Conflicts:
#	packages/engine/src/__tests__/executor-recovery.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/executor.ts
#	packages/engine/src/merger-ai.ts
#	packages/engine/src/project-engine.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 16:12:10 -07:00
gsxdsm
941343f483 Merge remote-tracking branch 'origin/main' into conflict-resolution-1714
# Conflicts:
#	packages/engine/src/__tests__/executor-recovery.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/executor.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 16:01:38 -07:00
gsxdsm
dcee0d3172 Merge remote-tracking branch 'origin/main' into conflict-resolution-1713
# Conflicts:
#	packages/engine/src/__tests__/executor-recovery.test.ts
#	packages/engine/src/agent-tools.ts
#	packages/engine/src/executor.ts
#	packages/engine/src/worktree-acquisition.ts
2026-06-23 15:56:06 -07:00
gsxdsm
4faadd4f75 Merge remote-tracking branch 'origin/main' into conflict-resolution-1712
# Conflicts:
#	packages/dashboard/app/components/WorkflowNodeEditor.tsx
#	packages/engine/src/__tests__/executor-fast-mode-workflows.test.ts
2026-06-23 15:44:52 -07:00
gsxdsm
a8abecd043 Merge remote-tracking branch 'origin/main' into conflict-resolution-1711
# Conflicts:
#	packages/engine/src/executor.ts
2026-06-23 15:37:29 -07:00
gsxdsm
905a877954 Merge pull request #1710 from MichaelHoughtonDeBox/feat/workspace-multi-repo
Workspace mode: open a folder of git repos as one project (foundation + design Q)
2026-06-23 15:08:15 -07:00
gsxdsm
bac7049822 chore(release): v0.46.0
Version bump via changesets.
2026-06-23 12:27:50 -07:00