fix(core): await secrets store close during TaskStore shutdown - #1822
Conversation
|
Ready to review this PR? Stage has broken it down into 2 individual chapters for you:
Chapters generated by Stage for commit af99a35 on Jun 30, 2026 12:15am UTC. |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesTaskStore secrets core shutdown fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR makes TaskStore shutdown more deterministic by awaiting the secrets CentralCore close path and adds a patch changeset for the published CLI package.
Changes:
- Await
secretsCentralCore.close()duringTaskStore.close()and clear the field before awaiting to keep shutdown idempotent. - Log (best-effort) if secrets CentralCore teardown fails instead of silently ignoring it.
- Add a patch changeset for
@runfusion/fusiondescribing the fix.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/core/src/store.ts | Awaits secrets CentralCore shutdown during TaskStore close to reduce teardown races and improve shutdown determinism. |
| .changeset/thin-rocks-post.md | Adds a patch changeset for @runfusion/fusion documenting the shutdown fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
02a33c6 to
c6a34f0
Compare
|
@copilot resolve the merge conflicts in this pull request |
c6a34f0 to
af99a35
Compare
## Summary - Mocks `git remote get-url origin` for dashboard PR lifecycle tests via `execFileSync`, matching the production repository resolver. - Keeps the missing-repository error covered for cases where no project remote is resolvable. - Tightens dashboard PR lifecycle assertions so PR status checks use the resolved owner/repo. ## Verification - `corepack pnpm build` — pass - `corepack pnpm --filter @runfusion/fusion exec vitest run src/commands/__tests__/dashboard.test.ts --silent=passed-only --reporter=dot --no-color` — pass, 86 tests - `corepack pnpm --filter @runfusion/fusion exec vitest run src/commands/__tests__/dashboard.test.ts -t "processPullRequestMergeTask|PR-first auto-merge queue" --silent=passed-only --reporter=dot --no-color` — pass, 7 tests - Clean rebuilt stale bundled plugin dist, then `corepack pnpm --filter @runfusion/fusion exec vitest run --changed 24d7881 --passWithNoTests --silent=passed-only --reporter=dot --no-color` — pass, 75 files / 1186 tests - `corepack pnpm check:changesets` — pass - `corepack pnpm lint` — pass - `corepack pnpm typecheck` — pass No changeset: test-only fixture coverage; no package runtime behavior changed. ## CI note The current Gate failure is the pre-existing engine-core workflow expectation drift fixed by PR #1822. Lint, Typecheck, Build, CodeRabbit, and Greptile passed on this PR. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Expanded dashboard and pull request merge coverage to verify repository detection and merge-status handling across merge lifecycle paths. * Added a failure-path assertion for when the app can’t determine the current repository, ensuring the operation stops and surfaces the expected error. * Improved assertions for auto-merge and manual merge flows to confirm the correct repository lookup occurs in each scenario. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Current Gate status `Gate` is failing on current `origin/main` before these PR changes. I reproduced the same engine-core failures directly on `origin/main` (`task-pipeline-smoke.test.ts` and `workflow-graph-executor-parity.test.ts`, caused by the new `completion-summary` / `post-merge-verification` default workflow nodes). The PR-local review feedback is addressed and focused validation passes; the remaining Gate failure should be fixed in the upstream workflow-test drift PR, not copied into this PR branch.
## Summary - Adds a fail-closed resolver for explicit review checkout metadata. - Routes both in-session step reviews and graph step reviews through the validated checkout when present. - Keeps existing workspace per-repo review behavior when no explicit checkout is configured. ## Verification - `corepack pnpm check:changesets` — pass - `corepack pnpm lint` — pass - `corepack pnpm build` — pass - `corepack pnpm --filter @fusion/engine exec vitest run src/__tests__/reviewer-workspace.test.ts --reporter=dot --no-color` — pass, 11 tests ## Note - Full `corepack pnpm test` on current main is blocked by existing workflow gate expectation drift covered separately by PR #1822; this branch avoids duplicating those commits. <!-- stage-review-badge-begin --> --- <a href="https://stagereview.app/Runfusion/Fusion/pull/1823"> <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 * **Bug Fixes** * Review steps now correctly run in the intended external checkout when one is provided. * Read-only reviewers now use the validated review workspace path instead of defaulting to the task worktree. * Added regression coverage to ensure review execution uses the expected checkout location. <!-- end of auto-generated comment: release notes by coderabbit.ai --> ## Current Gate status `Gate` is failing on current `origin/main` before these PR changes. I reproduced the same engine-core failures directly on `origin/main` (`task-pipeline-smoke.test.ts` and `workflow-graph-executor-parity.test.ts`, caused by the new `completion-summary` / `post-merge-verification` default workflow nodes). The PR-local review feedback is addressed and focused validation passes; the remaining Gate failure should be fixed in the upstream workflow-test drift PR, not copied into this PR branch.
Summary
Test Plan
corepack pnpm installcorepack pnpm check:changesetscorepack pnpm lintcorepack pnpm buildcorepack pnpm testSummary by CodeRabbit