@xn-intenton-z2a/agentic-lib 7.4.10 → 7.4.12
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.
|
@@ -125,15 +125,26 @@ jobs:
|
|
|
125
125
|
const cron = SCHEDULE_MAP[effectiveFrequency];
|
|
126
126
|
|
|
127
127
|
// Check if the frequency is already set — skip if no-op (but never skip maintenance)
|
|
128
|
+
// Must check BOTH the config file AND the workflow file to avoid desynchronisation
|
|
128
129
|
const supervisorRegex2 = /^\s*supervisor\s*=\s*"([^"]*)"/m;
|
|
129
130
|
if (!isMaintenance && fs.existsSync(tomlPath)) {
|
|
130
131
|
const currentToml = fs.readFileSync(tomlPath, 'utf8');
|
|
131
132
|
const currentMatch = currentToml.match(supervisorRegex2);
|
|
132
133
|
const currentFreq = currentMatch ? currentMatch[1] : '';
|
|
133
|
-
|
|
134
|
+
// Also check the workflow file has the expected cron schedule
|
|
135
|
+
const cronRegex = /- cron: "([^"]*)"/;
|
|
136
|
+
const workflowCronMatch = content.match(cronRegex);
|
|
137
|
+
const currentCron = workflowCronMatch ? workflowCronMatch[1] : null;
|
|
138
|
+
const expectedCron = cron; // from SCHEDULE_MAP
|
|
139
|
+
const configMatches = currentFreq === frequency;
|
|
140
|
+
const workflowMatches = currentCron === expectedCron;
|
|
141
|
+
if (configMatches && workflowMatches) {
|
|
134
142
|
core.info(`Schedule already set to ${frequency} — no change needed`);
|
|
135
143
|
return;
|
|
136
144
|
}
|
|
145
|
+
if (configMatches && !workflowMatches) {
|
|
146
|
+
core.info(`Config says ${frequency} but workflow cron is "${currentCron}" (expected "${expectedCron}") — updating workflow`);
|
|
147
|
+
}
|
|
137
148
|
}
|
|
138
149
|
|
|
139
150
|
// Remove any existing schedule block
|
package/package.json
CHANGED
package/src/copilot/config.js
CHANGED
|
@@ -243,6 +243,7 @@ export function loadConfig(configPath) {
|
|
|
243
243
|
const mc = toml["mission-complete"] || {};
|
|
244
244
|
const missionCompleteThresholds = {
|
|
245
245
|
minResolvedIssues: mc["min-resolved-issues"] ?? 3,
|
|
246
|
+
minDedicatedTests: mc["min-dedicated-tests"] ?? 1,
|
|
246
247
|
requireDedicatedTests: mc["require-dedicated-tests"] ?? true,
|
|
247
248
|
maxSourceTodos: mc["max-source-todos"] ?? 0,
|
|
248
249
|
};
|