[bug] slugFromPath in hooks/lib/isa-utils.ts compares raw paths, so a file touched by…

Open Beginner friendly
#2,940 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 4 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Start at hooks/lib/isa-utils.ts:1099, where lifeosPath('MEMORY','WORK') is prefixed and compared with startsWith, then follow the caller in EventLogger.hook.ts:286-290 to see the same-session versus cross-session bumps. Copy the approach used for #2721 (KnowledgeWriteGuard) and the WORK/WORK_REAL check in LIFEOS/TOOLS/IsaLadder.ts:146: resolve symlinks on both sides before comparing. Done means both calls from the report return x — the symlinked MEMORY path and the realpath — with no regression for plain MEMORY/WORK paths.

Written by the indexing model from the issue text.

Description

What happened

slugFromPath misses files touched by their real path behind the LIFEOS/MEMORY symlink

Summary

hooks/lib/isa-utils.ts:1099 builds lifeosPath('MEMORY', 'WORK') + '/' and tests the tool's file_path with startsWith. The installer makes LIFEOS/MEMORY a symlink into the per-user tree (skills/LifeOS/Tools/InstallEngine.ts:1139), so a path given by the real target of that symlink (<realpath of LIFEOS/MEMORY>/WORK/<slug>/...) returns null, and EventLogger.hook.ts:290 (bumpLastToolActivity(toolFilePath)) skips the cross-session heartbeat for that slug. The same-session bump at :286 is unaffected.

Same class as #2721 (KnowledgeWriteGuard), fixed there by resolving symlinks on both sides. LIFEOS/TOOLS/IsaLadder.ts:146 already handles this by checking WORK and WORK_REAL. To see it: slugFromPath("<claude>/LIFEOS/MEMORY/WORK/x/ISA.md") -> "x", slugFromPath("<realpath of LIFEOS/MEMORY>/WORK/x/ISA.md") -> null.

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

Dominant language
TypeScript
Stars
19.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from danielmiessler/LifeOS

All issues in danielmiessler/LifeOS

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.