Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

DocCheck path regexes match `LifeOS/` but the shipped tree is `LIFEOS/` — the main backticked-reference class and all @-imports are never checked (same bug as #1541)

Open Bowlerjim opened this issue 2 months ago • 2 comments

Observed on 7.54.0.

What

// LIFEOS/TOOLS/DocCheck.ts:37
/`((?:LifeOS|hooks|skills|agents|Pulse|USER|MEMORY|Components|Algorithm|Tools)\/[\w/.@-]+\.\w+)`/g,

// LIFEOS/TOOLS/DocCheck.ts:43
/^@(LifeOS\/[\w/.@-]+\.md)/gm,

Both alternations are case-sensitive and spell the tree LifeOS/. The shipped tree is LIFEOS/. The comments directly above each pattern already use the real casing (`LIFEOS/DOCUMENTATION/Hooks/HookSystem.md`, @LIFEOS/USER/FILE.md), so the code contradicts its own examples.

This is the same class of bug already fixed upstream as #1541, in ReferenceCheck.ts, which carries the note that "the old LifeOS/-cased regex never matched anything — orphan detection was structurally dead". DocCheck.ts was not updated with it.

Repro

A doc with three deliberately broken references:

`LIFEOS/DOCUMENTATION/DoesNotExist.md`   (real casing)
`LifeOS/DOCUMENTATION/DoesNotExist.md`   (legacy casing)
`hooks/DoesNotExist.hook.ts`             (control)
bun LIFEOS/TOOLS/DocCheck.ts --json

Observed: "refsChecked": 2 — findings for the legacy-cased and hooks/ references only. The LIFEOS/ reference is never extracted.

For scale: on a live tree there are 131 backticked `LIFEOS/…` references in the docs DocCheck scans and 0 `LifeOS/…`, and every @-import in CLAUDE.md is @LIFEOS/…, so pattern 4 is entirely dead.

Expected

All three reported missing.

Fix sketch

Replace the LifeOS alternative with LIFEOS in both patterns (and in the table-cell pattern at :45), or make the alternation case-insensitive — the same fix #1541 applied to ReferenceCheck.ts.

Bowlerjim avatar Sep 21 '26 03:09 Bowlerjim

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

Confirmed, same bug class as the already-fixed #1541. Case-sensitive LifeOS never matched our shipped LIFEOS/ casing, so the main backticked-reference class and all @-imports were silently unchecked. Added the i flag to all three patterns — refsChecked jumped from 110 to 220 on our install after the fix.

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 @Bowlerjim. Confirmed, the same class as #1541. DocCheck's backtick and @-import patterns now match LIFEOS/, and they keep LifeOS/ so a legacy-cased reference still gets reported as broken. It's ported from your PR #2198 (LIFEOS/TOOLS/DocCheck.ts). Next release carries it.

danielmiessler avatar Oct 03 '26 04:10 danielmiessler