mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-21 23:33:07 +00:00
Fix concurrency limits and remote branch fetching issues (#788)
* Changes from fix/bug-fixes * feat: Refactor worktree iteration and improve error logging across services * feat: Extract URL/port patterns to module level and fix abort condition * fix: Improve IPv6 loopback handling, select component layout, and terminal UI * feat: Add thinking level defaults and adjust list row padding * Update apps/ui/src/store/app-store.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * feat: Add worktree-aware terminal creation and split options, fix npm security issues from audit * feat: Add tracked remote detection to pull dialog flow * feat: Add merge state tracking to git operations * feat: Improve merge detection and add post-merge action preferences * Update apps/ui/src/components/views/board-view/dialogs/git-pull-dialog.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update apps/ui/src/components/views/board-view/dialogs/git-pull-dialog.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix: Pass merge detection info to stash reapplication and handle merge state consistently * fix: Call onPulled callback in merge handlers and add validation checks --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -163,6 +163,10 @@ export class AutoLoopCoordinator {
|
||||
const { projectPath, branchName } = projectState.config;
|
||||
while (projectState.isRunning && !projectState.abortController.signal.aborted) {
|
||||
try {
|
||||
// Count ALL running features (both auto and manual) against the concurrency limit.
|
||||
// This ensures auto mode is aware of the total system load and does not over-subscribe
|
||||
// resources. Manual tasks always bypass the limit and run immediately, but their
|
||||
// presence is accounted for when deciding whether to dispatch new auto-mode tasks.
|
||||
const runningCount = await this.getRunningCountForWorktree(projectPath, branchName);
|
||||
if (runningCount >= projectState.config.maxConcurrency) {
|
||||
await this.sleep(5000, projectState.abortController.signal);
|
||||
@@ -298,11 +302,17 @@ export class AutoLoopCoordinator {
|
||||
return Array.from(activeProjects);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of running features for a worktree.
|
||||
* By default counts ALL running features (both auto-mode and manual).
|
||||
* Pass `autoModeOnly: true` to count only auto-mode features.
|
||||
*/
|
||||
async getRunningCountForWorktree(
|
||||
projectPath: string,
|
||||
branchName: string | null
|
||||
branchName: string | null,
|
||||
options?: { autoModeOnly?: boolean }
|
||||
): Promise<number> {
|
||||
return this.concurrencyManager.getRunningCountForWorktree(projectPath, branchName);
|
||||
return this.concurrencyManager.getRunningCountForWorktree(projectPath, branchName, options);
|
||||
}
|
||||
|
||||
trackFailureAndCheckPauseForProject(
|
||||
|
||||
Reference in New Issue
Block a user