@dev-loops/core 0.2.2 → 0.2.3
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/package.json
CHANGED
package/src/config/config.mjs
CHANGED
|
@@ -28,7 +28,7 @@ const ModelsConfig = z.strictObject({
|
|
|
28
28
|
const RefinementConfig = z.strictObject({
|
|
29
29
|
fanOut: z.number().int().min(1).max(10),
|
|
30
30
|
mode: z.enum(["parallel", "sequential"]),
|
|
31
|
-
maxCopilotRounds: z.number().int().
|
|
31
|
+
maxCopilotRounds: z.number().int().nonnegative().default(5),
|
|
32
32
|
stopOnLowSignal: z.boolean().default(false),
|
|
33
33
|
lowSignalRoundThreshold: z.number().int().nonnegative().default(3),
|
|
34
34
|
lowSignalMaxComments: z.number().int().nonnegative().default(2),
|
|
@@ -447,6 +447,12 @@ export function shouldGuardCopilotReviewRequest({
|
|
|
447
447
|
if (!gateBoundariesRequiringCopilotFormalRequest.has(gateBoundary)) {
|
|
448
448
|
return false;
|
|
449
449
|
}
|
|
450
|
+
// Copilot review disabled for the repo (maxCopilotRounds: 0): never force a
|
|
451
|
+
// formal request — the loop runs draft_gate → pre_approval with the local
|
|
452
|
+
// harness only. See evaluatePrGateCoordination (internal_only routing).
|
|
453
|
+
if (maxCopilotRounds === 0) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
450
456
|
if (copilotReviewRequestStatus !== "none") {
|
|
451
457
|
return false;
|
|
452
458
|
}
|
|
@@ -477,9 +483,14 @@ export function evaluatePrGateCoordination(input = {}) {
|
|
|
477
483
|
const prClosed = input.prClosed === true;
|
|
478
484
|
const prMerged = input.prMerged === true;
|
|
479
485
|
const sameHeadCleanConverged = input.sameHeadCleanConverged === true;
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
486
|
+
// maxCopilotRounds: 0 disables the external Copilot review gate entirely
|
|
487
|
+
// (for repos without Copilot / local-harness-only review). It reuses the
|
|
488
|
+
// existing internal_only routing — skip the Copilot cycle, go straight to
|
|
489
|
+
// pre_approval — so no separate skip path is needed.
|
|
490
|
+
const copilotReviewDisabled = input.maxCopilotRounds === 0;
|
|
491
|
+
const reviewMode = copilotReviewDisabled
|
|
492
|
+
? "internal_only"
|
|
493
|
+
: (typeof input.reviewMode === "string" ? input.reviewMode.trim().toLowerCase() : null);
|
|
483
494
|
const mergeStateStatus = normalizeMergeStateStatus(input.mergeStateStatus);
|
|
484
495
|
const conflictFiles = normalizeConflictFiles(input.conflictFiles);
|
|
485
496
|
const ciStatus = normalizeCiStatus(input.ciStatus);
|
|
@@ -813,7 +824,9 @@ export function evaluatePrGateCoordination(input = {}) {
|
|
|
813
824
|
allowedNextActions,
|
|
814
825
|
forbiddenActions,
|
|
815
826
|
nextAction: PR_CHECKPOINT_ACTION.AWAIT_FINAL_HUMAN_APPROVAL,
|
|
816
|
-
reason:
|
|
827
|
+
reason: copilotReviewDisabled
|
|
828
|
+
? "Copilot review is disabled for this repo (maxCopilotRounds: 0); with clean draft_gate evidence and current-head clean pre_approval_gate, the PR is ready for final human approval."
|
|
829
|
+
: "This is an explicitly internal-only PR with clean draft_gate evidence and current-head clean pre_approval_gate, so it is ready for final human approval.",
|
|
817
830
|
mergeStateStatus,
|
|
818
831
|
conflictFiles,
|
|
819
832
|
refinementArtifact,
|
|
@@ -835,7 +848,9 @@ export function evaluatePrGateCoordination(input = {}) {
|
|
|
835
848
|
allowedNextActions,
|
|
836
849
|
forbiddenActions,
|
|
837
850
|
nextAction: PR_CHECKPOINT_ACTION.RUN_PRE_APPROVAL_GATE,
|
|
838
|
-
reason:
|
|
851
|
+
reason: copilotReviewDisabled
|
|
852
|
+
? "Copilot review is disabled for this repo (maxCopilotRounds: 0), so `pre_approval_gate` is the next legal boundary instead of an external Copilot review cycle."
|
|
853
|
+
: "This is an explicitly internal-only PR, so `pre_approval_gate` is the next legal boundary instead of an external Copilot review cycle.",
|
|
839
854
|
mergeStateStatus,
|
|
840
855
|
conflictFiles,
|
|
841
856
|
refinementArtifact,
|