Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Interview docs tell you to `POST /reload`, but Pulse never registered that route. `telos.invalidate()` has no caller

Open bak3r opened this issue 2 months ago • 2 comments

What happens

Three Interview skill docs say that after bumping a freshness marker you should clear Pulse's 60 s freshness cache with:

curl -s -X POST http://localhost:31337/reload

Pulse has no /reload route (rg -n reload LIFEOS/PULSE/pulse.ts finds only an HTML hint string). The request 404s. The docs pipe it to /dev/null and background it, so nobody sees the failure. The cache stays stale for up to 60 s after every interview write.

modules/telos.ts has an invalidate() function whose docstring says "Call from Pulse /reload", but nothing in the tree calls it.

Where (7.40.4)

  • LIFEOS/PULSE/modules/telos.ts: lines 50 and 92 (comments) and handleRequest (no route)
  • skills/Interview/SKILL.md: line 55
  • skills/Interview/Workflows/Phase0Setup.md: lines 57 and 60
  • skills/Interview/Workflows/ContextCheckin.md: lines 230 and 233

Fix

Pulse already routes /api/freshness* to the telos module (pulse.ts:921), so the smallest fix is to expose invalidate() there and point the docs at it:

--- a/LifeOS/install/LIFEOS/PULSE/modules/telos.ts
+++ b/LifeOS/install/LIFEOS/PULSE/modules/telos.ts
@@ -47,3 +47,3 @@
-// Cache invalidates on Pulse /reload (calls invalidate()).
+// Cache invalidates on POST /api/freshness/invalidate (calls invalidate()).
@@ -91,4 +91,4 @@
 /**
- * Invalidate the freshness cache. Call from Pulse /reload so the next
- * request re-reads everything.
+ * Invalidate the freshness cache so the next request re-reads everything.
+ * Reachable over HTTP as `POST /api/freshness/invalidate`.
  */
@@ -129,4 +129,8 @@
   if (pathname.startsWith("/api/freshness")) {
+    if (pathname === "/api/freshness/invalidate") {
+      invalidate();
+      return Response.json({ ok: true, invalidated_at: new Date().toISOString() });
+    }
     if (pathname === "/api/freshness/summary") {
--- a/LifeOS/install/skills/Interview/SKILL.md
+++ b/LifeOS/install/skills/Interview/SKILL.md
@@ -55 +55 @@
-- **Pulse caches freshness for 60s.** After bumping, the next `/api/telos/freshness/summary` call returns the cached value until invalidation. Send `/reload` (POST) to invalidate the cache immediately, or wait 60s.
+- **Pulse caches freshness for 60s.** After bumping, the next `/api/telos/freshness/summary` call returns the cached value until invalidation. `POST /api/freshness/invalidate` clears it immediately, or wait 60s.
--- a/LifeOS/install/skills/Interview/Workflows/Phase0Setup.md
+++ b/LifeOS/install/skills/Interview/Workflows/Phase0Setup.md
@@ -57,5 +57,5 @@
-5. After Phase 0 completes, **regenerate PRINCIPAL_TELOS.md** (it interpolates the principal name) and **send a Pulse `/reload`** so the running daemon picks up the new identity:
+5. After Phase 0 completes, **regenerate PRINCIPAL_TELOS.md** (it interpolates the principal name) and **invalidate the Pulse freshness cache** so the running daemon picks up the new identity:
    ```bash
    bun ~/.claude/LIFEOS/TOOLS/GenerateTelosSummary.ts 2>/dev/null || true
-   curl -s -X POST http://localhost:31337/reload > /dev/null 2>&1 &
+   curl -s -X POST http://localhost:31337/api/freshness/invalidate > /dev/null 2>&1 &
--- a/LifeOS/install/skills/Interview/Workflows/ContextCheckin.md
+++ b/LifeOS/install/skills/Interview/Workflows/ContextCheckin.md
@@ -230,4 +230,4 @@
-Send a Pulse `/reload` so the freshness cache invalidates:
+Invalidate the Pulse freshness cache:
 
 ```bash
-curl -s -X POST http://localhost:31337/reload > /dev/null 2>&1 &
+curl -s -X POST http://localhost:31337/api/freshness/invalidate > /dev/null 2>&1 &

Verified

This has run on my install since 2026-08-26. curl -X POST http://127.0.0.1:31337/api/freshness/invalidate returns {"ok":true,"invalidated_at":"..."}. A server-code change needs a Pulse restart before it takes effect.

bak3r avatar Sep 21 '26 05:09 bak3r

This is Shiva, Eugene's AI Assistant, reporting on Eugene's behalf.

Confirmed live: POST /reload 404'd on our running Pulse, and telos.invalidate() had zero callers anywhere. Added POST /api/freshness/invalidate and fixed the 3 stale doc references. Restarted Pulse and confirmed the new route returns 200.

Environment: ThinkPad, Ubuntu 24.04.4 LTS, Ryzen AI 9 HX PRO 370, Bun 1.3.11.

waveman2020-sudo avatar Sep 23 '26 19:09 waveman2020-sudo

Thanks @bak3r. Pulse now serves POST /api/freshness/invalidate, which calls invalidate() (LIFEOS/PULSE/modules/telos.ts). The Interview skill docs point at that route in place of the /reload that never existed. Next release carries it.

danielmiessler avatar Oct 03 '26 04:10 danielmiessler