Skip to content

test: harden and slim local test workflow - #51

Merged
gsxdsm merged 10 commits into
mainfrom
codex/testing-suite-quality-prd
May 7, 2026
Merged

test: harden and slim local test workflow#51
gsxdsm merged 10 commits into
mainfrom
codex/testing-suite-quality-prd

Conversation

@aronprins

@aronprins aronprins commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR turns the testing-suite audit into implementation work and makes the local/PR test workflow faster without dropping the old exhaustive dashboard coverage.

What changed

  • Added docs/testing-suite-quality-prd.md with the testing-suite assessment and implementation plan.
  • Hardened changed-test selection so shared package edits include direct reverse dependents.
  • Made dirty worktree changes bypass package test-cache reuse.
  • Derived CI test shards from workspace packages with test scripts instead of a hard-coded list.
  • Standardized Vitest worker budgeting/isolation across runtime packages and added governance coverage.
  • Added/kept local-first lanes for CLI release/package checks, dashboard browser smoke, dashboard build output, and script governance.
  • Fixed test isolation around custom provider settings by avoiding writes to the real user home.
  • Split dashboard Vitest into explicit projects and removed deprecated environmentMatchGlobs.
  • Moved the dashboard default package test to a curated app/API quality gate. The old exhaustive app/API suite remains available as pnpm --filter @fusion/dashboard test:deep, plus test:app and test:api.
  • Updated AGENTS.md with current project and agent test-running instructions.
  • Kept PR build coverage as an explicit workflow job while removing redundant pre-test shard builds.

Runtime impact

Measured locally on this branch:

  • Previous pnpm test:full: 744.95s / about 12m25s.
  • New pnpm test:full: 308.34s / about 5m08s.
  • Default dashboard gate: 148 files, 3,642 tests, real 91.73s standalone.
  • Exhaustive dashboard deep lane: 419 files, 10,747 tests, real 335.47s, still passing and opt-in.

Dashboard test policy

Default local/PR dashboard coverage now runs the curated quality projects:

pnpm --filter @fusion/dashboard test

Run the exhaustive dashboard sweep for broad dashboard architecture, shared modal/view infrastructure, route registration, or curated-selection-risk changes:

pnpm --filter @fusion/dashboard test:deep

Additional explicit lanes remain:

pnpm --filter @fusion/dashboard test:app
pnpm --filter @fusion/dashboard test:api
pnpm --filter @fusion/dashboard test:browser-smoke
pnpm --filter @fusion/dashboard test:build

Bugs tracked/fixed

The living log is in docs/bugs/testing-suite-hardening.md and includes TSH-001 through TSH-013, including dashboard runtime/noise, PR action minutes, dashboard lane script selection, temporary PR build coverage loss, warning filtering cleanup, and dashboard default runtime.

Verification

Passed locally:

pnpm --filter @fusion/dashboard test
pnpm --filter @fusion/dashboard test:deep
pnpm --filter @fusion/dashboard test:build
pnpm --filter @fusion/dashboard test:browser-smoke
pnpm --filter @runfusion/fusion exec vitest run src/__tests__/package-config.test.ts src/__tests__/ci-workflow.test.ts --silent=passed-only --reporter=dot
pnpm --filter @fusion/core typecheck
pnpm --filter @fusion/core exec vitest run src/__tests__/central-db.test.ts --silent=passed-only --reporter=dot
pnpm test:full
pnpm lint
pnpm build
git diff --check

Notes

  • Draft PR intentionally not submitted for review yet.
  • No changeset included because this is docs, CI/test infrastructure, and test workflow behavior, not published @runfusion/fusion package behavior.

Summary by CodeRabbit

  • Chores

    • CI now has a dedicated Build job and streamlined shard tests with a deterministic shard matrix; improved test discovery, dynamic worker configuration, smarter changed-vs-full test detection, and added a dev dependency for globbing.
  • Tests

    • Large expansion of unit, integration, and browser-layout smoke suites; new end-to-end integration tests, multi-project test configurations, and per-package test scripts.
  • Documentation

    • Expanded testing guidance, PRD, living bug log, contributor workflow, and skipped-test inventory with lanes and governance guidance.

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR separates CI build into its own job, implements workspace-aware test discovery and sharding, expands Vitest multi-project configs and computed worker pooling, adds integration and browser-smoke tests, increases unit/test-infra coverage, standardizes git test setup, and updates testing documentation and inventories.

