Skip to content

fix(pulse/observability): sample-entry regex, fd leak, unbounded caches, gendered string - #1734

Open
elhoim wants to merge 4 commits into
danielmiessler:mainfrom
elhoim:fix/observability-server
Open

fix(pulse/observability): sample-entry regex, fd leak, unbounded caches, gendered string#1734
elhoim wants to merge 4 commits into
danielmiessler:mainfrom
elhoim:fix/observability-server

Conversation

@elhoim

@elhoim elhoim commented Aug 3, 2026

Copy link
Copy Markdown

4 commits, one per fix, so each can be cherry-picked independently. Each was verified to apply cleanly onto 47df8ee by itself.

Commit Fix
f2f01fd close the fd when readJsonlByteTail throws
6ef670c evict stale series keys from the activity and climb caches
6eb8d90 drop the gendered pronoun from a shipped API response
5d71e64 match the shipped "(sample — …)" entries in SAMPLE_ENTRY_RE

Four defects in LIFEOS/PULSE/Observability/observability.ts, all in code added or changed by 7.28.3.

  • SAMPLE_ENTRY_RE (~4216)/^\**\s*\(sample\)/i requires a literal ), so it misses the shipped (sample — …) entries. MISSION.md:M2 alone made realEntries(mission) > 0, so telosPersonalized() returned true on a fresh install, template mode never armed, and Pulse showed the sample mission and goals to a new user as their own. Now \(sample\b, matching the sibling filter in LIFEOS/TOOLS/GenerateTelosSummary.ts:164.
  • readJsonlByteTail (~147) — no try/finally around the fd, so a throw between open and close leaks it. Both sibling readers added in the same change already have the guard; this matches them.
  • activityCache / climbCache (~405) — each series is capped, but the number of KEYS was unbounded: every slug and session_id ever folded stayed resident for the daemon's life. Adds key eviction on the fold path only.
  • buildTeamFromUserFiles (~3941) — a hardcoded gendered pronoun in a shipped API response, in a function whose own comment says names never live in this file. Now phrased without one.

Verified: a scratch harness against the real shipped USER/TELOS scaffold — 28 sample bullets, 0 missed by the new regex, real entries still pass, eviction keeps live keys and drops stale.

One thing for the porter: the cache eviction is a real behaviour change for climbCache, not only memory. buildIscDeltas computes all-time totals from a slug's points, so an ISA quiet for >24h then resuming re-seeds from prevDone = 0 and shows a one-off spike. 24h was chosen as 6x the widest consumer window (RUN_ACTIVITY.nativeStaleMs, 4h). Bounding key count instead of age is the alternative if all-time totals are meant to be durable.


Testing. Commands and output are in the per-file notes above. I did not do a fresh-system install verification (contributing step 3) — these are targeted fixes verified per-file, not an install run.

elhoim added 4 commits August 3, 2026 07:01
Both sibling readers added in the same change already guard with try/finally;
this one leaked a descriptor on any throw between open and close.
…nd climb caches

Each series was capped, but the number of KEYS was not: every slug and
session_id ever folded stayed resident for the daemon's lifetime.

Note for the porter: this is a behaviour change for climbCache, not only
memory. buildIscDeltas computes all-time totals from a slug's points, so an
ISA quiet for >24h then resuming re-seeds from prevDone = 0.
…I response

buildTeamFromUserFiles emitted "serves his TELOS" in a function whose own
comment says names never live in this file.
… SAMPLE_ENTRY_RE

The literal ")" missed the scaffold's own variants, so telosPersonalized()
returned true on a fresh install, template mode never armed, and Pulse showed
the sample mission and goals to a new user as their own. Matches the sibling
filter in LIFEOS/TOOLS/GenerateTelosSummary.ts.
@elhoim
elhoim force-pushed the fix/observability-server branch from a46fe66 to 5d71e64 Compare August 3, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant