create-claude-workspace 2.3.36 → 2.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/scheduler/loop.mjs +27 -6
- package/package.json +1 -1
package/dist/scheduler/loop.mjs
CHANGED
|
@@ -600,10 +600,13 @@ async function runTaskPipeline(task, workerId, agents, deps) {
|
|
|
600
600
|
model: getAgentModel(pipeline.assignedAgent, agents, task),
|
|
601
601
|
}, state, task.id, logger, onMessage, onSpawnStart, onSpawnEnd, mcpServers);
|
|
602
602
|
}
|
|
603
|
+
// Check if changes contain actual code (affects QA + review decisions)
|
|
604
|
+
const postImplFiles = getChangedFiles(worktreePath);
|
|
605
|
+
const codeChanged = hasCodeChanges(postImplFiles);
|
|
603
606
|
// STEP 3: QA (E2E tests, integration tests, acceptance criteria verification)
|
|
604
|
-
//
|
|
607
|
+
// Skip for non-code changes (docs, config, assets) and pure refactoring tasks.
|
|
605
608
|
if (!shouldSkip('test')) {
|
|
606
|
-
const needsQA = task.type !== 'fullstack' || !isRefactoringTask(task);
|
|
609
|
+
const needsQA = codeChanged && (task.type !== 'fullstack' || !isRefactoringTask(task));
|
|
607
610
|
if (needsQA) {
|
|
608
611
|
pipeline.step = 'test';
|
|
609
612
|
appendEvent(projectDir, createEvent('step_changed', { taskId: task.id, step: 'test' }));
|
|
@@ -630,11 +633,11 @@ async function runTaskPipeline(task, workerId, agents, deps) {
|
|
|
630
633
|
}
|
|
631
634
|
}
|
|
632
635
|
else {
|
|
633
|
-
logger.info(`[${task.id}] Skipping QA step (refactoring/config task)`);
|
|
636
|
+
logger.info(`[${task.id}] Skipping QA step (${codeChanged ? 'refactoring/config task' : 'no code changes'})`);
|
|
634
637
|
}
|
|
635
638
|
} // end if !shouldSkip('test')
|
|
636
|
-
// STEP 4: Review
|
|
637
|
-
if (!shouldSkip('review')) {
|
|
639
|
+
// STEP 4: Review (skip for non-code changes — nothing to review)
|
|
640
|
+
if (!shouldSkip('review') && codeChanged) {
|
|
638
641
|
pipeline.step = 'review';
|
|
639
642
|
appendEvent(projectDir, createEvent('step_changed', { taskId: task.id, step: 'review' }));
|
|
640
643
|
const reviewRouting = await orchestrator.routeTask(task, 'review', agents);
|
|
@@ -677,7 +680,10 @@ async function runTaskPipeline(task, workerId, agents, deps) {
|
|
|
677
680
|
}
|
|
678
681
|
}
|
|
679
682
|
}
|
|
680
|
-
}
|
|
683
|
+
}
|
|
684
|
+
else if (!shouldSkip('review') && !codeChanged) {
|
|
685
|
+
logger.info(`[${task.id}] Skipping review (no code changes)`);
|
|
686
|
+
} // end review
|
|
681
687
|
// STEP 5: Commit
|
|
682
688
|
if (!shouldSkip('commit')) {
|
|
683
689
|
pipeline.step = 'commit';
|
|
@@ -879,6 +885,21 @@ function isRefactoringTask(task) {
|
|
|
879
885
|
return lower.includes('refactor') || lower.includes('config') || lower.includes('cleanup')
|
|
880
886
|
|| lower.includes('rename') || lower.includes('migrate') || lower.includes('upgrade');
|
|
881
887
|
}
|
|
888
|
+
/** Code file extensions that warrant QA and review. */
|
|
889
|
+
const CODE_EXTENSIONS = new Set([
|
|
890
|
+
'.ts', '.tsx', '.js', '.jsx', '.mts', '.mjs', '.cts', '.cjs',
|
|
891
|
+
'.vue', '.svelte', '.py', '.rs', '.go', '.java', '.kt',
|
|
892
|
+
'.css', '.scss', '.sass', '.less',
|
|
893
|
+
'.html', '.htm',
|
|
894
|
+
'.sql',
|
|
895
|
+
]);
|
|
896
|
+
/** Check if changed files contain actual code (not just docs/config/assets). */
|
|
897
|
+
function hasCodeChanges(changedFiles) {
|
|
898
|
+
return changedFiles.some(f => {
|
|
899
|
+
const ext = f.slice(f.lastIndexOf('.')).toLowerCase();
|
|
900
|
+
return CODE_EXTENSIONS.has(ext);
|
|
901
|
+
});
|
|
902
|
+
}
|
|
882
903
|
// ─── Orphaned worktree recovery ───
|
|
883
904
|
/** Mark issue as done on the platform after a successful recovery merge */
|
|
884
905
|
export function closeRecoveredIssue(projectDir, branch, logger) {
|