Changes

Testing Suite Infrastructure & CI Hardening

Layer / File(s) Summary
CI Workflow Restructuring
.github/workflows/pr-checks.yml
New dedicated build job runs pnpm build independently; test-shards job removes build step and runs deterministic shard tests only.
Vitest Configuration & Governance
packages/dashboard/vitest.config.ts, packages/core/src/__test-utils__/vitest-setup.ts, scripts/__tests__/test-governance.test.mjs, plugins/*/vitest.config.ts, packages/*/vitest.config.ts
Introduces multi-project dashboard Vitest configuration, root-level globals: true, shared setup/teardown and noisy-output filtering, computed maxWorkers and pooled/forked execution, and governance tests validating configs across workspace packages.
Test Execution Scripts & Dynamic Discovery
scripts/test-changed.mjs, scripts/ci-test-shard.mjs, package.json
Refactors workspace discovery via pnpm-workspace.yaml, exports workspace-info helpers, adds dirty-worktree parsing and cache-bypass, expands reverse-dependency planning, and adds fast-glob dev dependency.
CLI Extension Integration Tests
packages/cli/package.json, packages/cli/src/__tests__/ci-workflow.test.ts, packages/cli/src/__tests__/extension-integration.test.ts, packages/cli/src/__tests__/extension.test.ts
Adds gated integration tests exercising the built extension against dashboard assets; separates legacy exhaustive suite under FUSION_TEST_LEGACY_EXTENSION_INTEGRATION; updates CI workflow assertions for build/test job structure and artifact presence.
Dashboard Test Infrastructure & Lanes
packages/dashboard/package.json, packages/dashboard/app/test/cssFixture.ts, packages/dashboard/scripts/browser-layout-smoke.mjs, packages/cli/src/__tests__/package-config.test.ts
Adds multi-script test lanes (test, test:app, test:api, test:deep, test:browser-smoke), caches CSS fixture base-only output, implements a browser layout smoke script via CDP, and validates dashboard package test script contracts.
Engine Test Coverage
packages/engine/src/__tests__/custom-providers.test.ts, packages/engine/src/__tests__/task-completion.test.ts, packages/engine/src/__tests__/verification-utils.test.ts, packages/engine/src/custom-providers.ts
Adds unit tests for custom provider reading, task completion blocking, and execWithProcessGroup (buffer overflow, abort, timeout); updates readCustomProviders to accept optional homeDir.
Git Test Setup Standardization
packages/dashboard/src/__tests__/debug-execfile.test.ts, packages/dashboard/src/__tests__/project-routes.test.ts, packages/dashboard/src/__tests__/routes-git.test.ts, packages/dashboard/src/__tests__/routes-github.test.ts, packages/dashboard/src/__tests__/routes-system.test.ts
Standardizes git initialization across tests to use --initial-branch=main and adds diagnostic reset teardown hooks where applicable.
Dashboard CSS Contract Tests
packages/dashboard/app/__tests__/agent-css-classes.test.ts
Removes broad selector-presence assertions and extraction helper; retains contract checks for layout, tokens, focus/hover accessibility, adds focused :focus-visible rule test and empty-state copy assertion.
Test Infrastructure Validation
scripts/__tests__/test-changed.test.mjs, scripts/__tests__/test-governance.test.mjs
Extends test suites to validate workspace discovery, dirty-file parsing, reverse-dependency expansion, package info collection, governance checks, and execution planning.
Testing Documentation & Guidelines
AGENTS.md, docs/contributing.md, docs/testing-suite-quality-prd.md, docs/skipped-test-inventory.md, docs/bugs/testing-suite-hardening.md
Adds comprehensive testing guidance, dashboard test lanes, PRD for testing quality, updated skip-inventory with environment gates, and a testing-suite hardening bug log.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Suggested reviewers

  • gsxdsm

Poem

🐰 A test suite springs forth, lines multiply—
Governance gleams, CI workflows fly!
From workspace whispers to smoke-test sighs,
Extensions dance under watchful eyes.
Quality blooms where dashboard lies! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.51% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'test: harden and slim local test workflow' accurately and concisely describes the main objective: improving test suite performance and robustness by hardening isolation and streamlining the local test workflow while maintaining coverage.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/testing-suite-quality-prd

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
scripts/test-changed.mjs (1)

61-106: ⚡ Quick win

