Files
fusion/scripts/spotlight-exclude-fusion-paths.sh
gsxdsm e9f14bf024 perf: speed up local pnpm build and cap stacked verifications (#2134)
## Summary

- Extend the workspace content-hash skip cache to **all** packages (not
just plugins), with `--force` / `--full` flags
- Default local CLI packaging to a **fast mode** (bin/extension +
migrations only); full desktop/plugin/DTS staging runs on CI or `pnpm
build:full`
- Enable TypeScript `incremental` builds for warm recompiles
- Add `maxConcurrentVerifications` (default **1**) so concurrent tasks
cannot stack monorepo typecheck/build and peg CPU

Warm `pnpm build` measured ~**126s → ~0.8s** when nothing changed.

## Test plan

- [x] `node --test scripts/__tests__/build-workspace.test.mjs` (12 pass)
- [x] `pnpm --filter @fusion/engine exec vitest run
src/__tests__/verification-concurrency.test.ts`
- [x] `pnpm --filter @fusion/core exec vitest run
src/__tests__/settings-parity.test.ts`
- [x] Local: first `pnpm build` rebuilds as needed; second warm `pnpm
build` skips all packages (~0.8s)
- [x] Fast CLI packaging logs skip of desktop/plugin staging without
`FUSION_CLI_FULL_PACKAGE`
- [ ] CI: `pnpm build` still full-packages under `CI=true` (plugin
staging / release surfaces)

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

* **New Features**
* Added a Scheduling setting to limit concurrent verification tasks from
1–8, with a default of 1.
* Verification tasks now support cancellation while waiting or running.
  * Added options for forced and full workspace builds.

* **Performance**
* Local builds can skip unchanged packages and use incremental
compilation for faster rebuilds.
* Local CLI packaging is faster by default, while full packaging remains
available when needed.

* **Documentation**
* Updated the settings reference with the new verification concurrency
option.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-15 08:44:11 -07:00

40 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Re-apply Spotlight skip markers for Fusion-heavy directories.
# Uses .metadata_never_index (Spotlight does not index dirs containing this file).
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
MARKER=".metadata_never_index"
PATHS=(
"$ROOT/.worktrees"
"$ROOT/.worktrees/.ai-merge"
"$ROOT/node_modules"
"$ROOT/.fusion"
"$ROOT/packages/desktop/deploy"
"$ROOT/packages/desktop/dist"
"$HOME/.fusion"
"$HOME/.fusion/embedded-postgres"
"$HOME/orca/workspaces"
"$HOME/.herdr/worktrees/kb"
"$HOME/.paseo/worktrees"
)
for p in "${PATHS[@]}"; do
[ -d "$p" ] || continue
f="$p/$MARKER"
[ -f "$f" ] || touch "$f"
chflags hidden "$f" 2>/dev/null || true
done
if [ -d "$ROOT/.worktrees" ]; then
for wt in "$ROOT/.worktrees"/*/; do
[ -d "$wt" ] || continue
f="${wt}${MARKER}"
[ -f "$f" ] || touch "$f"
chflags hidden "$f" 2>/dev/null || true
if [ -d "${wt}node_modules" ]; then
nf="${wt}node_modules/${MARKER}"
[ -f "$nf" ] || touch "$nf"
chflags hidden "$nf" 2>/dev/null || true
fi
done
fi
echo "Spotlight skip markers applied under $ROOT and related agent worktree roots."