Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Atlas `projects` collector reports complete:true with zero assets when PROJECTS.md's table shape changes — and a complete run is what sweeps

Open timrutzen opened this issue 2 months ago • 1 comments

What breaks

LIFEOS/ATLAS/collectors/Projects.ts hardcodes LIFEOS/USER/PROJECTS.md, takes the first markdown table above ## Routing Aliases, and continues past any row with fewer than 4 cells (Projects.ts:33).

If that file is legitimately reshaped — it is a user-owned routing table, and users are told to edit it — every row is skipped and collect() returns { complete: true, assets: [], edges: [] }.

Why that is worse than an error

Per Store.ts, only a successful, enumeration-complete full run may mark observations unfresh. So the collector does not merely stop adding facts: it becomes the one thing allowed to expire them.

On our estate, 11 consecutive "successful" runs marked all 18 project nodes unfresh (stale at 2 days, expired at 14) while atlas status and every health probe read green.

complete means "enumeration finished", not "enumeration found something", and nothing in the pipeline distinguishes the two.

Minimal repro

  1. atlas sync projects — note the asset count.
  2. Edit LIFEOS/USER/PROJECTS.md so the first table above ## Routing Aliases has 3 columns (for example, add a | Tree | Path | Notes | table above it).
  3. atlas sync projects → ✓ projects: 0 assets, 0 edges (run N, complete, swept).
  4. atlas sql "SELECT fresh FROM source_observation WHERE collector='projects'" → every row 0.

Suggested fixes, in order of value

  1. A present source that parses to zero rows is malformed, not empty — return complete: false. It reports the same zero while making the sweep structurally impossible. One line, and it fixes the whole class for every collector.
  2. Resolve columns by header name, not by position, and fail loud when a required header is missing. A positional parser cannot tell "reshaped" from "empty".
  3. Make the source configurable, and stop assuming PROJECTS.md is a registry. It is documented as a routing table; installs that keep their registry elsewhere are silently unobserved even before any reshape.
  4. hooks/AtlasEventCapture.hook.ts hardcodes the same path independently (/\/PROJECTS\.md$/). Both should key off one exported constant, so a source change cannot desynchronise the collector from its own mutation hint.

A related observation

LIFEOS/PULSE/modules/projects.ts parses the same file and, on the same input, returns "present but no projects parsed — source format drifted".

That is the right behaviour, and it is the behaviour the collector should have. One source change, two consumers, and only the one that failed loud reported anything.

timrutzen avatar Sep 22 '26 09:09 timrutzen

Thanks @timrutzen. Confirmed, and the point that complete meant 'finished' rather than 'found something' was the key. A PROJECTS.md that exists but parses to zero rows now reports a partial run, so it can no longer sweep the project nodes (LIFEOS/ATLAS/collectors/Projects.ts), with a test. We took your first fix; header-name column resolution isn't in yet. Next release carries it.

danielmiessler avatar Oct 03 '26 04:10 danielmiessler