Switch workspace discovery to a real YAML+glob parser to handle pnpm workspace patterns correctly.

readWorkspacePatterns() / expandWorkspacePattern() only handle bare paths and the /* suffix. pnpm-workspace.yaml supports negation patterns (prefixed with !, e.g., '!/test/') and broader glob patterns (e.g., 'components/' matching nested subdirectories), which this implementation silently skips. This can cause packages to be unexpectedly excluded from both changed-test selection and CI sharding.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@scripts/test-changed.mjs` around lines 61 - 106, readWorkspacePatterns and
expandWorkspacePattern are too naive; replace the ad-hoc parsing with a YAML
loader and a glob resolver so pnpm-workspace.yaml patterns (including negations
like '!/test/' and nested globs like 'components/**') are handled correctly. In
readWorkspacePatterns, read and parse pnpm-workspace.yaml using a YAML parser
(e.g., js-yaml) and return the raw patterns array from the packages key; in
expandWorkspacePattern, use a glob library (e.g., fast-glob) rooted at
projectRoot to resolve each pattern to package.json paths (respecting negations
and nested matches) instead of only handling literal paths and trailing "/*".
Ensure functions named readWorkspacePatterns, expandWorkspacePattern and
variables projectRoot/pattern are updated to use these libraries and preserve
the final result as an array of existing package.json file paths.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/dashboard/scripts/browser-layout-smoke.mjs`:
- Around line 25-43: The current loadDashboardCss() function rebuilds the
stylesheet cascade by alphabetizing files from componentCssRoot which can
diverge from runtime import order; instead have loadDashboardCss() read the
emitted client CSS (or otherwise reuse the app's existing single source of truth
that preserves runtime order) rather than sorting componentEntries — locate
loadDashboardCss, stop sorting componentEntries (or remove the componentCssRoot
walk entirely) and instead load the compiled/emitted CSS bundle (or the build
artifact that preserves import order) using appRoot/dashboardRoot references so
the smoke test uses the actual runtime cascade.
- Around line 280-321: The launchBrowser() DevTools-handshake promise can reject
and leave the spawned Chrome process and temporary userDataDir (and the fixture
HTTP server started in main()) running; update launchBrowser() to ensure any
error path cleans up by killing the spawned browser process and removing the
userDataDir before rejecting (e.g., install a rejection/cleanup handler that
calls browser.kill() and removes the temp dir), and update main() so it either
awaits launchBrowser() before starting the fixture server or registers a cleanup
path that will stop the server if launchBrowser() later fails; reference
launchBrowser, the spawned browser variable (browser), and userDataDir to locate
where to add try/catch/finally or promise.catch cleanup.

In `@scripts/__tests__/test-governance.test.mjs`:
- Around line 22-29: readWorkspacePackageDirs() currently only extracts
double-quoted workspace patterns via the regex in the patterns assignment, which
misses single-quoted or unquoted entries; update the extraction to accept
double-quoted, single-quoted, or unquoted YAML list items (or better, parse the
YAML with a YAML parser) so patterns like '- "pkg/*"', "- 'pkg/*'", and '-
pkg/*' are all captured; specifically modify the lines that build patterns (the
matchAll regex) to handle the three cases and normalize to the same capture (or
replace the regex with a YAML parse) so the later logic that iterates patterns
and expands "/*" directories will include all workspace packages.

---

Nitpick comments:
In `@scripts/test-changed.mjs`:
- Around line 61-106: readWorkspacePatterns and expandWorkspacePattern are too
naive; replace the ad-hoc parsing with a YAML loader and a glob resolver so
pnpm-workspace.yaml patterns (including negations like '!/test/' and nested
globs like 'components/**') are handled correctly. In readWorkspacePatterns,
read and parse pnpm-workspace.yaml using a YAML parser (e.g., js-yaml) and
return the raw patterns array from the packages key; in expandWorkspacePattern,
use a glob library (e.g., fast-glob) rooted at projectRoot to resolve each
pattern to package.json paths (respecting negations and nested matches) instead
of only handling literal paths and trailing "/*". Ensure functions named
readWorkspacePatterns, expandWorkspacePattern and variables projectRoot/pattern
are updated to use these libraries and preserve the final result as an array of
existing package.json file paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 285b019d-a8f0-4bb1-bc11-f8d0424faf89

📥 Commits

Reviewing files that changed from the base of the PR and between 79ee217 and 6276ed6.

📒 Files selected for processing (36)
  • .github/workflows/pr-checks.yml
  • AGENTS.md
  • docs/bugs/testing-suite-hardening.md
  • docs/contributing.md
  • docs/skipped-test-inventory.md
  • docs/testing-suite-quality-prd.md
  • packages/cli/package.json
  • packages/cli/src/__tests__/bundle-output-helpers.ts
  • packages/cli/src/__tests__/bundle-output.test.ts
  • packages/cli/src/__tests__/ci-workflow.test.ts
  • packages/cli/src/__tests__/extension-integration.test.ts
  • packages/cli/src/__tests__/extension.test.ts
  • packages/cli/src/__tests__/package-config.test.ts
  • packages/core/src/__test-utils__/vitest-setup.ts
  • packages/dashboard/app/__tests__/agent-css-classes.test.ts
  • packages/dashboard/app/test/cssFixture.ts
  • packages/dashboard/package.json
  • packages/dashboard/scripts/browser-layout-smoke.mjs
  • packages/dashboard/src/__tests__/debug-execfile.test.ts
  • packages/dashboard/src/__tests__/project-routes.test.ts
  • packages/dashboard/src/__tests__/routes-git.test.ts
  • packages/dashboard/src/__tests__/routes-github.test.ts
  • packages/dashboard/src/__tests__/routes-system.test.ts
  • packages/dashboard/vitest.config.ts
  • packages/dashboard/vitest.setup.ts
  • packages/droid-cli/vitest.config.ts
  • packages/engine/src/__tests__/custom-providers.test.ts
  • packages/engine/src/__tests__/task-completion.test.ts
  • packages/engine/src/__tests__/verification-utils.test.ts
  • packages/engine/src/custom-providers.ts
  • packages/pi-claude-cli/vitest.config.ts
  • packages/pi-llama-cpp/vitest.config.ts
  • scripts/__tests__/test-changed.test.mjs
  • scripts/__tests__/test-governance.test.mjs
  • scripts/ci-test-shard.mjs
  • scripts/test-changed.mjs

Comment thread packages/dashboard/scripts/browser-layout-smoke.mjs
Comment thread packages/dashboard/scripts/browser-layout-smoke.mjs Outdated
Comment thread scripts/__tests__/test-governance.test.mjs Outdated
@gsxdsm

gsxdsm commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Much needed!! Thank you!!

@aronprins

Copy link
Copy Markdown
Collaborator Author

Addressed the remaining review-summary nitpick in e6c676d as well: scripts/test-changed.mjs now parses pnpm-workspace.yaml through yaml, resolves workspace package.json files with fast-glob, and includes regression coverage for quoted, bare, nested, and negated workspace patterns. I also fixed the local CI shard precondition by having scripts/ci-test-shard.mjs build plugin packages before running shard tests.

@aronprins
aronprins force-pushed the codex/testing-suite-quality-prd branch from e6c676d to 06d0226 Compare May 7, 2026 15:36
@aronprins

Copy link
Copy Markdown
Collaborator Author

Rebased onto main and force-pushed the review fixes as 06d0226. All three review threads remain resolved; local verification passed including the isolated CI shard rerun. Monitoring CodeRabbit/checks now.

@aronprins
aronprins marked this pull request as ready for review May 7, 2026 15:44
@greptile-apps

greptile-apps Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR hardens the local/PR test workflow by fixing the two previously identified bugs in scripts/test-changed.mjs (reverse-dependency expansion now wired into decideExecutionPlan, and buildPackageDirByName now uses canonical workspace dirs instead of short-name aliases), and extends the test infrastructure with a governance test, new engine/CLI integration tests, and a multi-project dashboard Vitest config that separates curated quality gates from exhaustive sweeps.

  • scripts/test-changed.mjs: buildReverseDependencyMap + expandWithReverseDependents are now called in main() and decideExecutionPlan; buildPackageDirByName replaces the manual map-inversion loop that produced short-name (\"engine\") paths, fixing false cache hits.
  • scripts/ci-test-shard.mjs: replaces the hard-coded nine-package list with dynamic discovery via listWorkspaceTestPackages(), so newly added packages with test scripts appear in CI shards automatically.
  • packages/dashboard/vitest.config.ts: introduces four named projects selected by the explicit script aliases in package.json; running vitest run without --project executes all four, running the quality-gate files twice.

Confidence Score: 5/5

Safe to merge. Both previously-flagged bugs in scripts/test-changed.mjs are corrected, and all other changes are additive test infrastructure with no runtime production impact.

Both bugs from previous review rounds are fully addressed: buildPackageDirByName now uses canonical workspace dirs so computePackageHash correctly hashes package sources, and expandWithReverseDependents is wired into decideExecutionPlan so downstream packages are included when a shared package changes.

packages/dashboard/vitest.config.ts — confirm that bare vitest run paths (editor integrations, test:coverage:dashboard) running all four projects and duplicating quality-gate execution is acceptable.

Important Files Changed

Filename Overview
scripts/test-changed.mjs Major refactor: adds listWorkspacePackageInfos, buildPackageDirByName, buildReverseDependencyMap, and expandWithReverseDependents; wires reverse-dep expansion into decideExecutionPlan and main(). Fixes both previously-flagged P1 bugs (short-name overwrite in dir map, missing reverse-dep wiring).
scripts/ci-test-shard.mjs Replaces hard-coded package list with dynamic listWorkspaceTestPackages() discovery; adds listWorkspaceTestPackages export. Shard distribution is now driven by workspace packages that declare a test script.
packages/dashboard/vitest.config.ts Converts dashboard from single flat config to 4 named projects. Removes deprecated environmentMatchGlobs. Quality projects are a subset of exhaustive projects, so running without --project runs quality tests twice.
.github/workflows/pr-checks.yml Adds a dedicated build job; removes pnpm build from the test-shards job. Build and test shards run concurrently.
scripts/tests/test-governance.test.mjs New governance test asserting every workspace package with a test script has a vitest.config.ts referencing shared setup/teardown files and computeMaxWorkers.
packages/engine/src/custom-providers.ts Makes homeDir injectable via an optional parameter, enabling test isolation without real filesystem writes.
packages/engine/src/tests/custom-providers.test.ts New test suite validating readCustomProviders using isolated temp directories; covers missing settings, malformed JSON, and valid provider arrays.
packages/core/src/test-utils/vitest-setup.ts Refactors the SQLite ExperimentalWarning filter into an idempotent installWarningFilter() guarded by a global flag, preventing double-patching.
packages/cli/src/tests/extension-integration.test.ts New integration test for the built CLI extension; skipped unless FUSION_TEST_EXTENSION_INTEGRATION=1. Tests tool registration surface, task lifecycle, and ephemeral agent rejection.

Reviews (5): Last reviewed commit: "test(FN-000): include reverse dependents..." | Re-trigger Greptile

Comment thread plugins/fusion-plugin-cursor-runtime/vitest.config.ts Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/cli/src/__tests__/ci-workflow.test.ts`:
- Around line 186-189: The negative assertion in the test uses strict equality
to detect a pnpm build step (step.run === "pnpm build"), which misses
multiline/block-run values like "pnpm build\n"; update the check to use
substring matching (e.g., step.run?.includes("pnpm build")) consistent with the
existing findBuildStepByRun helper, and make the analogous change in the related
test at the earlier "keeps build coverage" assertion so both positive and
negative checks use .includes() to robustly detect the build command.

In `@packages/cli/src/__tests__/package-config.test.ts`:
- Around line 251-256: The current assertions only check inclusion and can miss
accidental overlaps between curated and deep lanes; update tests around
dashboardPkg.scripts to use boundary-aware matches (e.g., toMatch with
word-boundary regex for "--project dashboard-app" and "--project dashboard-api")
and add negative assertions so the default test script
(dashboardPkg.scripts?.test) explicitly does NOT contain deep projects
("--project dashboard-app" or "--project dashboard-api"), while the deep lane
(dashboardPkg.scripts?.["test:deep"]) asserts it DOES contain the deep projects
and DOES NOT contain the quality projects ("--project dashboard-app-quality" /
"--project dashboard-api-quality").

In `@packages/core/src/__test-utils__/vitest-setup.ts`:
- Around line 41-60: The file contains a leftover inline override of
process.emitWarning that double-wraps the filter installed by
installWarningFilter(); remove the stale inline reassignment block (the old
wrapper that captures originalEmitWarning and reassigns process.emitWarning) so
only installWarningFilter(), its EmitWarningArgs/EmitWarningRestArgs types, and
its own originalEmitWarning binding remain and are invoked; ensure no other
direct process.emitWarning reassignments remain so the warningState guard in
installWarningFilter and its filtering logic are the single active
implementation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28cc95ea-3cab-4995-bb12-31379d44214c

📥 Commits

Reviewing files that changed from the base of the PR and between 6276ed6 and 06d0226.

📒 Files selected for processing (14)
  • .github/workflows/pr-checks.yml
  • AGENTS.md
  • docs/bugs/testing-suite-hardening.md
  • docs/contributing.md
  • docs/skipped-test-inventory.md
  • docs/testing-suite-quality-prd.md
  • package.json
  • packages/cli/package.json
  • packages/cli/src/__tests__/ci-workflow.test.ts
  • packages/cli/src/__tests__/extension-integration.test.ts
  • packages/cli/src/__tests__/extension.test.ts
  • packages/cli/src/__tests__/package-config.test.ts
  • packages/core/src/__test-utils__/vitest-setup.ts
  • packages/dashboard/app/__tests__/agent-css-classes.test.ts
✅ Files skipped from review due to trivial changes (4)
  • packages/cli/package.json
  • package.json
  • docs/bugs/testing-suite-hardening.md
  • packages/cli/src/tests/extension-integration.test.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/pr-checks.yml

Comment thread packages/cli/src/__tests__/ci-workflow.test.ts
Comment thread packages/cli/src/__tests__/package-config.test.ts
Comment thread packages/core/src/__test-utils__/vitest-setup.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/fusion-plugin-cursor-runtime/vitest.config.ts`:
- Around line 19-21: Remove the deprecated poolOptions configuration: delete the
entire poolOptions object (the nested threads/minThreads/maxThreads structure)
and keep only the top-level pool: "threads" and maxWorkers entries; update any
references to poolOptions in this module (e.g., in the vitest config object) so
the config conforms to Vitest 4's API.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b38d235-c1cb-4256-8fd2-b6eb7ae99964

📥 Commits

Reviewing files that changed from the base of the PR and between 06d0226 and 76a2d8d.

📒 Files selected for processing (1)
  • plugins/fusion-plugin-cursor-runtime/vitest.config.ts

Comment thread plugins/fusion-plugin-cursor-runtime/vitest.config.ts Outdated
@aronprins

Copy link
Copy Markdown
Collaborator Author

Follow-up review pass is complete on 2bc0f53. Replied to and resolved all currently open review threads; thread-aware scrape now reports 0 unresolved / 8 resolved. Latest PR checks are all green: Build, Lint, Typecheck, Test shards 1/3, 2/3, 3/3, and CodeRabbit.

@aronprins

Copy link
Copy Markdown
Collaborator Author

Addressed Greptile's P1 outside-diff finding in 409d4ef. scripts/test-changed.mjs now builds packageNameByDir and packageDirByName from the same canonical listWorkspacePackageInfos() result and uses buildPackageDirByName() instead of manually inverting the alias-containing map, so package cache hashes use paths like packages/engine rather than short aliases like engine. Added a regression test for canonical workspace dirs.

Local verification passed: node --test scripts/__tests__/test-changed.test.mjs scripts/__tests__/test-governance.test.mjs, pnpm test:scripts, pnpm lint, and git diff --check.

@aronprins

Copy link
Copy Markdown
Collaborator Author

Addressed Greptile's reverse-dependency expansion P1 in b3e5932. decideExecutionPlan() now expands changed packages through expandWithReverseDependents() when a reverse dependency map is provided, and main() builds that map from workspace package metadata before planning. Added a regression proving a @fusion/core change expands to downstream dependents before cache filtering.

Local verification passed: node --test scripts/__tests__/test-changed.test.mjs scripts/__tests__/test-governance.test.mjs, pnpm test:scripts, pnpm lint, and git diff --check.

@aronprins

Copy link
Copy Markdown
Collaborator Author

Greptile has re-reviewed the latest head b3e5932 and now reports Confidence Score 5/5, Safe to merge. The two Greptile-flagged scripts/test-changed.mjs issues are fixed: canonical package dirs are used for cache hashing, and reverse-dependency expansion is wired into the changed-test execution plan. Latest CI is fully green.

@gsxdsm
gsxdsm merged commit 8b2b4f6 into main May 7, 2026
7 checks passed
gsxdsm added a commit that referenced this pull request May 18, 2026
test: harden and slim local test workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants