diff --git a/src/resources/extensions/sf/auto/loop.js b/src/resources/extensions/sf/auto/loop.js index e3c60140e..326175431 100644 --- a/src/resources/extensions/sf/auto/loop.js +++ b/src/resources/extensions/sf/auto/loop.js @@ -175,7 +175,7 @@ export class HaltWatchdog { kind: "runaway-loop:idle-halt", severity: "high", summary: `Autonomous loop stuck — no heartbeat for ${Math.round(elapsedMs / 1000)}s at iteration ${iteration}`, - evidence: `Last heartbeat at ${new Date(this.lastActionTimestamp).toISOString()}; threshold ${this.thresholdMs}ms`, + evidence: `Last heartbeat at ${new Date(this.lastActionTimestamp).toISOString()}; elapsed ${elapsedMs}ms; threshold ${this.thresholdMs}ms; iteration ${iteration}`, }, this.basePath, ); diff --git a/src/resources/extensions/sf/tests/auto-halt-self-feedback.test.mjs b/src/resources/extensions/sf/tests/auto-halt-self-feedback.test.mjs index aa7e8e837..74ec40929 100644 --- a/src/resources/extensions/sf/tests/auto-halt-self-feedback.test.mjs +++ b/src/resources/extensions/sf/tests/auto-halt-self-feedback.test.mjs @@ -65,7 +65,9 @@ test("HaltWatchdog.check()_when_idle_exceeds_threshold_creates_self_feedback_db_ assert.equal(entries[0].blocking, true); assert.match(entries[0].summary, /iteration 42/); assert.match(entries[0].summary, /no heartbeat for/); + assert.match(entries[0].evidence, /elapsed/); assert.match(entries[0].evidence, /threshold 10ms/); + assert.match(entries[0].evidence, /iteration 42/); const markdownPath = join(testDir, ".sf", "SELF-FEEDBACK.md"); assert.equal(existsSync(markdownPath), true);