@hank-warren/pi-loop 0.4.0 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hank-warren/pi-loop
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 3fbf632: Clear `nextWakeAt` when the wake timer fires, so `/loop status` can no longer report a "Next wake" clock time that has already passed. A tick that coalesces instead of firing — a busy or compacting session — left the old deadline in place, printing it directly above the line saying a wake is pending at the next idle boundary. Display only; no scheduling behaviour changes.
8
+
3
9
  ## 0.4.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hank-warren/pi-loop",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Interval wakeups for Pi: recurring prompt re-runs, stall rescue toward an active pi-goal goal, and loop-aware compaction that survives long sessions.",
5
5
  "type": "module",
6
6
  "keywords": [
package/src/loop.ts CHANGED
@@ -144,6 +144,12 @@ export class LoopController {
144
144
  this.nextWakeAt = this.now() + delayMs;
145
145
  this.timer = setTimeout(() => {
146
146
  this.timer = undefined;
147
+ // Nothing is scheduled once the timer has fired. `runTick` re-arms it
148
+ // through `scheduleTick` when it pokes, but a busy or compacting
149
+ // session coalesces into `wakePending` instead — and leaving the old
150
+ // deadline here made `/loop status` report a clock time that had
151
+ // already passed.
152
+ this.nextWakeAt = undefined;
147
153
  const ctx = this.sessionCtx;
148
154
  if (!ctx) return;
149
155
  this.runTick(ctx);