agentic-workflow-manager 9.10.1 → 9.10.2
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/src/commands/watch/supervisor.js +7 -1
- package/dist/tests/commands/watch/supervisor-loop.test.js +15 -0
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/secure_fs.node +0 -0
- package/prebuilds/darwin-x64/secure_fs.node +0 -0
- package/prebuilds/win32-arm64/secure_fs.node +0 -0
- package/prebuilds/win32-x64/secure_fs.node +0 -0
|
@@ -255,7 +255,13 @@ class Supervisor {
|
|
|
255
255
|
this.sensorDeferrals += 1;
|
|
256
256
|
if (this.sensorDeferrals <= exports.MAX_SENSOR_DEFERRALS)
|
|
257
257
|
return 'continue';
|
|
258
|
-
|
|
258
|
+
// The reason must not carry the running counter. enterCustody is
|
|
259
|
+
// idempotent on (status, reason), so a message that changes every
|
|
260
|
+
// tick defeats that guard and rewrites the journal plus appends a
|
|
261
|
+
// custody-blocked event every tickMs, without bound. Naming the
|
|
262
|
+
// bound instead of the count keeps the reason stable, so custody
|
|
263
|
+
// is entered once and stays entered.
|
|
264
|
+
(0, generations_1.enterCustody)(this.repoRoot, this.branch, `veredicto de sensores no concluyente tras ${exports.MAX_SENSOR_DEFERRALS} ticks: ${admission.diagnostics.map(diagnostic => `${diagnostic.code}: ${diagnostic.message}`).join('; ')}`);
|
|
259
265
|
return 'custody';
|
|
260
266
|
}
|
|
261
267
|
(0, generations_1.enterCustody)(this.repoRoot, this.branch, `admisión compacta desatendida bloqueada antes de dispatch: ${admission.diagnostics.map(diagnostic => `${diagnostic.code}: ${diagnostic.message}`).join('; ')}`);
|
|
@@ -425,6 +425,21 @@ describe('supervisor loop', () => {
|
|
|
425
425
|
const state = (0, store_1.readJournal)(repo, 'main').state;
|
|
426
426
|
expect(state.cycle.status).toBe('BLOCKED');
|
|
427
427
|
expect(state.cycle.blockedReason).toMatch(/sensor/i);
|
|
428
|
+
// Entered once, not once per tick. enterCustody is idempotent on
|
|
429
|
+
// (status, reason), so the reason must not carry the running counter —
|
|
430
|
+
// otherwise every tick rewrites the journal and appends another
|
|
431
|
+
// custody-blocked event, unbounded. Observed against published 9.10.1
|
|
432
|
+
// before this was fixed: "tras 16 ticks", "tras 17 ticks", "tras 18
|
|
433
|
+
// ticks", one every 5s.
|
|
434
|
+
const eventsFile = path_1.default.join(repo, '.awm', 'journal', 'main', 'events.jsonl');
|
|
435
|
+
const custodyEvents = () => fs_1.default.readFileSync(eventsFile, 'utf8').split('\n').filter(line => line.includes('custody-blocked')).length;
|
|
436
|
+
const afterFirst = custodyEvents();
|
|
437
|
+
expect(afterFirst).toBe(1);
|
|
438
|
+
const revisionAfterFirst = state.revision;
|
|
439
|
+
for (let i = 0; i < 3; i += 1)
|
|
440
|
+
expect(await sup.tick()).toBe('custody');
|
|
441
|
+
expect(custodyEvents()).toBe(afterFirst);
|
|
442
|
+
expect((0, store_1.readJournal)(repo, 'main').state.revision).toBe(revisionAfterFirst);
|
|
428
443
|
// Deferring dispatch was right throughout, and stays right.
|
|
429
444
|
expect(spawned).toBe(0);
|
|
430
445
|
});
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|