Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Pulse tab-freshness aggregates the NEWEST source, so a tab holding one machine-written file can never go stale

Open schmetti-dev opened this issue 3 months ago • 1 comments

computeTabFreshness in LIFEOS/PULSE/modules/tab-freshness.ts keeps the newest dated source of a tab, so the pill reports how recently anything in the tab was touched. A tab is therefore green whenever any single one of its sources is current, and a tab that contains one machine-written file can never age at all.

if (!mostRecent || effective > mostRecent) mostRecent = effective
const daysOld = mostRecent ? Math.floor((Date.now() - mostRecent.getTime()) / 86_400_000) : null
const tier = tierFromDays(anyExist ? daysOld : null)

Why it is structural, not occasional

Several registry entries pair human-authored sources with derived or state files that a job rewrites on a schedule. The derived file is always the newest, so it always wins:

Tab Reported Oldest source actually was
telos fresh · 0 days 18 days (CURRENT_STATE/README.md) — PRINCIPAL_TELOS.md is regenerated by DerivedSync and LIFEOS_STATE.json is rewritten with it
work fresh · 0 days 40 days (WORK/config.yaml) — STATE/work.json is rewritten by ISASync on every run
docs fresh · 0 days 75 days (DOCUMENTATION/SystemUserBoundary.md) — ARCHITECTURE_SUMMARY.md is auto-generated
atlas, performance fresh · 0 days every listed source is machine-written state

Five of the registered tabs cannot express staleness. work is the sharpest case: STATE/work.json is rewritten by the ISA sync hook, so the pill is pinned green by the act of using the system.

Why "exclude the generated files" is the wrong fix

It needs a maintained list of which sources are derived, and that list rots. Reporting the oldest dated source needs no list, because a regenerated file is by definition the newest and therefore never the one that decides — the derivative stops masking its source for free.

Suggested shape

Aggregate on the minimum, and name the file in the label so the pill says what to go and review:

3 of 3 sources dated · oldest WORK/config.yaml (2026-07-18), newest 2026-08-27

That naming is the same actionability point as #1780, which fixed derivative-masks-source in TelosFreshness.ts (the statusline reminder) and left this module untouched.

Repro

Any tab in REGISTRY with two or more sources, one of which a job rewrites. curl "localhost:31337/api/tab-freshness?tab=work" returns tier: "fresh", daysOld: 0 while perFile in the same response shows a source dated weeks earlier.

Verified on 7.40.4.

schmetti-dev avatar Aug 27 '26 20:08 schmetti-dev

Withdrawing this — the fix exists and belongs in a PR rather than a report. Sorry for the noise.

schmetti-dev avatar Aug 27 '26 20:08 schmetti-dev