Personal_AI_Infrastructure icon indicating copy to clipboard operation
Personal_AI_Infrastructure copied to clipboard

Telos DashboardTemplate tracks PascalCase AND lowercase copies of its whole tree — 22 colliding path pairs break fresh clones on macOS/Windows

Open jbmml opened this issue 4 months ago • 1 comments

Summary

LifeOS/install/skills/Telos/DashboardTemplate/ tracks two case-variant copies of its entire Next.js App Router tree at HEAD:

  • App/, Components/, Components/Ui/, Lib/ (PascalCase)
  • app/, components/, components/Ui/, lib/ (lowercase)

Every pair is byte-identical content (same blob SHA — e.g. both Lib/utils.ts and lib/utils.ts are blob d084cca) — not a divergent fork, a straight duplicate that was never cleaned up. On a case-insensitive filesystem (macOS APFS default, Windows default) only one casing per pair can materialize, so git clone prints:

warning: the following paths have collided (e.g. case-sensitive paths
on a case-insensitive filesystem) and only one from the same
colliding group is in the working tree:

Repro

git clone https://github.com/danielmiessler/LifeOS.git
# -> prints the collision warning, 44 colliding paths, exit code 0

git status stays clean afterward (the pairs are identical, so whichever case wins matches the index either way) — but on a fresh macOS clone the directories that actually survive on disk are the PascalCase ones (App/, Components/, Lib/); the lowercase tree the code imports never materializes. Since Next.js's App Router requires a lowercase app/ at the project root (already diagnosed in #1193), every route 404s — the DashboardTemplate is non-functional straight out of a stock clone on the majority dev platform.

Full collision list (22 groups / 44 paths, all in the live install tree, none in Releases/)

App/add-file/page.tsx              <-> app/add-file/page.tsx
App/api/chat/route.ts              <-> app/api/chat/route.ts
App/api/file/get/route.ts          <-> app/api/file/get/route.ts
App/api/file/save/route.ts         <-> app/api/file/save/route.ts
App/api/files/count/route.ts       <-> app/api/files/count/route.ts
App/api/upload/route.ts            <-> app/api/upload/route.ts
App/ask/page.tsx                   <-> app/ask/page.tsx
App/file/[slug]/page.tsx           <-> app/file/[slug]/page.tsx
App/globals.css                    <-> app/globals.css
App/layout.tsx                     <-> app/layout.tsx
App/page.tsx                       <-> app/page.tsx
App/progress/page.tsx              <-> app/progress/page.tsx
App/vulnerabilities/page.tsx       <-> app/vulnerabilities/page.tsx
Components/sidebar.tsx             <-> components/sidebar.tsx
Components/Ui/badge.tsx            <-> components/Ui/badge.tsx
Components/Ui/button.tsx           <-> components/Ui/button.tsx
Components/Ui/card.tsx             <-> components/Ui/card.tsx
Components/Ui/progress.tsx         <-> components/Ui/progress.tsx
Components/Ui/table.tsx            <-> components/Ui/table.tsx
Lib/data.ts                        <-> lib/data.ts
Lib/telos-data.ts                  <-> lib/telos-data.ts
Lib/utils.ts                       <-> lib/utils.ts

(all paths relative to LifeOS/install/skills/Telos/DashboardTemplate/)

Bonus: even the lowercase copy doesn't fully match its own imports — the tracked path is components/Ui/*.tsx (capital Ui), but every import says @/components/ui/card (lowercase ui), so a case-sensitive Linux/CI build doesn't resolve either tracked casing cleanly.

Blast radius

  • Default git clone on macOS and Windows.
  • The shipped install tree specifically — not a stale Releases/ artifact (verified: the historical snapshots only ever carried the PascalCase form; zero collisions there).
  • Same warning class previously seen in #454 (different module, resolved incidentally by a later restructuring) — a recurrence, not a first occurrence.
  • Distinct from #1144 / #1278 / #1391 / #1146, which are wrong-case references to a single tracked path. Here git itself tracks two colliding paths per file — a different failure mode in the same case-sensitivity family.

Root cause (from history)

4146621 (release 6.0.0) carried the PascalCase App/Components/Lib tree into the new skill-only layout — the same layout #1193 had already flagged as broken on Next.js/case-sensitive systems. 5468ccd (release 6.0.2) then added a lowercase copy — apparently applying #1193's proposed fix — but as an addition rather than a git mv rename, so the PascalCase paths were never removed from the index. No commit since has deleted them (git log --diff-filter=D on those paths is empty).

Proposed fix

  • git rm -r the PascalCase App/, Components/, Lib/ under DashboardTemplate/ — content is byte-identical to the lowercase copy, nothing imports the PascalCase paths (checked every .ts/.tsx import and every installer/skill script for literal DashboardTemplate references: zero hits), and Releases/ is untouched.
  • git mv the surviving components/Ui/ → components/ui/ to fully match imports (no lowercase ui/ exists yet, so the rename is clean).
  • Effect on existing broken checkouts: since content is identical there's no diff to reconcile on pull, and once the competing index entries drop out, macOS/Windows working trees materialize the correct lowercase tree for the first time — the fix repairs existing clones, not just future ones.

Footnote: #1193's other two findings are also still present at HEAD — react-markdown (imported in app/file/[slug]/page.tsx) and @radix-ui/react-slot (imported in components/Ui/button.tsx) remain absent from DashboardTemplate/package.json. Probably worth folding into the same cleanup pass.

Happy to open a PR for all of this — it's a pure tree-cleanup with zero behavior change, and should make bun install && bun dev route correctly on a fresh clone.

jbmml avatar Jul 09 '26 21:07 jbmml

Thanks — great forensics, including the blob-SHA check and the 6.0.2 add-without-rename history. Three outcomes in the development source:

  1. The PascalCase tree exists only in the published repo's history — source now carries a single lowercase tree, and the public repo is regenerated from source at release, so the 22 colliding pairs drop with the next release (which, as you note, also repairs existing clones on pull since content is identical).
  2. Your bonus finding is fixed: components/Ui/ → components/ui/ (git mv) so every tracked path matches the @/components/ui/* imports on case-sensitive systems too.
  3. The #1193 leftovers are folded in: react-markdown and @radix-ui/react-slot added to DashboardTemplate/package.json.

A case-portability release gate (case-fold collision detection + import-vs-real-path case check) now runs at release cut to block this class from recurring. Closing as integrated.

danielmiessler avatar Jul 09 '26 23:07 danielmiessler